Added page with the types (no details yet)
This commit is contained in:
parent
bdef76ed8a
commit
4c175d8c2c
16 changed files with 418 additions and 11 deletions
40
pglab/TypeModel.h
Normal file
40
pglab/TypeModel.h
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#ifndef TYPEMODEL_H
|
||||
#define TYPEMODEL_H
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
#include "catalog/PgType.h"
|
||||
|
||||
class TypeModel : public QAbstractTableModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum e_Columns : int {
|
||||
NameCol,
|
||||
SchemaCol,
|
||||
OwnerCol,
|
||||
|
||||
colCount
|
||||
};
|
||||
|
||||
TypeModel(QObject * parent = nullptr);
|
||||
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
void setCatalog(std::shared_ptr<const PgDatabaseCatalog> cat);
|
||||
//void setNamespaceFilter(NamespaceFilter filter);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
|
||||
PgType typ(int row) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<const PgDatabaseCatalog> m_catalog;
|
||||
std::vector<PgType> m_types;
|
||||
//NamespaceFilter m_namespaceFilter = NamespaceFilter::User;
|
||||
QMetaObject::Connection refreshConnection;
|
||||
|
||||
void refresh();
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue