Double clicking a table now opens a CRUD page for that table however data cannot be changed yet thought it will display an editbox.

This commit is contained in:
eelke 2018-01-09 20:39:43 +01:00
parent abd4020ddf
commit 2ba27178a2
13 changed files with 288 additions and 33 deletions

View file

@ -14,6 +14,7 @@
#include "QueryTab.h"
#include "util.h"
#include "MasterController.h"
#include "CrudTab.h"
#include "WorkManager.h"
#include "ScopeGuard.h"
@ -45,7 +46,13 @@ QueryTab* MainWindow::newSqlPage()
return qt;
}
void MainWindow::newCrudPage(const PgClass &table)
{
CrudTab *ct = new CrudTab(this);
ct->setConfig(m_database, table);
ui->tabWidget->addTab(ct, "CRUD");
ui->tabWidget->setCurrentWidget(ct);
}
QueryTab *MainWindow::GetActiveQueryTab()
{
@ -85,6 +92,7 @@ void MainWindow::catalogLoaded()
ui->tabWidget->addTab(tt, "Tables");
ui->tabWidget->setCurrentWidget(tt);
newSqlPage();
} catch (std::runtime_error &ex) {
QMessageBox::critical(this, "Error reading database",