From f647755655df27af2e5b55af12e19d06acb76930 Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Thu, 3 Nov 2022 16:52:25 -0400 Subject: Add ability to quiesce views not active in a ViewFrame. --- ui/viewframe.h | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'ui/viewframe.h') diff --git a/ui/viewframe.h b/ui/viewframe.h index 341caf2e..7be57ed1 100644 --- a/ui/viewframe.h +++ b/ui/viewframe.h @@ -121,6 +121,8 @@ class BINARYNINJAUIAPI View bool m_binaryDataNavigable = false; QPointer m_transformParamDialog; + QTimer* m_updateTimer = nullptr; + bool writeDataToClipboard(const BinaryNinja::DataBuffer& data, bool binary, TransformRef xform); BinaryNinja::DataBuffer readDataFromClipboard(TransformRef xform); @@ -137,6 +139,10 @@ class BINARYNINJAUIAPI View View(); virtual ~View() {} + void enableRefreshTimer(QWidget* owner, int interval); + void setRefreshQuiesce(bool enable); + virtual void notifyRefresh() {}; + void setupView(QWidget* widget); virtual bool canAssemble() { return false; } @@ -244,16 +250,8 @@ class BINARYNINJAUIAPI View void forceSyncFromView(ViewFrame* frame = nullptr); virtual void clearRelatedHighlights() {} - virtual void setRelatedIndexHighlights(FunctionRef func, const std::set& related) - { - (void)func; - (void)related; - } - virtual void setRelatedInstructionHighlights(FunctionRef func, const std::set& related) - { - (void)func; - (void)related; - } + virtual void setRelatedIndexHighlights(FunctionRef func, const std::set& related) { (void)func; (void)related; } + virtual void setRelatedInstructionHighlights(FunctionRef func, const std::set& related) { (void)func; (void)related; } static void registerActions(); static void registerLateActions(); @@ -441,14 +439,11 @@ class BINARYNINJAUIAPI ViewFrame : public QWidget } bool navigate(const QString& type, uint64_t offset, bool updateInfo = true, bool addHistoryEntry = true); - bool navigate(const QString& type, const std::function& handler, bool updateInfo = true, - bool addHistoryEntry = true); + bool navigate(const QString& type, const std::function& handler, bool updateInfo = true, bool addHistoryEntry = true); bool navigate(BinaryViewRef data, uint64_t offset, bool updateInfo = true, bool addHistoryEntry = true); bool navigateToFunction(FunctionRef func, uint64_t offset, bool updateInfo = true, bool addHistoryEntry = true); - bool goToReference( - BinaryViewRef data, FunctionRef func, uint64_t source, uint64_t target, bool addHistoryEntry = true); - bool navigateToViewLocation( - BinaryViewRef data, const ViewLocation& viewLocation, bool addHistoryEntry = true, bool center = false); + bool goToReference(BinaryViewRef data, FunctionRef func, uint64_t source, uint64_t target, bool addHistoryEntry = true); + bool navigateToViewLocation(BinaryViewRef data, const ViewLocation& viewLocation, bool addHistoryEntry = true, bool center = false); bool navigateToHistoryEntry(BinaryNinja::Ref entry); QString getTypeForView(QWidget* view) const; QString getDataTypeForView(const QString& type) const; -- cgit v1.3.1