-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwinghexpy.h
69 lines (58 loc) · 1.7 KB
/
winghexpy.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef GENERICPLUGIN_H
#define GENERICPLUGIN_H
#include "../WingHexExplorer/WingHexExplorer/plugin/iwingplugin.h"
#include "PythonQt/gui/PythonQtScriptingConsole.h"
#include "plginterface.h"
#include "scriptmanager.h"
#include <Python.h>
#include <QListWidget>
#include <QTableWidget>
#include <QTextBrowser>
#include <QTreeWidget>
class WingHexPy : public IWingPlugin {
Q_OBJECT
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID IWINGPLUGIN_INTERFACE_IID FILE "WingHexPy.json")
#endif // QT_VERSION >= 0x050000
Q_INTERFACES(IWingPlugin)
public:
WingHexPy(QObject *parent = nullptr);
int sdkVersion() override;
bool init(QList<WingPluginInfo> loadedplugin) override;
~WingHexPy() override;
void unload() override;
QMenu *registerMenu() override;
QToolBar *registerToolBar() override;
Qt::ToolBarArea registerToolBarArea() override;
void
registerDockWidget(QHash<QDockWidget *, Qt::DockWidgetArea> &rdw) override;
const QString pluginName() override;
const QString pluginAuthor() override;
uint pluginVersion() override;
const QString signature() override;
const QString pluginComment() override;
void plugin2MessagePipe(WingPluginMessage type, QList<QVariant> msg) override;
public:
void log(QString message);
void on_about();
void on_sponsor();
public:
void RunPyFile(QString filename);
void RunPyText(QString content);
private:
PlgInterface *plgint;
QMenu *menu;
QToolBar *tb;
QDockWidget *dw;
PythonQtScriptingConsole *txt;
ScriptManager *smanager;
private:
QDockWidget *dlist, *dtree, *dtable, *dtxt;
QListWidget *infolist;
QTreeWidget *infotree;
QTableWidget *infotable;
QTextBrowser *infotxt;
private:
void runPyFile();
};
#endif // GENERICPLUGIN_H