List of databases and roles moved to a "Server tab" within the database window.
Opened by selecting "Inspect Server" from the menu.
This commit is contained in:
parent
50cd865b1a
commit
f0e5488ce0
12 changed files with 271 additions and 2 deletions
44
pglab/serverinspector/ServerInspector.cpp
Normal file
44
pglab/serverinspector/ServerInspector.cpp
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#include "ServerInspector.h"
|
||||
#include "DatabasesPage.h"
|
||||
#include "OpenDatabase.h"
|
||||
#include "RolesPage.h"
|
||||
|
||||
#include <QTabWidget>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
ServerInspector::ServerInspector(std::shared_ptr<OpenDatabase> open_database, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
m_databasesPage = new DatabasesPage(this);
|
||||
m_rolesPage = new RolesPage(this);
|
||||
|
||||
m_tabWidget = new QTabWidget(this);
|
||||
m_tabWidget->addTab(m_databasesPage, tr("Databases"));
|
||||
m_tabWidget->addTab(m_rolesPage, tr("Roles"));
|
||||
|
||||
auto layout = new QVBoxLayout(this);
|
||||
setLayout(layout);
|
||||
layout->addWidget(m_tabWidget);
|
||||
|
||||
setCatalog(open_database->catalog());
|
||||
retranslateUi(false);
|
||||
}
|
||||
|
||||
|
||||
void ServerInspector::setCatalog(std::shared_ptr<PgDatabaseCatalog> cat)
|
||||
{
|
||||
m_catalog = cat;
|
||||
m_databasesPage->setCatalog(cat);
|
||||
m_rolesPage->setCatalog(cat);
|
||||
// m_tablesPage->setCatalog(cat);
|
||||
// m_functionsPage->setCatalog(cat);
|
||||
// m_sequencesPage->setCatalog(cat);
|
||||
// m_typesPage->setCatalog(cat);
|
||||
}
|
||||
|
||||
void ServerInspector::retranslateUi(bool )
|
||||
{
|
||||
// m_tabWidget->setTabText(m_tabWidget->indexOf(m_namespacePage),
|
||||
// QApplication::translate("CatalogInspector", "Schemas", nullptr));
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue