The catalogue now loads the list of databases en there is a table model that can show this data.

This commit is contained in:
eelke 2017-02-12 14:03:42 +01:00
parent a9430bca1a
commit 20af12535e
22 changed files with 504 additions and 118 deletions

View file

@ -1,9 +1,11 @@
#include "ServerWindow.h"
#include "ui_ServerWindow.h"
#include "OpenDatabase.h"
ServerWindow::ServerWindow(MasterController *master, QWidget *parent) :
QMainWindow(parent),
ui(new Ui::ServerWindow)
ServerWindow::ServerWindow(MasterController *master, QWidget *parent)
: ASyncWindow(parent)
, m_masterController(master)
, ui(new Ui::ServerWindow)
{
ui->setupUi(this);
}
@ -12,3 +14,16 @@ ServerWindow::~ServerWindow()
{
delete ui;
}
void ServerWindow::setConfig(const ConnectionConfig &config)
{
m_config = config;
auto res = OpenDatabase::createOpenDatabase(config);
if (res.valid()) {
m_database = res.get();
}
QString title = "pglab - ";
title += m_config.name().c_str();
setWindowTitle(title);
// newSqlPage();
}