VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtOsgEarthProfileDialog.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 
14 
15 #include <boost/unordered_map.hpp>
16 
17 #include <QtWidgets/QDialog>
18 
19 // Class Forward Declarations
20 class QCheckBox;
21 class QTreeWidget;
22 class QTreeWidgetItem;
23 class QGridLayout;
24 class QLabel;
25 class QSlider;
26 class QHBoxLayout;
27 class QVBoxLayout;
28 class QDoubleSpinBox;
29 class QPushButton;
30 
31 namespace makVrv
32 {
33  // Class Forward Declarations
34  class DtDe;
35  class DtOsgEarthProfileLogic;
36  class DtTerrainContentsWidget;
37 
41  : public QDialog
43  {
44  Q_OBJECT
45  public:
46 
48  typedef std::map<int, QTreeWidgetItem*> ItemMap;
49 
50  typedef boost::unordered_map<int, QTreeWidgetItem*> LayerTypeMap;
51 
52  typedef boost::unordered_map<int, QTreeWidgetItem*> LayerMap;
53 
54  typedef boost::unordered_map<int, float> MaxDistanceMap;
55 
57  DtOsgEarthProfileDialog(DtDe& de, QWidget* parent);
58 
60  virtual ~DtOsgEarthProfileDialog();
61 
64  virtual void osgEarthFileSelectChanged(std::string definition);
65 
68  virtual void addLayerType(LayerType layerType);
69 
76  virtual void addLayer(int id, LayerType layerType, const std::string& name, bool enabled, bool visible, int parentId = -1);
77 
81  virtual void setVisibility(LayerType layerType, int visibility);
82 
85  virtual void setOpacity(float opacity);
86 
88  virtual void setLightingEnabled(int enabled);
89 
92  virtual void setLandCoverVisibility(bool visible);
93 
96  virtual void setLandCoverCoverDensity(double value);
97 
100  virtual void setLandCoverCoverFill(double value);
101 
104  virtual void setLandCoverCoverWind(double value);
105 
108  virtual void setLandCoverCoverBrightness(double value);
109 
112  virtual void setLandCoverCoverContrast(double value);
113 
117  virtual void saveMaxDistanceForLandCoverLayer(int id, float maxDistance);
118 
121  virtual float getMaxDistanceForLandCoverLayer(int id);
122 
125  virtual void setLastEarthFileName(const std::string& name);
126 
127  private:
128 
133 
134  protected:
135 
137  virtual void cleanup();
138 
140  void setupGui();
141 
143  virtual void closeEvent(QCloseEvent* e);
144 
147  virtual void updateGui(int layerType);
148 
150  virtual void showEvent(QShowEvent* e);
151 
153  virtual QTreeWidgetItem* findLayerType(LayerType layerType);
154 
156  virtual QTreeWidgetItem* findLayer(int id);
157 
161  virtual void setItemLayerType(QTreeWidgetItem* item, LayerType layerType);
162 
166  virtual void setItemUniqueID(QTreeWidgetItem* item, int id);
167 
169  virtual void setItemName(QTreeWidgetItem* item, const std::string& name);
170 
172  virtual std::string getLayerTypeName(LayerType layerType);
173 
175  virtual void connectToSignals();
176 
178  virtual bool isItemLayer(QTreeWidgetItem* layer);
179 
181  virtual void slot_afterPopulateAllLayers();
182 
183 protected slots:
184 
188  virtual void on_layersTreeWidget_selectionChanged();
189  virtual void on_visibilityCheckBox_valueChanged(int);
190  virtual void on_opacitySpinBox_valueChanged(double);
191  virtual void on_lightingEnabledCheckBox_valueChanged(int);
192  virtual void on_landCoverVisibilityChanged(int);
193  virtual void on_landCoverDensityChanged(double);
194  virtual void on_landCoverFillChanged(double);
195  virtual void on_landCoverWindChanged(double);
196  virtual void on_landCoverBrightnessChanged(double);
197  virtual void on_landCoverContrastChanged(double);
199 
200  protected:
201 
202  QVBoxLayout* myMainLayout;
203  QHBoxLayout* myWidgetLayout;
206  QGridLayout* myConfigurationLayout;
209  QDoubleSpinBox*myOpacitySpinBox;
211 
213  QGridLayout* myLandCoverLayout;
218  QDoubleSpinBox*myLandCoverFillSpinBox;
220  QDoubleSpinBox*myLandCoverWindSpinBox;
226 
232 
237  std::string myLastEarthFileName;
238 
239  };
240 
241 
242 
243 
244 }

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)