pgLab/pglab/MasterController.h
eelke aac55b0ed1 Store connection configuration as key value pairs
Add migration for the sqlite database.
Because the Qt SQL library is a bit hard to work with use sqlite through custom wrapper.
2025-02-22 19:59:24 +01:00

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