pgLab/opendatabase.h

36 lines
781 B
C
Raw Normal View History

#ifndef OPENDATABASE_H
#define OPENDATABASE_H
#include <QObject>
#include "connectionconfig.h"
#include "expected.h"
class PgsqlDatabaseCatalogue;
/** Instances of this class represent a single database on which atleast one
* window is opened. This class is used to track details about that database.
*/
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