4 #include <QAbstractItemModel>
12 class TreeModel : public QAbstractItemModel
17 TreeModel(QObject *parent = 0);
20 QVariant data(const QModelIndex &index, int role) const;
21 Qt::ItemFlags flags(const QModelIndex &index) const;
22 QVariant headerData(int section, Qt::Orientation orientation,
23 int role = Qt::DisplayRole) const;
24 QModelIndex index(int row, int column,
25 const QModelIndex &parent = QModelIndex()) const;
26 QModelIndex parent(const QModelIndex &index) const;
27 int rowCount(const QModelIndex &parent = QModelIndex()) const;
28 int columnCount(const QModelIndex &parent = QModelIndex()) const;
33 bool removeRows ( int row, int count,
34 const QModelIndex & parent = QModelIndex() );
37 QModelIndex index (TreeItem* ti);
40 static TreeItem* itFirst;
41 static TreeItem* itCur;