diff options
| author | KyleMiles <krm504@nyu.edu> | 2022-01-27 22:43:28 -0500 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2022-01-28 00:24:06 -0500 |
| commit | 6812c973c9fa9b4ad642ab81856c05f87bd6fcc4 (patch) | |
| tree | dace4156d03148bcaf02df138ab4e0d93e61bc6f /ui/menus.h | |
| parent | 519c9db22367f2659d1a54599fab47e6313be06e (diff) | |
Format All Files
Diffstat (limited to 'ui/menus.h')
| -rw-r--r-- | ui/menus.h | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -12,7 +12,7 @@ #include "action.h" #include "viewframe.h" -class BINARYNINJAUIAPI ContextMenuManager: public QObject +class BINARYNINJAUIAPI ContextMenuManager : public QObject { Q_OBJECT @@ -20,8 +20,8 @@ class BINARYNINJAUIAPI ContextMenuManager: public QObject QPointer<QMenu> m_menu; MenuInstance* m_instance; -public: - ContextMenuManager(): m_parent(nullptr), m_menu(nullptr), m_instance(nullptr) { } + public: + ContextMenuManager() : m_parent(nullptr), m_menu(nullptr), m_instance(nullptr) {} ContextMenuManager(QWidget* parent); ~ContextMenuManager(); QMenu* create(); @@ -31,13 +31,13 @@ public: MenuInstance* show(QPoint pos, Menu* source, UIActionHandler* handler); bool isActive() { return !m_menu.isNull(); } -Q_SIGNALS: + Q_SIGNALS: void onOpen(); void onClose(); }; -class BINARYNINJAUIAPI MenuHelper: public QLabel +class BINARYNINJAUIAPI MenuHelper : public QLabel { Q_OBJECT @@ -48,15 +48,15 @@ class BINARYNINJAUIAPI MenuHelper: public QLabel QPalette::ColorRole m_activeForegroundRole; QPalette::ColorRole m_pressedForegroundRole; -protected: + protected: Menu m_menu; ContextMenuManager* m_contextMenuManager; QTimer* m_timer; bool m_active; bool m_pressed; -public: - MenuHelper() { } + public: + MenuHelper() {} explicit MenuHelper(QWidget* parent); void setBackgroundColorRole(QPalette::ColorRole role); @@ -66,16 +66,16 @@ public: void setActiveForegroundColorRole(QPalette::ColorRole role); void setPressedForegroundColorRole(QPalette::ColorRole role); -Q_SIGNALS: + Q_SIGNALS: void clicked(); -protected Q_SLOTS: + protected Q_SLOTS: virtual void showMenu() = 0; -private Q_SLOTS: + private Q_SLOTS: void underMouseTimerEvent(); -protected: + protected: #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) void enterEvent(QEvent* event) override; #else |
