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
32
pglab/serverinspector/DatabasesPage.cpp
Normal file
32
pglab/serverinspector/DatabasesPage.cpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#include "DatabasesPage.h"
|
||||
|
||||
#include "DatabasesTableModel.h"
|
||||
#include "catalog/PgDatabaseCatalog.h"
|
||||
#include "PgLabTableView.h"
|
||||
|
||||
|
||||
DatabasesPage::DatabasesPage(QWidget * parent)
|
||||
: QSplitter(Qt::Horizontal, parent)
|
||||
, m_databasesTableView(this)
|
||||
{
|
||||
auto tv = m_databasesTableView.tableView();
|
||||
tv->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
|
||||
m_detailsTabs = new QTabWidget(this);
|
||||
|
||||
addWidget(tv);
|
||||
addWidget(m_detailsTabs);
|
||||
}
|
||||
|
||||
void DatabasesPage::setCatalog(std::shared_ptr<PgDatabaseCatalog> cat)
|
||||
{
|
||||
m_catalog = cat;
|
||||
m_databasesTableView.dataModel()->setDatabaseList(cat);
|
||||
m_databasesTableView.tableView()->resizeColumnsToContents();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue