VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
aggregateEquipmentAndPersonnelPage.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
13 #include <QTreeView>
14 #include <QStandardItemModel>
15 
16 class QTabWidget;
17 
18 namespace makVrf
19 {
20  namespace makVrfGuiObjectInformationQt
21  {
23  {
24  public:
26 
27  virtual ~DtAggregatePersonnelTab();
28 
29  QWidget* widget()
30  {
31  return myWidget;
32  }
33 
34  QTreeView* personnelTree()
35  {
36  return myPersonnelTree;
37  }
38 
39  QTreeView* casualtiesTree()
40  {
41  return myCasualtiesTree;
42  }
43 
44  QStandardItemModel* personnelModel()
45  {
46  return myPersonnelModel;
47  }
48 
49  QStandardItemModel* casualtiesModel()
50  {
51  return myCasualtiesModel;
52  }
53 
54  void clear()
55  {
56  myPersonnelModel->removeRows(0, myPersonnelModel->rowCount());
57  myCasualtiesModel->removeRows(0, myCasualtiesModel->rowCount());
58  }
59 
60  protected:
61 
64  QStandardItemModel* myPersonnelModel;
66  QStandardItemModel* myCasualtiesModel;
67  };
68 
70  {
71  public:
73 
74  virtual ~DtAggregateEquipmentTab();
75 
76  QWidget* widget()
77  {
78  return myTree;
79  }
80 
81  QTreeView* tree()
82  {
83  return myTree;
84  }
85 
86  QStandardItemModel* model()
87  {
88  return myModel;
89  }
90 
91  void clear()
92  {
93  myModel->removeRows(0, myModel->rowCount());
94  }
95 
96  protected:
97 
99  QStandardItemModel* myModel;
100  };
101 
103  {
104  Q_OBJECT
105 
106  public:
107 
109  DtAggregateEquipmentAndPersonnelPage(makVrv::DtDe& de, QWidget* parent, Qt::WindowFlags f = Qt::SubWindow);
110 
114  virtual QIcon icon();
115 
117  virtual QString title();
118 
120  virtual const std::string& pageClassName() const;
121 
123  static const std::string& thePageClassName();
124 
125  virtual bool selectElement(const std::string&);
126 
128  virtual bool isSubElementSelected(const std::string&) const;
129 
130  virtual DtInformationDialogPageLogic* createLogic();
131 
133  {
134  return myPersonnel;
135  }
136 
138  {
139  return myEquipment;
140  }
141 
143  {
144  return myWeapons;
145  }
146 
148  virtual ShowStatus setupGui(makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* s);
149 
150  protected:
151  virtual void activate();
152  virtual void deactivate();
153  virtual QWidget* createPageContents(ShowStatus&);
154 
155  virtual QWidget* createPersonnelTab();
156  virtual QWidget* createEquipmentTab();
157  virtual QWidget* createWeaponsTab();
158 
159  protected:
161 
165  };
166 
169  }
170 }

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)