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
9
#include "
OTCore/OTClassHelper.h
"
10
11
// Qt header
12
#include <QtCore/qstring.h>
13
#include <QtWidgets/qmenubar.h>
14
15
// std header
16
#include <map>
17
18
class
ToolMenuManager
;
19
20
class
QMenu;
21
22
class
MenuManager
:
public
QMenuBar {
23
Q_OBJECT
24
OT_DECL_NOCOPY
(
MenuManager
)
25
public
:
26
MenuManager
();
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
35
Q_SIGNALS:
36
void
exitRequested
(
void
);
37
void
settingsRequested
(
void
);
38
39
private
Q_SLOTS:
40
void
slotExit(
void
);
41
void
slotSettings(
void
);
42
43
private
:
44
QMenu* m_fileMenu;
45
QMenu* m_toolsMenu;
46
QMenu* m_externalToolsMenu;
47
48
std::map<QString, ToolMenuManager*> m_toolMenus;
49
50
};
OTClassHelper.h
This file contains defines that may be used simplyfy class creation.
OT_DECL_NOCOPY
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition
OTClassHelper.h:14
MenuManager
Definition
MenuManager.h:22
MenuManager::MenuManager
MenuManager()
Definition
MenuManager.cpp:24
MenuManager::exitRequested
void exitRequested(void)
MenuManager::settingsRequested
void settingsRequested(void)
MenuManager::toolMenu
ToolMenuManager * toolMenu(const QString &_toolName)
Definition
MenuManager.cpp:73
MenuManager::getFileMenu
QMenu * getFileMenu(void)
Definition
MenuManager.h:29
MenuManager::~MenuManager
virtual ~MenuManager()
Definition
MenuManager.cpp:45
MenuManager::getToolsMenu
QMenu * getToolsMenu(void)
Definition
MenuManager.h:30
MenuManager::addToolMenu
ToolMenuManager * addToolMenu(const QString &_toolName, bool _isExternal)
Definition
MenuManager.cpp:49
ToolMenuManager
Definition
ToolMenuManager.h:17
Tools
OToolkit
include
MenuManager.h
Generated by
1.10.0