19 #ifndef PROPERTYBASEDTABLEMODEL_H
20 #define PROPERTYBASEDTABLEMODEL_H
22 #include <QAbstractTableModel>
49 void init(QList<QObject *>* content, QObject *model, QMap<int, QString> mappings);
52 virtual QVariant data(
const QModelIndex &item,
int role = Qt::DisplayRole)
const;
54 virtual int rowCount(
const QModelIndex &parent = QModelIndex())
const;
55 virtual int columnCount(
const QModelIndex &parent = QModelIndex())
const;
57 virtual Qt::ItemFlags flags(
const QModelIndex &index)
const;
58 virtual bool insertRows(
int position,
int rows,
const QModelIndex &index=QModelIndex());
59 virtual bool setData(
const QModelIndex &index,
const QVariant &value,
int role=Qt::EditRole);
60 virtual bool removeRows(
int position,
int rows,
const QModelIndex &index=QModelIndex());
62 void moveRowUp(
int position);
63 void moveRowDown(
int position);
66 QList<QObject *>* content;
67 QMap<int, QString> mappings;
71 #endif // PROPERTYBASEDTABLEMODEL_H
This class provides a table model for just about any QObject.
void init(QList< QObject * > *content, QObject *model, QMap< int, QString > mappings)
Initializes this instance for use.