BaseTreeModel Class

(Utils::BaseTreeModel)
Inherits: QAbstractItemModel
Inherited By:

Utils::TreeModel

Signals

void requestExpansion(QModelIndex)

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)

Additional Inherited Members

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.