GlobeEngine
GlobeEngineMenu.h
Go to the documentation of this file.
1 #ifndef GlobeEngineMenu_h
2 #define GlobeEngineMenu_h
3 
4 #include "OpenGL_Includes.h"
5 
6 #include <vector>
7 #include "GlobeEngineUI.h"
8 
9 #include <QObject>
10 
11 namespace geViewer {
12  class GlobeEngineUI;
13 
14  struct ViewFlags {
15  bool wgs84grid;
17  bool skybox;
21  };
22 
23  struct RenderingFlags {
24  bool picking;
28  bool animation;
29  bool fullScreen;
30  };
31 
32  struct TerrainFlags {
35  int visMode; // according to TerrainVis::VisualizationMode
36  };
37 
38  class GlobeEngineMenu : public QObject
39  {
40  Q_OBJECT
41 
42  public:
45  void create();
46  void addCameraMenu(QAction* _menuAction);
47 
48  std::shared_ptr<geGIS::GPUFeatureFlags> getFeatureMenuState();
49  const ViewFlags* getViewMenuState();
52  void setFeatureMenuState(bool _gpuFeatures);
53  int getVisModeForAction(QAction* _action);
54  void disableMenusForOtherMenusThan(int _vismode);
55 
56  public slots:
57  void selectFile(QAction* _action);
58  void selectView(QAction* _action);
59  void selectTerrain(QAction* _action);
60  void selectRendering(QAction* _action);
61  void selectGPUFeatures(QAction* _action);
62 
63  signals:
64  void triggerScreenshot(std::string _path);
65 
69  void triggerRenderingState();
70  void triggerTerrainState();
71 
73 
74  private:
75  GlobeEngineUI* parent;
76 
77  std::shared_ptr<geGIS::GPUFeatureFlags> gpufeatureMenuState;
78  ViewFlags viewState;
79  RenderingFlags renderingState;
80  TerrainFlags terrainViewState;
81 
82  std::vector<QAction*> refToMenus;
83  };
84 }
85 #endif
Definition: GlobeEngineMenu.h:23
void selectRendering(QAction *_action)
Definition: GlobeEngineMenu.cpp:211
void selectGPUFeatures(QAction *_action)
Definition: GlobeEngineMenu.cpp:173
const TerrainFlags * getTerrainMenuState()
Definition: GlobeEngineMenu.cpp:247
bool namesCulling
Definition: GlobeEngineMenu.h:19
bool wgs84grid
Definition: GlobeEngineMenu.h:15
bool edgeHightlighting
Definition: GlobeEngineMenu.h:27
~GlobeEngineMenu()
Definition: GlobeEngineMenu.cpp:15
void create()
Definition: GlobeEngineMenu.cpp:20
Definition: FeaturePanel.h:10
bool showNumeration
Definition: GlobeEngineMenu.h:33
int getVisModeForAction(QAction *_action)
Definition: GlobeEngineMenu.cpp:98
bool camfrustums
Definition: GlobeEngineMenu.h:16
bool shadowMapping
Definition: GlobeEngineMenu.h:25
void selectFile(QAction *_action)
Definition: GlobeEngineMenu.cpp:72
int selectedCameraIdx
Definition: GlobeEngineMenu.h:20
int visMode
Definition: GlobeEngineMenu.h:35
bool showTerrain
Definition: GlobeEngineMenu.h:34
void disableMenusForOtherMenusThan(int _vismode)
Definition: GlobeEngineMenu.cpp:107
void setFeatureMenuState(bool _gpuFeatures)
Definition: GlobeEngineMenu.cpp:234
const ViewFlags * getViewMenuState()
Definition: GlobeEngineMenu.cpp:239
Definition: GlobeEngineMenu.h:14
Definition: GlobeEngineMenu.h:32
bool skybox
Definition: GlobeEngineMenu.h:17
GlobeEngineMenu(GlobeEngineUI *_parent)
Definition: GlobeEngineMenu.cpp:7
bool namesRendering
Definition: GlobeEngineMenu.h:18
bool animation
Definition: GlobeEngineMenu.h:28
void addCameraMenu(QAction *_menuAction)
Definition: GlobeEngineMenu.cpp:61
bool ambientOcclusion
Definition: GlobeEngineMenu.h:26
bool fullScreen
Definition: GlobeEngineMenu.h:29
bool picking
Definition: GlobeEngineMenu.h:24
Definition: GlobeEngineMenu.h:38
void selectView(QAction *_action)
Definition: GlobeEngineMenu.cpp:136
void triggerScreenshot(std::string _path)
Definition: GlobeEngineUI.h:29
std::shared_ptr< geGIS::GPUFeatureFlags > getFeatureMenuState()
Definition: GlobeEngineMenu.cpp:230
const RenderingFlags * getRenderingMenuState()
Definition: GlobeEngineMenu.cpp:243
void selectTerrain(QAction *_action)
Definition: GlobeEngineMenu.cpp:115