OpenTwin
0.1
OpenTwin
Loading...
Searching...
No Matches
ToolMenuManager.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/qmenu.h>
14
15
class
QAction;
16
17
class
ToolMenuManager
:
public
QMenu {
18
Q_OBJECT
19
OT_DECL_NOCOPY
(
ToolMenuManager
)
20
public
:
21
ToolMenuManager
(
const
QString& _toolName);
22
virtual
~ToolMenuManager
();
23
24
QString
toolName
(
void
)
const
{
return
m_toolName; };
25
26
QAction*
runAction
(
void
) {
return
m_run; };
27
QAction*
autorunAction
(
void
) {
return
m_autorun; };
28
29
Q_SIGNALS:
30
void
runRequested
(
void
);
31
void
autorunChanged
(
bool
_isEnabled);
32
33
private
Q_SLOTS:
34
void
slotRun(
void
);
35
void
slotAutorun(
bool
_checked);
36
37
private
:
38
QString m_toolName;
39
QAction* m_run;
40
QAction* m_autorun;
41
42
ToolMenuManager
() =
delete
;
43
};
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
ToolMenuManager
Definition
ToolMenuManager.h:17
ToolMenuManager::runAction
QAction * runAction(void)
Definition
ToolMenuManager.h:26
ToolMenuManager::~ToolMenuManager
virtual ~ToolMenuManager()
Definition
ToolMenuManager.cpp:33
ToolMenuManager::autorunAction
QAction * autorunAction(void)
Definition
ToolMenuManager.h:27
ToolMenuManager::runRequested
void runRequested(void)
ToolMenuManager::autorunChanged
void autorunChanged(bool _isEnabled)
ToolMenuManager::toolName
QString toolName(void) const
Definition
ToolMenuManager.h:24
Tools
OToolkit
include
ToolMenuManager.h
Generated by
1.10.0