This further abstracts the interface. Things are reasonably stable now for frame reception. Initial work has been done to support frame transmission as well. This is currently less stable but mostly working.
52 lines
981 B
C++
52 lines
981 B
C++
#ifndef SCRIPTINGWINDOW_H
|
|
#define SCRIPTINGWINDOW_H
|
|
|
|
#include "can_structs.h"
|
|
#include "scriptcontainer.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 updatedFrames(int);
|
|
|
|
public slots:
|
|
|
|
signals:
|
|
void sendCANFrame(const 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
|