blob: b445a9a388c0441f5da756565fafbfe9d6f3c067 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#ifndef POPULATEMANAGER_H
#define POPULATEMANAGER_H
#include "pluginservicebase.h"
#include "sqlitestudio.h"
#include <QObject>
#include <QHash>
#include <QStringList>
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<QString, PopulateEngine*>& engines, qint64 rows);
private:
void error();
void deleteEngines(const QList<PopulateEngine*>& engines);
bool workInProgress = false;
Db* db = nullptr;
QString table;
QStringList columns;
QList<PopulateEngine*> engineList;
public slots:
void interrupt();
private slots:
void finalizePopulating(bool result);
signals:
void populatingFinished();
void populatingSuccessful();
void populatingFailed();
void orderWorkerToInterrupt();
void finishedStep(int step);
};
#define POPULATE_MANAGER SQLITESTUDIO->getPopulateManager()
#endif // POPULATEMANAGER_H
|