]> ruin.nu Git - hbs.git/blob - bs/bsview.h
adding, removing and chaning fleets now works.
[hbs.git] / bs / bsview.h
1 /***************************************************************************
2                           bcview.h  -  description
3                              -------------------
4     begin                : Sun Jun 17 19:19:58 CEST 2001
5     copyright            : (C) 2001 by Michael Andreen
6     email                : whale@linux.nu
7  ***************************************************************************/
8
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  ***************************************************************************/
17
18 #ifndef BCVIEW_H
19 #define BCVIEW_H
20
21 // include files for QT
22 #include <qsplitter.h>
23
24 //Standard includes
25 #include <map>
26
27 // application specific includes
28 #include "bsdoc.h"
29
30 class BattleSum;
31 class ScanView;
32 class InfoView;
33 class TickView;
34 class FleetView;
35
36 //QT forward declarations
37 class QListView;
38 class QSplitter;
39 class QWidgetStack;
40 class QListViewItem;
41
42 /**
43  * This class provides an incomplete base for your application view. 
44  */
45
46 class BSView : public QSplitter
47 {
48   Q_OBJECT
49   public:
50     BSView(QWidget *parent=0, BSDoc* doc=0);
51     ~BSView();
52                 
53         void addBattle(QString name);
54
55   protected slots:
56     void slotDocumentChanged();
57         void slotFleetChanged(const Fleet*);
58         void slotInfoApply();
59         void slotInfoCancel();
60         void slotInfoNew();
61         void slotInfoRemove();
62
63   protected:
64
65         void updateInfoView();
66         void updateFleetView();
67
68
69         BattleSum       *m_BattleSum;
70         QListView               *m_NumberView;
71         QSplitter               *m_RightSplit;  
72         QSplitter               *m_LeftSplit;
73         ScanView                *m_ScanView;
74         InfoView                *m_InfoView;
75         TickView                *m_TickView;
76         QWidgetStack    *m_FleetViews;
77         FleetView       *m_FleetView;
78         FleetView       *m_GenericFleetView;
79         BSDoc                   *m_doc;
80         std::map<QString, std::map<QString, bool> > m_TreeExpanded;
81
82         QString         m_sBattle;
83         QString         m_sGroup;
84         QString         m_sFleet;
85
86         bool m_bMoreDocChanges;
87   
88 public slots: // Public slots
89   /** No descriptions */
90   void slotFleetSelection(QListViewItem *lvi);
91   void slotItemExpanded(QListViewItem *lvi);
92   void slotItemCollapsed(QListViewItem *lvi);
93 };
94
95 #endif