OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ContextMenuManager.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
10#include "OTGui/MenuCfg.h"
12
13// Qt header
14#include <QtCore/qobject.h>
15
16class QWidget;
17
18namespace ot {
19
20 class ContextMenu;
21
23 Q_OBJECT
26 public:
27 ContextMenuManager(QWidget* _widget);
28 virtual ~ContextMenuManager();
29
30 void setMenu(const MenuCfg& _config);
31
32 Q_SIGNALS:
33 void clearRequested(void);
34 void actionTriggered(const std::string& _actionName);
35
36 public Q_SLOTS:
37 void slotShowContextMenu(const QPoint& _pos);
38
39 private Q_SLOTS:
40 void slotContextActionTriggered(const std::string& _actionName);
41
42 private:
43 QWidget* m_widget;
44 MenuCfg m_config;
45 ContextMenu* m_menu;
46 };
47
48}
This file contains defines that may be used simplyfy class creation.
#define OT_DECL_NODEFAULT(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:22
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
#define OT_WIDGETS_API_EXPORT
Definition OTWidgetsAPIExport.h:12
Definition ContextMenu.h:18
Definition ContextMenuManager.h:22
void actionTriggered(const std::string &_actionName)
Definition MenuCfg.h:17
Definition Connector.h:8