]> ruin.nu Git - hbs.git/blob - bs/bsview.h
some changes..
[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         void slotTickChanged(int min, int max);
63         void slotResultModeChanged( int i);
64         void slotUseScan(int action, QString text, int fleets);
65
66   protected:
67
68         void updateInfoView();
69         void updateFleetView();
70
71
72         BattleSum       *m_BattleSum;
73         QListView               *m_NumberView;
74         QSplitter               *m_RightSplit;  
75         QSplitter               *m_LeftSplit;
76         ScanView                *m_ScanView;
77         InfoView                *m_InfoView;
78         //TickView              *m_TickView;
79         QWidgetStack    *m_FleetViews;
80         FleetView       *m_FleetView;
81         FleetView       *m_GenericFleetView;
82         BSDoc                   *m_doc;
83         std::map<QString, std::map<QString, bool> > m_TreeExpanded;
84
85         QString         m_sBattle;
86         QString         m_sGroup;
87         QString         m_sFleet;
88
89         bool m_bMoreDocChanges;
90
91         int m_iMaxTick;
92         int m_iMinTick;
93         int m_iResultMode;
94         
95   
96 public slots: // Public slots
97   /** No descriptions */
98   void slotFleetSelection(QListViewItem *lvi);
99   void slotItemExpanded(QListViewItem *lvi);
100   void slotItemCollapsed(QListViewItem *lvi);
101 };
102
103 #endif