diff options
| author | Brian Potchik <brian@vector35.com> | 2024-07-18 23:06:19 -0400 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2024-07-18 23:06:19 -0400 |
| commit | 5fc08034ea071119c5407898c81d0aa012512430 (patch) | |
| tree | 8aa1b5e8351cb5df68f794a82f0205f213d25869 /ui | |
| parent | 4360736956684054546340387193161131118796 (diff) | |
MemoryMap update with new segment model.
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/featuremap.h | 27 | ||||
| -rw-r--r-- | ui/logview.h | 2 |
2 files changed, 9 insertions, 20 deletions
diff --git a/ui/featuremap.h b/ui/featuremap.h index ec2f562a..e3040831 100644 --- a/ui/featuremap.h +++ b/ui/featuremap.h @@ -16,6 +16,7 @@ #include "binaryninjaapi.h" #include "dockhandler.h" +#include "notificationsdispatcher.h" #include "uitypes.h" class ContextMenuManager; @@ -38,12 +39,14 @@ class BINARYNINJAUIAPI FeatureMap : public QWidget, public BinaryNinja::BinaryDa Q_OBJECT std::vector<uint8_t> m_imageData; - QImage* m_image = nullptr; - QImage* m_staticImage = nullptr; - std::vector<std::pair<uint64_t, uint64_t>> m_regions; + std::unique_ptr<QImage> m_image = nullptr; + std::unique_ptr<QImage> m_staticImage = nullptr; + std::vector<BNAddressRange> m_ranges; SplitPaneWidget* m_owner = nullptr; BinaryViewRef m_data; + std::unique_ptr<NotificationsDispatcher> m_dispatcher = nullptr; + bool m_requestMappedRegionUpdate = false; bool m_updatesPending = false; QTimer* m_updateTimer = nullptr; @@ -65,21 +68,8 @@ class BINARYNINJAUIAPI FeatureMap : public QWidget, public BinaryNinja::BinaryDa Menu m_menu; ContextMenuManager* m_contextMenuManager; - class BackgroundRefresh : public BinaryNinja::RefCountObject - { - std::mutex m_mutex; - bool m_valid; - QPointer<FeatureMap> m_featureMap; - - public: - BackgroundRefresh(FeatureMap* featureMap); - void start(); - void abort(); - }; - - BinaryNinja::Ref<BackgroundRefresh> m_backgroundRefresh = nullptr; - void updateCoordinates(); + void updateMappedRegions(); public: FeatureMap(SplitPaneWidget* owner, BinaryViewRef data, bool vertical = true); @@ -120,7 +110,6 @@ protected: void notifyThemeUpdated(); private Q_SLOTS: - void refresh(); + void renderAnalysisData(); void updateThemeInternal(); - void updateTimerEvent(); }; diff --git a/ui/logview.h b/ui/logview.h index 3d0ce4cd..799eaf17 100644 --- a/ui/logview.h +++ b/ui/logview.h @@ -173,7 +173,7 @@ class BINARYNINJAUIAPI LogItemDelegate : public QStyledItemDelegate, public Bina ViewFrame* m_viewFrame = nullptr; View* m_view = nullptr; BinaryViewRef m_data; - std::vector<std::pair<uint64_t, uint64_t>> m_validRanges; + std::vector<BNAddressRange> m_mappedRanges; QFont m_font; int m_height; |
