WIP: Added page showing list of functions.
Only list is shown, still working on details.
This commit is contained in:
parent
7db859737a
commit
840af1e0a9
19 changed files with 635 additions and 92 deletions
40
pglab/FunctionsPage.cpp
Normal file
40
pglab/FunctionsPage.cpp
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#include "FunctionsPage.h"
|
||||
#include "ResultTableModelUtil.h"
|
||||
#include "CustomFilterSortModel.h"
|
||||
#include "CustomDataRole.h"
|
||||
#include "PgLabItemDelegate.h"
|
||||
#include "ProcTableModel.h"
|
||||
#include <QTableView>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
FunctionsPage::FunctionsPage(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
|
||||
m_functionTable = new QTableView(this);
|
||||
SetTableViewDefault(m_functionTable);
|
||||
|
||||
m_model = new ProcTableModel(this);
|
||||
m_sortFilterProxy = new CustomFilterSortModel(this);
|
||||
m_sortFilterProxy->setSourceModel(m_model);
|
||||
m_functionTable->setModel(m_sortFilterProxy);
|
||||
m_functionTable->setSortingEnabled(true);
|
||||
m_functionTable->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
|
||||
auto item_delegate = new PgLabItemDelegate(this);
|
||||
m_functionTable->setItemDelegate(item_delegate);
|
||||
|
||||
auto mainLayout = new QVBoxLayout;
|
||||
mainLayout->addWidget(m_functionTable);
|
||||
setLayout(mainLayout);
|
||||
}
|
||||
|
||||
void FunctionsPage::retranslateUi(bool all)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void FunctionsPage::setCatalog(std::shared_ptr<const PgDatabaseCatalog> cat)
|
||||
{
|
||||
m_catalog = cat;
|
||||
m_model->setCatalog(cat);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue