TreeModel Class

(Utils::TreeModel)

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

Header: #include <TreeModel>

Public Types

typedef BestItem
typedef RootItem

Public Functions

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

Detailed Description

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

Member Type Documentation

typedef TreeModel::BestItem

typedef TreeModel::RootItem

Member Function Documentation

TreeModel::TreeModel(int *parent = 0)

Default constructs an instance of TreeModel.

TreeModel::TreeModel(Utils::TreeModel::RootItem *root, int *parent = 0)

Default constructs an instance of TreeModel.

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

Utils::TreeModel::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

Utils::TreeModel::BestItem *TreeModel::itemForIndex(const int &idx) const

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

Utils::TreeModel::BestItem *TreeModel::nonRootItemForIndex(const int &idx) const

Utils::TreeModel::RootItem *TreeModel::rootItem() const