Add migration for the sqlite database. Because the Qt SQL library is a bit hard to work with use sqlite through custom wrapper.
38 lines
814 B
C++
38 lines
814 B
C++
#ifndef MASTERCONTROLLER_H
|
|
#define MASTERCONTROLLER_H
|
|
|
|
#include <QObject>
|
|
#include <atomic>
|
|
#include <future>
|
|
#include <map>
|
|
#include <memory>
|
|
#include "sqlite/SQLiteConnection.h"
|
|
|
|
|
|
class ConnectionController;
|
|
/** \brief Controller class responsible for all things global.
|
|
*/
|
|
class MasterController : public QObject {
|
|
Q_OBJECT
|
|
public:
|
|
explicit MasterController(QObject *parent = nullptr);
|
|
MasterController(const MasterController&) = delete;
|
|
MasterController &operator=(const MasterController&) = delete;
|
|
~MasterController();
|
|
|
|
void init();
|
|
|
|
ConnectionController* connectionController();
|
|
SQLiteConnection& userConfigDatabase();
|
|
|
|
signals:
|
|
|
|
public slots:
|
|
|
|
private:
|
|
SQLiteConnection m_userConfigDatabase;
|
|
ConnectionController* m_connectionController = nullptr;
|
|
};
|
|
|
|
|
|
#endif // MASTERCONTROLLER_H
|