4 #include <QAbstractItemModel>
13 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(TreeItem *ti);
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 void nextBranch(BranchItem *¤t, BranchItem *&previous,
32 bool deepLevelsFirst = false, 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();
40 virtual int xlinkCount();
41 virtual Link *getXLinkNum(const int &n);
47 QList<uint> deleteLaterIDs;
49 QColor backgroundColor; // Set in VymModel to optimize backgroundRole
50 QColor selectionColor; // Set in VymModel to optimize highlightedText palette