Added CollationModel + factory for editing and added to EditTableWidget
This commit is contained in:
parent
f0c1035378
commit
e75b0f1a71
7 changed files with 107 additions and 19 deletions
|
|
@ -1,11 +1,32 @@
|
|||
#ifndef COLLATIONMODEL_H
|
||||
#ifndef COLLATIONMODEL_H
|
||||
#define COLLATIONMODEL_H
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
class CollationModel
|
||||
{
|
||||
class PgCollationContainer;
|
||||
|
||||
class CollationModel : public QAbstractListModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
CollationModel();
|
||||
enum e_Columns : int {
|
||||
OidCol,
|
||||
NameCol, //
|
||||
colCount
|
||||
};
|
||||
|
||||
explicit CollationModel(QObject *parent = nullptr);
|
||||
|
||||
void setCollationList(std::shared_ptr<const PgCollationContainer> collations);
|
||||
|
||||
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 PgCollationContainer> m_collations;
|
||||
};
|
||||
|
||||
#endif // COLLATIONMODEL_H
|
||||
|
||||
#endif // COLLATIONMODEL_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue