BaseTreeModel Class
(Utils::BaseTreeModel)| Inherits: | QAbstractItemModel |
| Inherited By: |
Signals
| void | requestExpansion(QModelIndex) |
- 18 signals inherited from QAbstractItemModel
- 2 signals inherited from QObject
Protected Functions
| BaseTreeModel(QObject *parent = 0) | |
| BaseTreeModel(TreeItem *root, QObject *parent = 0) | |
| void | clear() |
| void | destroyItem(TreeItem *item) |
| QModelIndex | indexForItem(const TreeItem *needle) const |
| TreeItem * | itemForIndex(const QModelIndex &) const |
| TreeItem * | rootItem() const |
| void | setHeader(const QStringList &displays) |
| void | setHeaderToolTip(const QStringList &tips) |
| void | setRootItem(TreeItem *item) |
| TreeItem * | takeItem(TreeItem *item) |
- 19 protected functions inherited from QAbstractItemModel
- 9 protected functions inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 39 public functions inherited from QAbstractItemModel
- 31 public functions inherited from QObject
- 2 public slots inherited from QAbstractItemModel
- 1 public slot inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 1 protected slot inherited from QAbstractItemModel
- 2 protected variables inherited from QObject
Member Function Documentation
[protected] BaseTreeModel::BaseTreeModel(QObject *parent = 0)
Default constructs an instance of BaseTreeModel.
[protected] BaseTreeModel::BaseTreeModel(TreeItem *root, QObject *parent = 0)
Default constructs an instance of BaseTreeModel.
[protected] void BaseTreeModel::clear()
Destroys all items in them model except the invisible root item.
[protected] void BaseTreeModel::destroyItem(TreeItem *item)
[protected] QModelIndex BaseTreeModel::indexForItem(const TreeItem *needle) const
[protected] TreeItem *BaseTreeModel::itemForIndex(const QModelIndex &) const
[signal] void BaseTreeModel::requestExpansion(QModelIndex)
[protected] TreeItem *BaseTreeModel::rootItem() const
See also setRootItem().
[protected] void BaseTreeModel::setHeader(const QStringList &displays)
[protected] void BaseTreeModel::setHeaderToolTip(const QStringList &tips)
[protected] void BaseTreeModel::setRootItem(TreeItem *item)
See also rootItem().
[protected] TreeItem *BaseTreeModel::takeItem(TreeItem *item)
Removes the specified item from the model.
Note: The item is not destroyed, ownership is effectively passed to the caller.