TreeModel Class

(Utils::TreeModel)

The TreeModel class is a convienience base class for models to use in a QTreeView. More...

Header: #include <TreeModel>
Inherits: Utils::BaseTreeModel

Public Functions

TreeModel(QObject *parent = nullptr)
TreeModel(RootItem *root, QObject *parent = nullptr)
Internal::SelectType<Level, LevelItemTypes...>::Type *findItemAtLevel(const Predicate &pred) const
BestItem *findNonRootItem(const Predicate &pred) const
void forAllItems(const Predicate &pred) const
void forItemsAtLevel(const Predicate &pred) const
void forSelectedItems(const Predicate &pred) const
BestItem *itemForIndex(const QModelIndex &idx) const
Internal::SelectType<Level, LevelItemTypes...>::Type *itemForIndexAtLevel(const QModelIndex &idx) const
BestItem *nonRootItemForIndex(const QModelIndex &idx) const
RootItem *rootItem() const

Additional Inherited Members

Detailed Description

The TreeModel class is a convienience base class for models to use in a QTreeView.

Member Function Documentation

TreeModel::TreeModel(QObject *parent = nullptr)

Default constructs an instance of TreeModel.

TreeModel::TreeModel(RootItem *root, QObject *parent = nullptr)

Default constructs an instance of TreeModel.

Internal::SelectType<Level, LevelItemTypes...>::Type *TreeModel::findItemAtLevel(const Predicate &pred) const

BestItem *TreeModel::findNonRootItem(const Predicate &pred) const

void TreeModel::forAllItems(const Predicate &pred) const

void TreeModel::forItemsAtLevel(const Predicate &pred) const

void TreeModel::forSelectedItems(const Predicate &pred) const

BestItem *TreeModel::itemForIndex(const QModelIndex &idx) const

Internal::SelectType<Level, LevelItemTypes...>::Type *TreeModel::itemForIndexAtLevel(const QModelIndex &idx) const

BestItem *TreeModel::nonRootItemForIndex(const QModelIndex &idx) const

RootItem *TreeModel::rootItem() const