]> ruin.nu Git - hbs.git/blob - bs/bsview.h
added the possibility to edit fleets
[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
59   protected:
60         BattleSum       *m_BattleSum;
61         QListView               *m_NumberView;
62         QSplitter               *m_RightSplit;  
63         QSplitter               *m_LeftSplit;
64         ScanView                *m_ScanView;
65         InfoView                *m_InfoView;
66         TickView                *m_TickView;
67         QWidgetStack    *m_FleetViews;
68         FleetView       *m_FleetView;
69         FleetView       *m_GenericFleetView;
70         BSDoc                   *m_doc;
71         std::map<QString, std::map<QString, bool> > m_TreeExpanded;
72
73         QString         m_sBattle;
74         QString         m_sGroup;
75         QString         m_sFleet;
76   
77 public slots: // Public slots
78   /** No descriptions */
79   void slotFleetSelection(QListViewItem *lvi);
80   void slotItemExpanded(QListViewItem *lvi);
81   void slotItemCollapsed(QListViewItem *lvi);
82 };
83
84 #endif