forked from jbendig/InvGrid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScriptWidget.h
More file actions
35 lines (28 loc) · 735 Bytes
/
ScriptWidget.h
File metadata and controls
35 lines (28 loc) · 735 Bytes
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
#ifndef SCRIPTWIDGET_H
#define SCRIPTWIDGET_H
#include <QtGui>
namespace NBT
{
class Tag;
};
class ScriptWidget : public QWidget
{
Q_OBJECT;
public:
ScriptWidget();
~ScriptWidget();
void SetInventoryTag(NBT::Tag* inventoryTag);
signals:
void SaveToInventoryTag(); //Emitted before script is run so script can see the current state of the inventory.
void ReloadFromInventoryTag(); //Emitted after script is run so other widgets can stay in sync.
public slots:
void RunScript();
void GenerateScriptFromInventory();
private:
QPlainTextEdit* scriptTextEdit;
QTextEdit* consoleTextEdit;
NBT::Tag* inventoryTag;
void SaveScript(const QString fileName);
void LoadScript(const QString fileName);
};
#endif