Added page with the types (no details yet)

This commit is contained in:
eelke 2021-04-01 14:58:42 +02:00
parent bdef76ed8a
commit 4c175d8c2c
16 changed files with 418 additions and 11 deletions

View file

@ -5,6 +5,7 @@
#include "widgets/CatalogNamespacePage.h"
#include "widgets/CatalogSequencesPage.h"
#include "widgets/CatalogTablesPage.h"
#include "widgets/CatalogTypesPage.h"
#include <QApplication>
#include <QTabWidget>
@ -20,6 +21,7 @@ CatalogInspector::CatalogInspector(std::shared_ptr<OpenDatabase> open_database,
m_tablesPage = new CatalogTablesPage(this);
m_functionsPage = new CatalogFunctionsPage(this);
m_sequencesPage = new CatalogSequencesPage(this);
m_typesPage = new CatalogTypesPage(this);
auto layout = new QVBoxLayout(this);
setLayout(layout);
@ -28,6 +30,7 @@ CatalogInspector::CatalogInspector(std::shared_ptr<OpenDatabase> open_database,
m_tabWidget->addTab(m_tablesPage, "");
m_tabWidget->addTab(m_functionsPage, "");
m_tabWidget->addTab(m_sequencesPage, "");
m_tabWidget->addTab(m_typesPage, "");
setCatalog(open_database->catalog());
retranslateUi(false);
@ -45,6 +48,8 @@ void CatalogInspector::retranslateUi(bool all)
QApplication::translate("CatalogInspector", "Functions", nullptr));
m_tabWidget->setTabText(m_tabWidget->indexOf(m_sequencesPage),
QApplication::translate("CatalogInspector", "Sequences", nullptr));
m_tabWidget->setTabText(m_tabWidget->indexOf(m_typesPage),
QApplication::translate("CatalogInspector", "Types", nullptr));
}
CatalogInspector::~CatalogInspector()
@ -58,6 +63,7 @@ void CatalogInspector::setCatalog(std::shared_ptr<PgDatabaseCatalog> cat)
m_tablesPage->setCatalog(cat);
m_functionsPage->setCatalog(cat);
m_sequencesPage->setCatalog(cat);
m_typesPage->setCatalog(cat);
}
void CatalogInspector::setNamespaceFilter(NamespaceFilter filter)