4 #include <QAbstractItemModel>
10 class TreeModel : public QAbstractItemModel
15 TreeModel(QObject *parent = 0);
18 QVariant data(const QModelIndex &index, int role) const;
19 Qt::ItemFlags flags(const QModelIndex &index) const;
20 QVariant headerData(int section, Qt::Orientation orientation,
21 int role = Qt::DisplayRole) const;
22 QModelIndex index(int row, int column,
23 const QModelIndex &parent = QModelIndex()) const;
24 QModelIndex parent(const QModelIndex &index) const;
25 int rowCount(const QModelIndex &parent = QModelIndex()) const;
26 int columnCount(const QModelIndex &parent = QModelIndex()) const;
29 void setupModelData(TreeItem *parent);