VR-Forces 4.5 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 <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 
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 
132  static boost::signal<void(std::string)> signal_selectTreeItemChanged;
133 
135  static boost::signal<void()> signal_pageClosed;
136 
137  protected slots:
138 
139  virtual void on_addTerrainPatchBtn_clicked();
140  virtual void on_addFeatureLayerBtn_clicked();
141  virtual void on_addOceanLayerBtn_clicked();
142  virtual void on_removeBtn_clicked();
143  virtual void on_contentsTreeWidget_itemSelectionChanged();
144  virtual void on_seaLevelSpinBox_valueChanged( double value );
145  virtual void on_seaLevelSlider_valueChanged( int value );
146  virtual void on_lodRangeSpinBox_valueChanged( double value );
147  virtual void on_lodRangeSlider_valueChanged( int value );
148 
149  protected:
150 
153 
155  DtTerrainContentsWidget(DtDe& de, QWidget* parent = 0, Qt::WindowFlags flags = 0);
156 
158  void setupGui();
159 
160  protected:
161 
162  const static int theInputTypeColumn = 0;
163  const static int theNameColumn = 1;
164  const static int theStatusColumn = 2;
165  const static int theIdColumn = 3;
166 
170  QHBoxLayout* myButtonLayout;
171 
172  QVBoxLayout* myMainLayout;
173 
179  QVBoxLayout* myOceanSettingsLayout;
180 
184  QDoubleSpinBox* mySeaLevelSpinBox;
185 
189  QDoubleSpinBox* myLodRangeSpinBox;
191 
194  };
195 
199  {
200 
201  public:
203  static DtTerrainContentsWidgetCreator& instance(DtDe& de);
204 
206  static void registerInstance(DtDe& de,DtTerrainContentsWidgetCreator* anInstance);
207 
209  virtual DtTerrainContentsWidget* create(DtDe& de, QWidget * parent = NULL,
210  const Qt::WindowFlags& flags = 0);
211  };
212 }
213 
214 

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)