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 --- .../coreSQLiteStudio/services/populatemanager.h | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 SQLiteStudio3/coreSQLiteStudio/services/populatemanager.h (limited to 'SQLiteStudio3/coreSQLiteStudio/services/populatemanager.h') diff --git a/SQLiteStudio3/coreSQLiteStudio/services/populatemanager.h b/SQLiteStudio3/coreSQLiteStudio/services/populatemanager.h new file mode 100644 index 0000000..05b1f82 --- /dev/null +++ b/SQLiteStudio3/coreSQLiteStudio/services/populatemanager.h @@ -0,0 +1,48 @@ +#ifndef POPULATEMANAGER_H +#define POPULATEMANAGER_H + +#include "pluginservicebase.h" +#include "sqlitestudio.h" +#include +#include +#include + +class PopulatePlugin; +class PopulateEngine; +class Db; + +class API_EXPORT PopulateManager : public PluginServiceBase +{ + Q_OBJECT + + public: + explicit PopulateManager(QObject *parent = 0); + + void populate(Db* db, const QString& table, const QHash& engines, qint64 rows); + + private: + void error(); + void deleteEngines(const QList& engines); + + bool workInProgress = false; + Db* db = nullptr; + QString table; + QStringList columns; + QList engineList; + + public slots: + void interrupt(); + + private slots: + void finalizePopulating(bool result); + + signals: + void populatingFinished(); + void populatingSuccessful(); + void populatingFailed(); + void orderWorkerToInterrupt(); +}; + +#define POPULATE_MANAGER SQLITESTUDIO->getPopulateManager() + +#endif // POPULATEMANAGER_H -- cgit v1.2.3