pgLab/src/typeselectionitemmodel.h

27 lines
676 B
C++

#ifndef TYPESELECTIONITEMMODEL_H
#define TYPESELECTIONITEMMODEL_H
#include <QAbstractListModel>
#include <vector>
class PgTypeContainer;
class TypeSelectionItemModel : public QAbstractListModel
{
Q_OBJECT
public:
explicit TypeSelectionItemModel(QObject *parent = 0);
void setTypeList(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:
// const PgTypeContainer* m_types;
std::vector<QString> m_types;
};
#endif // TYPESELECTIONITEMMODEL_H