diff options
| author | Brian Potchik <brian@vector35.com> | 2021-01-31 17:50:23 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2021-01-31 17:50:23 -0500 |
| commit | e62e6826f1ef0f5476c54e42019842af26f7e223 (patch) | |
| tree | bd638456a9194bb1ec8f5bff0c654b4e8c8c3b68 | |
| parent | 8ad0a01345c6d37aaf5a3954d596d8be4a28fdcb (diff) | |
Cleanup and refactor file contents write lock.
| -rw-r--r-- | ui/viewframe.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ui/viewframe.h b/ui/viewframe.h index b2a485ba..0ce65c3d 100644 --- a/ui/viewframe.h +++ b/ui/viewframe.h @@ -28,6 +28,7 @@ public: class AssembleDialog; +class ClickableLabel; class CompileDialog; class DockHandler; class FeatureMap; @@ -42,7 +43,6 @@ protected: Menu m_contextMenu; UIActionHandler m_actionHandler; bool m_binaryDataNavigable = false; - bool m_writeTraction = true; QPointer<TransformParameterDialog> m_transformParamDialog; bool writeDataToClipboard(const BinaryNinja::DataBuffer& data, bool binary, TransformRef xform); @@ -84,8 +84,6 @@ public: virtual bool goToReference(FunctionRef func, uint64_t source, uint64_t target); virtual bool navigateToViewLocation(const ViewLocation& viewLocation) { return false; } - bool isWriteTractionEnabled() { return m_writeTraction; } - void setWriteTractionEnabled(bool enable) { m_writeTraction = enable; } bool isBinaryDataNavigable() { return m_binaryDataNavigable; } void setBinaryDataNavigable(bool navigable) { m_binaryDataNavigable = navigable; } @@ -227,6 +225,8 @@ private: HistoryEntry* getHistoryEntry(); FileContext* m_context; + bool m_fileContentsLock = true; // file contents protection from accidental modification in the UI + ClickableLabel* m_fileContentsLockStatus; BinaryViewRef m_data; DockHandler* m_docks; QWidget* m_view; @@ -254,6 +254,10 @@ public: virtual ~ViewFrame(); FileContext* getFileContext() const { return m_context; } + bool areFileContentsLocked() { return m_fileContentsLock; } + void setFileContentsLocked(bool enable) { m_fileContentsLock = enable; } + QWidget* getFileContentsLockStatus(); + DockHandler* getDockHandler() const { return m_docks; } QString getTabName(); |
