summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/action.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/ui/action.h b/ui/action.h
index 49f58b6a..766c240b 100644
--- a/ui/action.h
+++ b/ui/action.h
@@ -190,6 +190,20 @@ enum ActionPriority
HighActionPriority
};
+class UIActionHandler;
+
+class BINARYNINJAUIAPI UIActionHandlerWidgetConnection : public QObject
+{
+ Q_OBJECT
+
+ UIActionHandler* m_handler;
+ friend class UIActionHandler;
+
+public:
+ UIActionHandlerWidgetConnection(QWidget* widget, UIActionHandler* handler);
+ virtual ~UIActionHandlerWidgetConnection();
+};
+
/*!
\ingroup action
*/
@@ -200,12 +214,15 @@ class BINARYNINJAUIAPI UIActionHandler
std::map<QString, std::function<QString(const UIActionContext&)>> m_actionDisplayNames;
std::map<QString, std::function<bool(const UIActionContext&)>> m_checked;
QWidget* m_handlerWidget;
+ UIActionHandlerWidgetConnection* m_handlerWidgetConnection = nullptr;
std::map<QString, std::vector<QShortcut*>> m_handlerWidgetShortcuts;
UIActionHandler* m_parent;
std::set<UIActionHandler*> m_children;
bool m_isGlobal, m_inheritParentBindings;
std::function<UIActionContext()> m_actionContextOverride;
+ friend class UIActionHandlerWidgetConnection;
+
static std::map<QString, std::set<UIActionHandler*>> m_actionBindings;
static std::set<QString> m_globalMenuActions;