From 7167ce41b61d2ba2cdb526777a4233eb84a3b66a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Sat, 6 Dec 2014 17:33:25 -0500 Subject: Imported Upstream version 2.99.6 --- SQLiteStudio3/coreSQLiteStudio/populateworker.h | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 SQLiteStudio3/coreSQLiteStudio/populateworker.h (limited to 'SQLiteStudio3/coreSQLiteStudio/populateworker.h') diff --git a/SQLiteStudio3/coreSQLiteStudio/populateworker.h b/SQLiteStudio3/coreSQLiteStudio/populateworker.h new file mode 100644 index 0000000..f0a39f8 --- /dev/null +++ b/SQLiteStudio3/coreSQLiteStudio/populateworker.h @@ -0,0 +1,41 @@ +#ifndef POPULATEWORKER_H +#define POPULATEWORKER_H + +#include +#include +#include +#include + +class Db; +class PopulateEngine; + +class PopulateWorker : public QObject, public QRunnable +{ + Q_OBJECT + public: + explicit PopulateWorker(Db* db, const QString& table, const QStringList& columns, const QList& engines, qint64 rows, QObject *parent = 0); + ~PopulateWorker(); + + void run(); + + private: + bool isInterrupted(); + bool beforePopulating(); + void afterPopulating(); + + Db* db = nullptr; + QString table; + QStringList columns; + QList engines; + qint64 rows; + bool interrupted = false; + QMutex interruptMutex; + + public slots: + void interrupt(); + + signals: + void finished(bool result); +}; + +#endif // POPULATEWORKER_H -- cgit v1.2.3