forked from collin80/SavvyCAN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scriptingwindow.h
45 lines (36 loc) · 991 Bytes
/
scriptingwindow.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
#ifndef SCRIPTINGWINDOW_H
#define SCRIPTINGWINDOW_H
#include "can_structs.h"
#include "scriptcontainer.h"
#include "connections/canconnection.h"
#include <QDialog>
#include <QJSEngine>
namespace Ui {
class ScriptingWindow;
}
class ScriptingWindow : public QDialog
{
Q_OBJECT
public:
explicit ScriptingWindow(const QVector<CANFrame> *frames, QWidget *parent = 0);
void showEvent(QShowEvent*);
~ScriptingWindow();
private slots:
void loadNewScript();
void createNewScript();
void deleteCurrentScript();
void refreshSourceWindow();
void saveScript();
void revertScript();
void recompileScript();
void newFrames(const CANConnection*, const QVector<CANFrame>&);
private:
void closeEvent(QCloseEvent *event);
void readSettings();
void writeSettings();
Ui::ScriptingWindow *ui;
QList<ScriptContainer *> scripts;
ScriptContainer *currentScript;
const QVector<CANFrame> *modelFrames;
};
#endif // SCRIPTINGWINDOW_H