TreeModel: Make root item configurable

This is mainly used to communicate the number of columns and
header contents.

Change-Id: Ic3163265338d71f1fa8250e4765bb764e5784197
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2014-12-17 13:15:08 +01:00
parent e822d5705f
commit a8ece5e9b0
2 changed files with 16 additions and 0 deletions

View File

@@ -87,8 +87,10 @@ public:
QModelIndex index(int, int, const QModelIndex &idx) const;
QModelIndex parent(const QModelIndex &idx) const;
Qt::ItemFlags flags(const QModelIndex &idx) const;
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
TreeItem *rootItem() const;
void setRootItem(TreeItem *item);
TreeItem *itemFromIndex(const QModelIndex &) const;
QModelIndex indexFromItem(const TreeItem *needle) const;