2017-02-01 18:01:02 +01:00
|
|
|
|
#ifndef MASTERCONTROLLER_H
|
|
|
|
|
|
#define MASTERCONTROLLER_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
2018-11-08 21:50:49 +01:00
|
|
|
|
#include <QSqlDatabase>
|
|
|
|
|
|
#include <atomic>
|
2017-08-24 19:45:00 +02:00
|
|
|
|
#include <future>
|
2017-02-01 18:01:02 +01:00
|
|
|
|
#include <map>
|
2018-11-08 21:50:49 +01:00
|
|
|
|
#include <memory>
|
2017-02-01 18:01:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
2019-08-19 10:05:05 +02:00
|
|
|
|
class ConnectionController;
|
2017-02-01 19:59:07 +01:00
|
|
|
|
/** \brief Controller class responsible for all things global.
|
|
|
|
|
|
*/
|
2017-02-26 19:29:50 +01:00
|
|
|
|
class MasterController : public QObject {
|
2017-02-01 18:01:02 +01:00
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
2018-11-04 11:26:20 +01:00
|
|
|
|
explicit MasterController(QObject *parent = nullptr);
|
2017-02-26 19:29:50 +01:00
|
|
|
|
MasterController(const MasterController&) = delete;
|
|
|
|
|
|
MasterController &operator=(const MasterController&) = delete;
|
2017-02-01 18:01:02 +01:00
|
|
|
|
~MasterController();
|
|
|
|
|
|
|
|
|
|
|
|
void init();
|
|
|
|
|
|
|
2019-08-19 10:05:05 +02:00
|
|
|
|
ConnectionController* connectionController();
|
|
|
|
|
|
QSqlDatabase& userConfigDatabase();
|
|
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
QSqlDatabase m_userConfigDatabase;
|
|
|
|
|
|
ConnectionController* m_connectionController = nullptr;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2017-02-01 18:01:02 +01:00
|
|
|
|
|
|
|
|
|
|
#endif // MASTERCONTROLLER_H
|