SelectionEditorFactory + ItemModel + ItemModelFactory combination is working
in new EditTableWidget (EditTableWidget is very much WIP)
This commit is contained in:
parent
e44f73166f
commit
742fd0a4d3
19 changed files with 419 additions and 80 deletions
|
|
@ -22,4 +22,26 @@ private:
|
|||
std::vector<QString> m_types;
|
||||
};
|
||||
|
||||
class TypeModel : public QAbstractListModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum e_Columns : int {
|
||||
OidCol,
|
||||
NameCol, //
|
||||
colCount
|
||||
};
|
||||
|
||||
explicit TypeModel(QObject *parent = 0);
|
||||
|
||||
void setTypeList(std::shared_ptr<const PgTypeContainer> types);
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
#endif // TYPESELECTIONITEMMODEL_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue