#ifndef BATCHPROCESSING_H #define BATCHPROCESSING_H #include #include #include "scriptengine.h" namespace Ui { class BatchProcessing; } class Database; class BatchProcessing : public QDialog { Q_OBJECT Ui::BatchProcessing *_ui; QString _scriptBasePath; QFileSystemWatcher _fileWatcher; Script::ScriptEngineThread *_engineThread = nullptr; QColor _textColor; Database *_database; private slots: void scanScriptDir(); public: explicit BatchProcessing(Database *database, QWidget *parent = nullptr); ~BatchProcessing(); protected: void closeEvent(QCloseEvent *event); public slots: void addFiles(); void addDir(); void removePath(); void removeAllPaths(); void browse(); void openScriptDir(); void runScript(); void stopScript(); void scriptFinished(); void newMessage(const QString &message, bool error); QJSValue getString(const QString &label, const QString &text); QJSValue getInt(const QString &label, int value); QJSValue getFloat(const QString &label, double value, int decimals); QJSValue getItem(const QStringList &items, const QString &label, int current); void plot(const QVariant &graph); }; void openDir(const QString &path); #endif // BATCHPROCESSING_H