Have a working model for showing the namespaces in a tree with checkboxes.

The namespaces are currently spit into user and system. Later we might
add recognizing namespaces introduced by specific modules/extensions.
This commit is contained in:
eelke 2017-12-29 08:39:08 +01:00
parent 4e1120647c
commit b5254ac723
9 changed files with 414 additions and 5 deletions

View file

@ -2,9 +2,11 @@
#include "ui_TablesPage.h"
#include "PgAttribute.h"
#include "PgDatabaseCatalog.h"
#include "TablesTableModel.h"
#include "ResultTableModelUtil.h"
#include "ColumnTableModel.h"
#include "NamespaceFilterWidget.h"
TablesPage::TablesPage(QWidget *parent) :
QWidget(parent),
@ -20,6 +22,10 @@ TablesPage::TablesPage(QWidget *parent) :
m_columnsModel = new ColumnTableModel(this);
ui->columnsTable->setModel(m_columnsModel);
m_namespaceFilterWidget = new NamespaceFilterWidget(this);
ui->verticalLayoutTableView->addWidget(m_namespaceFilterWidget);
connect(ui->tableListTable->selectionModel(), &QItemSelectionModel::currentRowChanged, this,
&TablesPage::on_tableListTable_currentRowChanged);
@ -35,6 +41,7 @@ void TablesPage::setCatalog(std::shared_ptr<PgDatabaseCatalog> cat)
m_catalog = cat;
m_tablesModel->setCatalog(cat);
ui->tableListTable->resizeColumnsToContents();
m_namespaceFilterWidget->init(cat->namespaces());
}
void TablesPage::on_tableListTable_currentRowChanged(const QModelIndex &current, const QModelIndex &previous)