GlobeEngine
BodySelectionDialog.h
Go to the documentation of this file.
1 #ifndef ExoViewer_BodySelectionDialog_h
2 #define ExoViewer_BodySelectionDialog_h
3 
4 #include "OpenGL_Includes.h"
5 #include "SmallBody.h"
6 #include "System.h"
7 #include <QDialog>
8 #include <QTreeWidget>
9 #include <QTreeWidgetItem>
10 #include <QVBoxLayout>
11 
12 namespace geExoViewer {
13 
14  class BodySelectionDialog : public QDialog
15  {
16  Q_OBJECT
17 
18  public:
19  //BodySelectionDialog(const std::vector<geAstro::System*>* _systems, QWidget * parent = 0, Qt::WindowFlags f = 0);
20  //BodySelectionDialog(const std::vector<std::shared_ptr<geAstro::System>>* _systems, QWidget * parent = 0, Qt::WindowFlags f = 0);
21  BodySelectionDialog(const std::vector<std::shared_ptr<geAstro::System>>& _systems, QWidget * parent = 0, Qt::WindowFlags f = 0);
23 
24  QList<QTreeWidgetItem*>getItems();
25  QList<QTreeWidgetItem*>getTyps();
26  QList<QTreeWidgetItem*>getSystems();
27 
28 
29  private:
30  QTreeWidget* systemList;
31  QTreeWidget* typeList;
32  /*
33  QTreeWidget* starList;
34  QTreeWidget* planetList;
35  QTreeWidget* moonList;
36  QTreeWidget* dwarfPlanetList;
37  QTreeWidget* asteroidList;
38  QTreeWidget* meteoroidList;
39  QTreeWidget* cometList;*/
40 
41  QVBoxLayout* layout;
42  QList<QTreeWidgetItem *> items;
43  QList<QTreeWidgetItem *> systems;
44  QList<QTreeWidgetItem *> types;
45 
46  void setChildrenChecked(QTreeWidgetItem* _parent);
47  void setParentChecked(QTreeWidgetItem* _child);
48 
49  private slots:
50  void accept();
51  void updateChecks(QTreeWidgetItem*, int);
52  };
53 }
54 #endif
BodySelectionDialog(const std::vector< std::shared_ptr< geAstro::System >> &_systems, QWidget *parent=0, Qt::WindowFlags f=0)
Definition: BodySelectionDialog.cpp:7
Definition: BodySelectionDialog.h:14
QList< QTreeWidgetItem * > getSystems()
Definition: BodySelectionDialog.cpp:125
QList< QTreeWidgetItem * > getItems()
Definition: BodySelectionDialog.cpp:117
QList< QTreeWidgetItem * > getTyps()
Definition: BodySelectionDialog.cpp:121
~BodySelectionDialog()
Definition: BodySelectionDialog.cpp:111
Definition: BodySelectionDialog.h:12