Need a central piece to manage the catalogue data per database to prevent loading this multiple times. MasterController is now also used to enable reopening the connection manager from a query window after the connection manager has been closed.
36 lines
626 B
C++
36 lines
626 B
C++
#ifndef MASTERCONTROLLER_H
|
|
#define MASTERCONTROLLER_H
|
|
|
|
#include <QObject>
|
|
#include <map>
|
|
|
|
class ConnectionConfig;
|
|
class ConnectionListModel;
|
|
class ConnectionManagerWindow;
|
|
|
|
class MasterController : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit MasterController(QObject *parent = 0);
|
|
~MasterController();
|
|
|
|
void init();
|
|
|
|
ConnectionListModel *getConnectionListModel()
|
|
{
|
|
return m_connectionListModel;
|
|
}
|
|
|
|
void showConnectionManager();
|
|
|
|
signals:
|
|
|
|
public slots:
|
|
|
|
private:
|
|
ConnectionListModel *m_connectionListModel = nullptr;
|
|
ConnectionManagerWindow *m_connectionManagerWindow = nullptr;
|
|
};
|
|
|
|
#endif // MASTERCONTROLLER_H
|