diff options
| author | Brian Knudson <bk@vector35.com> | 2021-03-18 11:23:59 -0400 |
|---|---|---|
| committer | Brian Knudson <bk@vector35.com> | 2021-03-18 14:38:06 -0400 |
| commit | 4bc108e48a80aed3c59ca9c03867b7a312392e97 (patch) | |
| tree | 017da2e02940ce9e89314dfdb0b88ced248c290d /ui/addressdialog.h | |
| parent | ca369aced1654ffe89d473a03ff2ac1b54bf1200 (diff) | |
Add Go to File Offset action
Diffstat (limited to 'ui/addressdialog.h')
| -rw-r--r-- | ui/addressdialog.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ui/addressdialog.h b/ui/addressdialog.h index e3d02338..eee9d836 100644 --- a/ui/addressdialog.h +++ b/ui/addressdialog.h @@ -75,3 +75,36 @@ public: ~AddressDialogWithPreview() { delete m_updateThread; } uint64_t getOffset() const { return m_addr; } }; + +class BINARYNINJAUIAPI FileOffsetDialogWithPreview: public QDialog +{ + Q_OBJECT + + QComboBox* m_combo; + QLabel* m_previewText; + BinaryViewRef m_view; + uint64_t m_fileOffset; + uint64_t m_here; + bool m_resultValid; + QTimer* m_updateTimer; + QStringList m_historyEntries; + int m_historySize; + QColor m_defaultColor; + QFont m_defaultFont; + QString m_prompt; + bool m_initialTextSelection; + + void commitHistory(); + +private Q_SLOTS: + void updateTimerEvent(); + void accepted(); + void updatePreview(); + void updatePreview(QString data); + +public: + FileOffsetDialogWithPreview(QWidget* parent, BinaryViewRef view, uint64_t here, + const QString& title = "Go to File Offset", const QString& prompt = "Enter Expression", bool defaultToCurrent = false); + ~FileOffsetDialogWithPreview() {} + uint64_t getOffset() const { return m_fileOffset; } +};
\ No newline at end of file |
