VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtTerrainContentsWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCoreQt/vrvCoreQt.h>
15 
16 #include <QtGui/QWidget>
17 
18 class QTreeWidget;
19 class QTreeWidgetItem;
20 class QHBoxLayout;
21 class QVBoxLayout;
22 class QPushButton;
23 class QDoubleSpinBox;
24 class QSlider;
25 class QSpinBox;
26 class QWidget;
27 class QLabel;
28 
29 namespace makVrv
30 {
31  class DtDe;
32  class DtTerrainOperationRecord;
33 
37  : public QWidget
39  {
40 
41  Q_OBJECT
42 
43  public:
44 
46  typedef std::map<int, QTreeWidgetItem*> ItemMap;
47 
49  virtual ~DtTerrainContentsWidget();
50 
52  virtual void addItem(int id, LayerType layerType, const DtUnicode& name, bool visualized );
53 
55  virtual void removeItem(int id);
56 
60  virtual void setAddOceanButtonState( bool enabled );
61 
64  virtual void setOceanHeight( double height, const DtUnicode& units, int decimals, double maxHeight );
65 
67  virtual void setLodRange( double range, const DtUnicode& units, int decimals, double maxRange, double minStep );
68 
70  virtual void clear();
71 
73  inline QVBoxLayout* mainLayout() { return myMainLayout; }
74 
76  inline QHBoxLayout* buttonLayout() { return myButtonLayout; }
77 
79  inline QPushButton* addTerrainPatchButton() { return myAddTerrainPatchButton; }
80 
82  inline QPushButton* addFeatureLayerButton() { return myAddFeatureLayerButton; }
83 
85  inline QPushButton* addOceanLayerButton() { return myAddOceanLayerButton; }
86 
88  inline QTreeWidget* contentsTreeWidget() { return myContentsTreeWidget; }
89 
92  inline QWidget* oceanSettingsWidget() { return myOceanSettingsWidget; }
93 
96  inline QVBoxLayout* oceanSettingsLayout() { return myOceanSettingsLayout; }
97 
100  inline QHBoxLayout* seaLevelSettingsLayout() { return mySeaLevelSettingsLayout; }
101 
103  inline QLabel* seaLevelLabel() { return mySeaLevelLabel; }
104 
106  inline QSlider* seaLevelSlider() { return mySeaLevelSlider; }
107 
109  inline QDoubleSpinBox* seaLevelSpinBox() { return mySeaLevelSpinBox; }
110 
113  inline QHBoxLayout* lodRangeSettingsLayout() { return myLodRangeSettingsLayout; }
114 
116  inline QLabel* lodRangeLabel() { return myLodRangeLabel; }
117 
119  inline QSlider* lodRangeSlider() { return myLodRangeSlider; }
120 
122  inline QDoubleSpinBox* lodRangeSpinBox() { return myLodRangeSpinBox; }
123 
125  inline int oceanLayerId() { return myOceanLayerId; }
126  public:
127 
129  static boost::signal<void (DtDe&, DtTerrainContentsWidget*)> signal_setupGui;
130 
131  protected slots:
132 
133  virtual void on_addTerrainPatchBtn_clicked();
134  virtual void on_addFeatureLayerBtn_clicked();
135  virtual void on_addOceanLayerBtn_clicked();
136  virtual void on_removeBtn_clicked();
137  virtual void on_contentsTreeWidget_itemSelectionChanged();
138  virtual void on_seaLevelSpinBox_valueChanged( double value );
139  virtual void on_seaLevelSlider_valueChanged( int value );
140  virtual void on_lodRangeSpinBox_valueChanged( double value );
141  virtual void on_lodRangeSlider_valueChanged( int value );
142 
143  protected:
144 
147 
149  DtTerrainContentsWidget(DtDe& de, QWidget* parent = 0, Qt::WindowFlags flags = 0);
150 
152  void setupGui();
153 
154  protected:
155 
156  const static int theInputTypeColumn = 0;
157  const static int theNameColumn = 1;
158  const static int theStatusColumn = 2;
159  const static int theIdColumn = 3;
160 
164  QHBoxLayout* myButtonLayout;
165 
166  QVBoxLayout* myMainLayout;
167 
173  QVBoxLayout* myOceanSettingsLayout;
174 
178  QDoubleSpinBox* mySeaLevelSpinBox;
179 
183  QDoubleSpinBox* myLodRangeSpinBox;
185 
188  };
189 
193  {
194 
195  public:
197  static DtTerrainContentsWidgetCreator& instance(DtDe& de);
198 
200  static void registerInstance(DtDe& de,DtTerrainContentsWidgetCreator* anInstance);
201 
203  virtual DtTerrainContentsWidget* create(DtDe& de, QWidget * parent = NULL,
204  const Qt::WindowFlags& flags = 0);
205  };
206 }
207 
208 

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)