pgLab/opendatabase.h
Eelke Klein 6370050204 Introduced the MasterController as part of working on loading catalogue information.
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.
2017-02-01 18:01:02 +01:00

32 lines
622 B
C++

#ifndef OPENDATABASE_H
#define OPENDATABASE_H
#include <QObject>
#include "connectionconfig.h"
#include "expected.h"
class PgsqlDatabaseCatalogue;
class OpenDatabase : public QObject
{
Q_OBJECT
public:
static Expected<OpenDatabase*> createOpenDatabase(const ConnectionConfig &cfg);
OpenDatabase(const OpenDatabase &) = delete;
OpenDatabase& operator=(const OpenDatabase &) = delete;
~OpenDatabase();
signals:
public slots:
private:
ConnectionConfig m_config;
PgsqlDatabaseCatalogue *m_catalogue;
OpenDatabase(const ConnectionConfig& cfg, QObject *parent = 0);
bool Init();
};
#endif // OPENDATABASE_H