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
10
11// Qt header
12#include <QtCore/qstring.h>
13#include <QtWidgets/qmenu.h>
14
15class QAction;
16
17class ToolMenuManager : public QMenu {
18 Q_OBJECT
20public:
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
29Q_SIGNALS:
30 void runRequested(void);
31 void autorunChanged(bool _isEnabled);
32
33private Q_SLOTS:
34 void slotRun(void);
35 void slotAutorun(bool _checked);
36
37private:
38 QString m_toolName;
39 QAction* m_run;
40 QAction* m_autorun;
41
42 ToolMenuManager() = delete;
43};
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 ToolMenuManager.h:17
QAction * runAction(void)
Definition ToolMenuManager.h:26
virtual ~ToolMenuManager()
Definition ToolMenuManager.cpp:33
QAction * autorunAction(void)
Definition ToolMenuManager.h:27
void runRequested(void)
void autorunChanged(bool _isEnabled)
QString toolName(void) const
Definition ToolMenuManager.h:24