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/reportwidget.h | |
| parent | ca1bc587c22928bbd7198813064c9615c3c12771 (diff) | |
Add in progress UI API headers
Diffstat (limited to 'ui/reportwidget.h')
| -rw-r--r-- | ui/reportwidget.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ui/reportwidget.h b/ui/reportwidget.h new file mode 100644 index 00000000..22d51604 --- /dev/null +++ b/ui/reportwidget.h @@ -0,0 +1,33 @@ +#pragma once + +#include <QtWidgets/QWidget> +#include <QtWidgets/QTextBrowser> +#include <QtWidgets/QScrollArea> +#include "binaryninjaapi.h" +#include "action.h" + +class BINARYNINJAUIAPI ReportWidget: public QScrollArea, public UIActionHandler +{ + Q_OBJECT + + QTextBrowser* m_contents; + BinaryViewRef m_view; + std::string m_original; + std::string m_title; + BNReportType m_type; + std::string m_plaintext; + +private Q_SLOTS: + void onLinkClicked(QUrl url); + +public: + ReportWidget(QWidget* parent, BinaryViewRef view, const std::string& contents, + BNReportType type, const std::string& title, const std::string& plaintext = ""); + std::string getContents() const { return m_original; } + std::string getTitle() const { return m_title; } + BNReportType getType() const { return m_type; } + std::string getPlainText() const { return m_plaintext; } + + void save(); + void saveAs(); +}; |
