From 644f9709668eca8c206d662bf40361180ed1cb8c Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Thu, 7 Oct 2021 12:57:07 -0600 Subject: Replace log/scripting console dock widgets with global area concept --- ui/logview.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'ui/logview.h') diff --git a/ui/logview.h b/ui/logview.h index c0ff7768..bf9d4627 100644 --- a/ui/logview.h +++ b/ui/logview.h @@ -14,7 +14,7 @@ #include "binaryninjaapi.h" #include "action.h" -#include "dockhandler.h" +#include "globalarea.h" #define LOG_UPDATE_INTERVAL 100 @@ -102,13 +102,13 @@ public Q_SLOTS: }; -class BINARYNINJAUIAPI LogView: public QListView, public DockContextHandler +class BINARYNINJAUIAPI LogView: public GlobalAreaWidget { Q_OBJECT - Q_INTERFACES(DockContextHandler) QPointer m_logStatus; std::vector> m_actionEnableList; + QListView* m_list; LogListModel* m_listModel; LogItemDelegate* m_itemDelegate; QTimer* m_updateTimer; @@ -118,7 +118,7 @@ class BINARYNINJAUIAPI LogView: public QListView, public DockContextHandler bool m_hasSelection = false; public: - LogView(QWidget* parent, LogStatus* logStatus); + LogView(LogStatus* logStatus); virtual void copy(); virtual bool canCopy(); @@ -128,12 +128,15 @@ public: static bool IsHexString(const QString& str, std::pair offsetLen); static bool StartsWith0x(const QString& str, std::pair offsetLen); -protected: - void contextMenuEvent(QContextMenuEvent* event) override; void notifyFontChanged() override; void notifyThemeChanged() override; void notifyViewChanged(ViewFrame* frame) override; - void notifyVisibilityChanged(bool visible) override; + void focus() override; + + LogListModel* model() { return m_listModel; } + +protected: + void contextMenuEvent(QContextMenuEvent* event) override; Q_SIGNALS: void notifyUiStatus(); -- cgit v1.3.1