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
|
|
@ -4,6 +4,7 @@
|
|||
#include <QAbstractListModel>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "catalog/PgType.h"
|
||||
|
||||
class PgTypeContainer;
|
||||
|
||||
|
|
@ -28,19 +29,27 @@ public:
|
|||
enum e_Columns : int {
|
||||
OidCol,
|
||||
NameCol, //
|
||||
NamespaceCol,
|
||||
OwnerCol,
|
||||
CategoryCol,
|
||||
colCount
|
||||
};
|
||||
|
||||
explicit TypeModel(QObject *parent = 0);
|
||||
|
||||
void setTypeList(std::shared_ptr<const PgTypeContainer> types);
|
||||
PgType typ(int row) const;
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<const PgTypeContainer> m_types;
|
||||
|
||||
static QString TypCategoryString(TypCategory tc);
|
||||
Oid getType(int column) const;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue