OpenTwin
0.1
OpenTwin
Loading...
Searching...
No Matches
ContextMenuAction.h
Go to the documentation of this file.
1
4
// ###########################################################################################################################################################################################################################################################################################################################
5
6
#pragma once
7
8
// OpenTwin header
9
#include "
OTCore/OTClassHelper.h
"
10
#include "
OTGui/MenuButtonCfg.h
"
11
#include "
OTWidgets/OTWidgetsAPIExport.h
"
12
13
// Qt header
14
#include <QtWidgets/qaction.h>
15
16
namespace
ot
{
17
18
class
OT_WIDGETS_API_EXPORT
ContextMenuAction
:
public
QAction {
19
OT_DECL_NOCOPY
(
ContextMenuAction
)
20
public
:
21
ContextMenuAction
(QObject* _parent = (QObject*)
nullptr
);
22
ContextMenuAction
(
const
MenuButtonCfg
& _config, QObject* _parent = (QObject*)
nullptr
);
23
virtual
~ContextMenuAction
();
24
25
void
setFromConfiguration(
const
MenuButtonCfg
& _config);
26
27
void
setContextMenuActionName
(
const
std::string& _name) { m_name = _name; };
28
const
std::string&
getContextMenuActionName
(
void
)
const
{
return
m_name; };
29
30
private
:
31
std::string m_name;
32
};
33
34
}
MenuButtonCfg.h
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
OTWidgetsAPIExport.h
OT_WIDGETS_API_EXPORT
#define OT_WIDGETS_API_EXPORT
Definition
OTWidgetsAPIExport.h:12
ot::ContextMenuAction
Definition
ContextMenuAction.h:18
ot::ContextMenuAction::getContextMenuActionName
const std::string & getContextMenuActionName(void) const
Definition
ContextMenuAction.h:28
ot::ContextMenuAction::setContextMenuActionName
void setContextMenuActionName(const std::string &_name)
Definition
ContextMenuAction.h:27
ot::MenuButtonCfg
Definition
MenuButtonCfg.h:13
ot
Definition
Connector.h:8
Libraries
OTWidgets
include
OTWidgets
ContextMenuAction.h
Generated by
1.10.0