diff options
| author | Chinmay <chinmay1dd@gmail.com> | 2020-08-17 22:53:09 -0700 |
|---|---|---|
| committer | Chinmay Deshpande <chinmay1dd@gmail.com> | 2020-09-08 09:29:18 -0700 |
| commit | 73b649e79d5cd219cb56866abf2ee5e6a64d976a (patch) | |
| tree | 07bbd8c4e5f8b6d743760a3e226a975cc83c2c15 /ui/possiblevaluesetdialog.h | |
| parent | 62aa529de8a169578c80b14e3969b076f65be205 (diff) | |
UI changes for user-informed dataflow
Diffstat (limited to 'ui/possiblevaluesetdialog.h')
| -rw-r--r-- | ui/possiblevaluesetdialog.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/ui/possiblevaluesetdialog.h b/ui/possiblevaluesetdialog.h new file mode 100644 index 00000000..5b5550a3 --- /dev/null +++ b/ui/possiblevaluesetdialog.h @@ -0,0 +1,60 @@ +#pragma once + +#include <QtWidgets/QDialog> +#include <QtWidgets/QLabel> +#include <QtCore/QStringListModel> +#include <QtWidgets/QComboBox> +#include <QtWidgets/QLineEdit> +#include <QtCore/QTimer> +#include <QtCore/QThread> +#include <QToolTip> +#include "binaryninjaapi.h" +#include "dialogtextedit.h" +#include "clickablelabel.h" + +class BINARYNINJAUIAPI PossibleValueSetDialog: public QDialog +{ + Q_OBJECT + + QComboBox* m_combo; + QLineEdit* m_value; + QStringListModel* m_model; + QLabel* m_prompt; + QString m_promptText; + ClickableLabel* m_valueLabel; + BinaryViewRef m_view; + bool m_resultValid; + QStringList m_historyEntries; + int m_historySize; + QFont m_defaultFont; + bool m_initialTextSelection; + BinaryNinja::PossibleValueSet m_valueSet; + QPushButton* m_acceptButton; + QPalette m_defaultPalette; + QString m_parseError; + uint64_t m_here; + QTimer* m_updateTimer; + +private Q_SLOTS: + void accepted(); + void checkParse(); + void updateTimerEvent(); + void showHelp(); + void stateChanged(const QString&); + +public: + PossibleValueSetDialog(QWidget* parent, BinaryViewRef view, uint64_t here); + BinaryNinja::PossibleValueSet getPossibleValueSet() const { return m_valueSet; } + static BNRegisterValueType getRegisterValueTypeFromString(const std::string& stateStr); +}; + +static const QStringList valueSets = { + "ConstantValue", + "ConstantPointerValue", + "StackFrameOffset", + "SignedRangeValue", + "UnsignedRangeValue", + "InSetOfValues", + "NotInSetOfValues", + "UndeterminedValue", +}; |
