pgLab/pglab/MasterController.h
Eelke Klein 4beea05ba6 Adding in boost::asio support
main starts a thread that keep a global io_service object
running and makes sure it is stopped when everything else is
stopped.
2017-08-24 19:45:00 +02:00

47 lines
1.1 KiB
C++

#ifndef MASTERCONTROLLER_H
#define MASTERCONTROLLER_H
#include <QObject>
#include <future>
#include <map>
class ConnectionConfig;
class ConnectionList;
class ConnectionListModel;
class ConnectionManagerWindow;
/** \brief Controller class responsible for all things global.
*/
class MasterController : public QObject {
Q_OBJECT
public:
explicit MasterController(QObject *parent = 0);
MasterController(const MasterController&) = delete;
MasterController &operator=(const MasterController&) = delete;
~MasterController();
void init();
ConnectionListModel *getConnectionListModel()
{
return m_connectionListModel;
}
void showConnectionManager();
void openSqlWindowForConnection(int connection_index);
void openServerWindowForConnection(int connection_index);
void openBackupDlgForConnection(int connection_index);
signals:
public slots:
private:
ConnectionList *m_connectionList = nullptr;
ConnectionListModel *m_connectionListModel = nullptr;
ConnectionManagerWindow *m_connectionManagerWindow = nullptr;
};
#endif // MASTERCONTROLLER_H