Ocular Engine
MainMenuBar.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_MENU_BAR__H__
19 #define __H__OCULAR_EDITOR_MENU_BAR__H__
20 
21 #include <QtWidgets/qmenubar.h>
22 
23 //------------------------------------------------------------------------------------------
24 
29 namespace Ocular
30 {
35  namespace Editor
36  {
37  class MainWindow;
38 
43  class MainMenuBar : QMenuBar
44  {
45  Q_OBJECT
46 
47  public:
48 
52  MainMenuBar(MainWindow* parent = nullptr);
53  ~MainMenuBar();
54 
55  virtual QSize sizeHint() const override;
56 
57  protected:
58 
59  void createFileMenu();
60  void createSceneMenu();
61  void createToolsMenu();
62  void createHelpMenu();
63 
64  private slots:
65 
66  void onFileNewProject();
67  void onFileOpenProject();
68  void onFileCloseProject();
69  void onFileNewScene();
70  void onFileOpenScene();
71  void onFileSaveScene();
72  void onFileSaveSceneAs();
73  void onFileCloseScene();
74  void onFileExit();
75 
76  void onSceneAddObject();
77  void onSceneAddMesh();
78  void onSceneAddLight();
79  void onSceneImportObject();
80  void onSceneProperties();
81 
82  void onToolsMaterialEditor();
83 
84  void onHelpAbout();
85 
86  private:
87 
88  QMenu* m_MenuFile;
89  QMenu* m_MenuScene;
90  QMenu* m_MenuSceneMesh;
91  QMenu* m_MenuSceneLight;
92  QMenu* m_MenuTools;
93  QMenu* m_MenuHelp;
94 
95  QDialog* m_DialogSceneProperties;
96  QDialog* m_DialogMaterialEditor;
97 
98  std::vector<QAction*> m_MenuActions;
99 
100  std::string m_LastScenePath;
101  };
102  }
106 }
111 //------------------------------------------------------------------------------------------
112 
113 #endif
MainMenuBar(MainWindow *parent=nullptr)
Definition: MainMenuBar.cpp:56
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
The primary menu bar in the MainWindow widget.
Definition: MainMenuBar.hpp:43
Main window for the Ocular Editor application.
Definition: MainWindow.hpp:46