VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTerrainContentsWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCoreQt/vrvCoreQt.h>
15 
16 #include <QtWidgets/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  double stepHeight );
66 
68  virtual void setLodRange( double range, const DtUnicode& units, int decimals, double maxRange, double minStep );
69 
71  virtual void clear();
72 
74  inline QVBoxLayout* mainLayout() { return myMainLayout; }
75 
77  inline QHBoxLayout* buttonLayout() { return myButtonLayout; }
78 
80  inline QPushButton* addTerrainPatchButton() { return myAddTerrainPatchButton; }
81 
83  inline QPushButton* addFeatureLayerButton() { return myAddFeatureLayerButton; }
84 
86  inline QPushButton* addOceanLayerButton() { return myAddOceanLayerButton; }
87 
89  inline QTreeWidget* contentsTreeWidget() { return myContentsTreeWidget; }
90 
93  inline QWidget* oceanSettingsWidget() { return myOceanSettingsWidget; }
94 
97  inline QVBoxLayout* oceanSettingsLayout() { return myOceanSettingsLayout; }
98 
101  inline QHBoxLayout* seaLevelSettingsLayout() { return mySeaLevelSettingsLayout; }
102 
104  inline QLabel* seaLevelLabel() { return mySeaLevelLabel; }
105 
107  inline QSlider* seaLevelSlider() { return mySeaLevelSlider; }
108 
110  inline QDoubleSpinBox* seaLevelSpinBox() { return mySeaLevelSpinBox; }
111 
114  inline QHBoxLayout* lodRangeSettingsLayout() { return myLodRangeSettingsLayout; }
115 
117  inline QLabel* lodRangeLabel() { return myLodRangeLabel; }
118 
120  inline QSlider* lodRangeSlider() { return myLodRangeSlider; }
121 
123  inline QDoubleSpinBox* lodRangeSpinBox() { return myLodRangeSpinBox; }
124 
126  inline int oceanLayerId() { return myOceanLayerId; }
127  public:
128 
130  static boost::signal<void (DtDe&, DtTerrainContentsWidget*)> signal_setupGui;
131 
133  static boost::signal<void(std::string)> signal_selectTreeItemChanged;
134 
136  static boost::signal<void()> signal_pageClosed;
137 
138  protected slots:
139 
140  virtual void on_addTerrainPatchBtn_clicked();
141  virtual void on_addFeatureLayerBtn_clicked();
142  virtual void on_addOceanLayerBtn_clicked();
143  virtual void on_removeBtn_clicked();
144  virtual void on_contentsTreeWidget_itemSelectionChanged();
145  virtual void on_seaLevelSpinBox_valueChanged( double value );
146  virtual void on_seaLevelSlider_valueChanged( int value );
147  virtual void on_lodRangeSpinBox_valueChanged( double value );
148  virtual void on_lodRangeSlider_valueChanged( int value );
149 
150  protected:
151 
154 
156  DtTerrainContentsWidget(DtDe& de, QWidget* parent = 0, Qt::WindowFlags flags = 0);
157 
159  void setupGui();
160 
161  protected:
162 
163  const static int theInputTypeColumn = 0;
164  const static int theNameColumn = 1;
165  const static int theStatusColumn = 2;
166  const static int theIdColumn = 3;
167 
171  QHBoxLayout* myButtonLayout;
172 
173  QVBoxLayout* myMainLayout;
174 
180  QVBoxLayout* myOceanSettingsLayout;
181 
185  QDoubleSpinBox* mySeaLevelSpinBox;
186 
190  QDoubleSpinBox* myLodRangeSpinBox;
192 
195  };
196 
200  {
201 
202  public:
204  static DtTerrainContentsWidgetCreator& instance(DtDe& de);
205 
207  static void registerInstance(DtDe& de,DtTerrainContentsWidgetCreator* anInstance);
208 
210  virtual DtTerrainContentsWidget* create(DtDe& de, QWidget * parent = NULL,
211  const Qt::WindowFlags& flags = 0);
212  };
213 }
214 
215 

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)