Restructuring catalog tabs
- Moved detail tabs of table to their own components - Table list has become seperate component on seperate tab - Table list does not use designer anymore - Moved sequences and functions tabs into the catalog inspector
This commit is contained in:
parent
a704332342
commit
42432b06a9
31 changed files with 598 additions and 472 deletions
57
pglab/widgets/CatalogTablesPage.h
Normal file
57
pglab/widgets/CatalogTablesPage.h
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
#ifndef CATALOGTABLESPAGE_H
|
||||
#define CATALOGTABLESPAGE_H
|
||||
|
||||
#include <QSplitter>
|
||||
#include <memory>
|
||||
#include "TablesTableModel.h"
|
||||
|
||||
class CatalogConstraintPage;
|
||||
class CatalogIndexPage;
|
||||
class ColumnPage;
|
||||
class ColumnTableModel;
|
||||
class ConstraintModel;
|
||||
class PgClass;
|
||||
class PgDatabaseCatalog;
|
||||
class PgLabTableView;
|
||||
class PropertiesPage;
|
||||
class QTabWidget;
|
||||
class SqlCodePreview;
|
||||
class TablesTableModel;
|
||||
class TriggerPage;
|
||||
|
||||
|
||||
class CatalogTablesPage: public QSplitter {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CatalogTablesPage(QWidget * parent = nullptr);
|
||||
|
||||
void setCatalog(std::shared_ptr<PgDatabaseCatalog> cat);
|
||||
void setNamespaceFilter(TablesTableModel::NamespaceFilter filter);
|
||||
|
||||
void retranslateUi(bool all = true);
|
||||
private:
|
||||
PgLabTableView *m_tableView = nullptr;
|
||||
TablesTableModel* m_tablesModel = nullptr;
|
||||
|
||||
// Details
|
||||
QTabWidget *m_detailsTabs = nullptr;
|
||||
ColumnPage *m_columnsPage = nullptr;
|
||||
CatalogConstraintPage *m_constraintPage = nullptr;
|
||||
CatalogIndexPage *m_indexPage = nullptr;
|
||||
PropertiesPage *m_propertiesPage = nullptr;
|
||||
TriggerPage *m_triggerPage = nullptr;
|
||||
SqlCodePreview *m_tableSql = nullptr;
|
||||
|
||||
std::shared_ptr<PgDatabaseCatalog> m_catalog;
|
||||
|
||||
void selectedTableChanged(const std::optional<PgClass> &table);
|
||||
void updateSqlTab(const std::optional<PgClass> &table);
|
||||
private slots:
|
||||
|
||||
void tableListTable_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
void tableListTable_layoutChanged(const QList<QPersistentModelIndex> &parents, QAbstractItemModel::LayoutChangeHint hint);
|
||||
void on_tableListTable_doubleClicked(const QModelIndex &index);
|
||||
|
||||
};
|
||||
|
||||
#endif // CATALOGTABLESPAGE_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue