OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
MenuManager.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
10
11// Qt header
12#include <QtCore/qstring.h>
13#include <QtWidgets/qmenubar.h>
14
15// std header
16#include <map>
17
18class ToolMenuManager;
19
20class QMenu;
21
22class MenuManager : public QMenuBar {
23 Q_OBJECT
25public:
27 virtual ~MenuManager();
28
29 QMenu* getFileMenu(void) { return m_fileMenu; };
30 QMenu* getToolsMenu(void) { return m_toolsMenu; };
31
32 ToolMenuManager* addToolMenu(const QString& _toolName, bool _isExternal);
33 ToolMenuManager* toolMenu(const QString& _toolName);
34
35Q_SIGNALS:
36 void exitRequested(void);
38
39private Q_SLOTS:
40 void slotExit(void);
41 void slotSettings(void);
42
43private:
44 QMenu* m_fileMenu;
45 QMenu* m_toolsMenu;
46 QMenu* m_externalToolsMenu;
47
48 std::map<QString, ToolMenuManager*> m_toolMenus;
49
50};
This file contains defines that may be used simplyfy class creation.
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
Definition MenuManager.h:22
MenuManager()
Definition MenuManager.cpp:24
void exitRequested(void)
void settingsRequested(void)
ToolMenuManager * toolMenu(const QString &_toolName)
Definition MenuManager.cpp:73
QMenu * getFileMenu(void)
Definition MenuManager.h:29
virtual ~MenuManager()
Definition MenuManager.cpp:45
QMenu * getToolsMenu(void)
Definition MenuManager.h:30
ToolMenuManager * addToolMenu(const QString &_toolName, bool _isExternal)
Definition MenuManager.cpp:49
Definition ToolMenuManager.h:17