4 #include <QAbstractItemModel>
14 class TreeModel : public QAbstractItemModel
19 TreeModel(QObject *parent = 0);
22 QVariant data(const QModelIndex &index, int role) const;
23 Qt::ItemFlags flags(const QModelIndex &index) const;
24 QVariant headerData(int section, Qt::Orientation orientation,
25 int role = Qt::DisplayRole) const;
26 QModelIndex index (TreeItem* ti);
27 QModelIndex index(int row, int column,
28 const QModelIndex &parent = QModelIndex()) const;
29 QModelIndex parent(const QModelIndex &index) const;
30 int rowCount(const QModelIndex &parent = QModelIndex()) const;
31 int columnCount(const QModelIndex &parent = QModelIndex()) const;
33 void nextBranch (BranchItem* ¤t, BranchItem* &previous, bool deepLevelsFirst=false, BranchItem* start=NULL);
35 bool removeRows ( int row, int count,
36 const QModelIndex & parent = QModelIndex() );
38 TreeItem* getItem (const QModelIndex &index) const;
39 BranchItem* getRootItem();
41 virtual int xlinkCount();
42 virtual Link* getXLinkNum (const int &n);
48 QList <uint> deleteLaterIDs;