4 #include <QAbstractItemModel>
13 class TreeModel : public QAbstractItemModel
18 TreeModel(QObject *parent = 0);
21 QVariant data(const QModelIndex &index, int role) const;
22 Qt::ItemFlags flags(const QModelIndex &index) const;
23 QVariant headerData(int section, Qt::Orientation orientation,
24 int role = Qt::DisplayRole) const;
25 QModelIndex index(int row, int column,
26 const QModelIndex &parent = QModelIndex()) const;
27 QModelIndex parent(const QModelIndex &index) const;
28 int rowCount(const QModelIndex &parent = QModelIndex()) const;
29 int columnCount(const QModelIndex &parent = QModelIndex()) const;
31 BranchItem* next(BranchItem* ¤t, BranchItem* &previous, BranchItem* start=NULL);
33 bool removeRows ( int row, int count,
34 const QModelIndex & parent = QModelIndex() );
36 TreeItem* getItem (const QModelIndex &index) const;
37 TreeItem* getRootItem();
38 QModelIndex index (TreeItem* ti);