Fix calling GUI methods from script thread

This commit is contained in:
2024-06-08 20:11:25 +02:00
parent 461ffea874
commit 66f0c05a48
5 changed files with 60 additions and 21 deletions
+6 -1
View File
@@ -9,6 +9,7 @@ namespace Ui { class BatchProcessing; }
class BatchProcessing : public QDialog
{
Q_OBJECT
Ui::BatchProcessing *_ui;
QString _scriptBasePath;
QFileSystemWatcher _fileWatcher;
@@ -22,7 +23,6 @@ public:
protected:
void closeEvent(QCloseEvent *event);
public slots:
void scriptDirChanged();
void addFiles();
void addDir();
void removePath();
@@ -33,6 +33,11 @@ public slots:
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);
};
#endif // BATCHPROCESSING_H