Add ability to set script parameters that can be changed and monitored

in realtime from SavvyCAN.
This commit is contained in:
Collin Kidder
2017-09-03 16:46:43 -04:00
parent 08752f7d6f
commit 8b3a22ccb0
4 changed files with 105 additions and 1 deletions
+8
View File
@@ -83,10 +83,17 @@ public:
QString filePath;
QString scriptText;
/*
Anything registered as a public slot on this class and that takes either no arguments
or only QJSValue arguments will be callable from scripts via host.XXX calls. So, have at it, champ.
*/
public slots:
void compileScript();
void setTickInterval(QJSValue interval);
void log(QJSValue logString);
void addParameter(QJSValue name);
void updateValuesTable(QTableWidget *widget);
void updateParameter(QString name, QString value);
signals:
void sendLog(QString text);
@@ -104,6 +111,7 @@ private:
CANScriptHelper *canHelper;
ISOTPScriptHelper *isoHelper;
UDSScriptHelper *udsHelper;
QVector<QString> scriptParams;
};
#endif // SCRIPTCONTAINER_H