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 (TreeItem* ti);
26 QModelIndex index(int row, int column,
27 const QModelIndex &parent = QModelIndex()) const;
28 QModelIndex parent(const QModelIndex &index) const;
29 int rowCount(const QModelIndex &parent = QModelIndex()) const;
30 int columnCount(const QModelIndex &parent = QModelIndex()) const;
32 BranchItem* nextBranch (BranchItem* ¤t, BranchItem* &previous, bool deepLevelsFirst=true, BranchItem* start=NULL);
34 bool removeRows ( int row, int count,
35 const QModelIndex & parent = QModelIndex() );
37 TreeItem* getItem (const QModelIndex &index) const;
38 BranchItem* getRootItem();