diff options
| author | Rusty Wagner <rusty@vector35.com> | 2019-03-19 15:41:08 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2019-03-20 13:00:17 -0400 |
| commit | 411acbaa4a1d217e731d3df0b189445117be3b26 (patch) | |
| tree | 49b5c5290058ffb98dd23ec9a7c1a49921254d15 /ui/compiledialog.h | |
| parent | ca1bc587c22928bbd7198813064c9615c3c12771 (diff) | |
Add in progress UI API headers
Diffstat (limited to 'ui/compiledialog.h')
| -rw-r--r-- | ui/compiledialog.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/ui/compiledialog.h b/ui/compiledialog.h new file mode 100644 index 00000000..c5d2123a --- /dev/null +++ b/ui/compiledialog.h @@ -0,0 +1,49 @@ +#pragma once + +#include <QtWidgets/QDialog> +#include <QtWidgets/QComboBox> +#include <QtWidgets/QLabel> +#include <set> +#include "binaryninjaapi.h" +#include "dialogtextedit.h" +#include "uicontext.h" + +enum CompileMode +{ + CompileStandalone, + CompilePatch +}; + +class BINARYNINJAUIAPI CompileDialog: public QDialog +{ + Q_OBJECT + + BinaryViewRef m_view; + uint64_t m_addr; + QComboBox* m_arch; + QComboBox* m_os; + DialogTextEdit* m_code; + QLabel* m_optionsText; + bool m_saveOSSetting; + std::map<std::string, std::string> m_options; + std::set<std::string> m_unsavedOptions; + BinaryNinja::DataBuffer m_bytes; + bool m_setDefault; + + void appendOptionString(std::string& out, const std::string& text); + void updateOptionsText(); + +public: + CompileDialog(QWidget* parent, BinaryViewRef data, uint64_t addr, CompileMode mode, const QString& code = ""); + + ArchitectureRef getArchitecture(); + const BinaryNinja::DataBuffer& getBytes() const { return m_bytes; } + +private Q_SLOTS: + void saveOnFinish(int result); + void compile(); + void options(); + +protected: + virtual void accept() override; +}; |
