TreeItem Class | Extending Qt Creator Manual

Extending Qt Creator Manual | TreeItem

Extending Qt Creator Manual 4.6.0

# TreeItem Class

(Utils::TreeItem)

- List of all members, including inherited members

## Public Functions

| TreeItem()
virtual | ~TreeItem()
void | appendChild(TreeItem *item)
const_iterator | begin() const
virtual bool | canFetchMore() const
TreeItem * | childAt(int index) const
int | childCount() const
virtual QVariant | data(int column, int role) const
const_iterator | end() const
void | expand()
virtual void | fetchMore()
TreeItem * | findAnyChild(const std::function<bool( TreeItem * ) > &pred) const
TreeItem * | findChildAtLevel(int level, const std::function<bool( TreeItem * ) > &pred) const
TreeItem * | firstChild() const
virtual Qt::ItemFlags | flags(int column) const
void | forAllChildren(const std::function<void( TreeItem * ) > &pred) const
void | forChildrenAtLevel(int level, const std::function<void( TreeItem * ) > &pred) const
void | forSelectedChildren(const std::function<bool( TreeItem * ) > &pred) const
virtual bool | hasChildren() const
QModelIndex | index() const
int | indexInParent() const
int | indexOf(const TreeItem *item) const
void | insertChild(int pos, TreeItem *item)
void | insertOrderedChild(TreeItem *item, const std::function<bool( const TreeItem *, const TreeItem * ) > &cmp)
TreeItem * | lastChild() const
int | level() const
QAbstractItemModel * | model() const
TreeItem * | parent() const
void | prependChild(TreeItem *item)
void | removeChildAt(int pos)
void | removeChildren()
TreeItem * | reverseFindAnyChild(const std::function<bool( TreeItem * ) > &pred) const
virtual bool | setData(int column, const QVariant &data, int role)
void | sortChildren(const std::function<bool( const TreeItem *, const TreeItem * ) > &cmp)
void | update()
void | updateAll()
void | updateColumn(int column)

## Member Function Documentation

### TreeItem::TreeItem()

Default constructs an instance of TreeItem.

### `[virtual]` TreeItem::~TreeItem()

Destroys the instance of TreeItem. The destructor is virtual.

### void TreeItem::appendChild(TreeItem *item)

### const_iterator TreeItem::begin() const

### `[virtual]` bool TreeItem::canFetchMore() const

### TreeItem *TreeItem::childAt(int index) const

### int TreeItem::childCount() const

### `[virtual]` QVariant TreeItem::data(int column, int role) const

See also setData().

### const_iterator TreeItem::end() const

### void TreeItem::expand()

### `[virtual]` void TreeItem::fetchMore()

### TreeItem *TreeItem::findAnyChild(const std::function<bool( TreeItem * ) > &pred) const

### TreeItem *TreeItem::findChildAtLevel(int level, const std::function<bool( TreeItem * ) > &pred) const

### TreeItem *TreeItem::firstChild() const

### `[virtual]` Qt::ItemFlags TreeItem::flags(int column) const

### void TreeItem::forAllChildren(const std::function<void( TreeItem * ) > &pred) const

### void TreeItem::forChildrenAtLevel(int level, const std::function<void( TreeItem * ) > &pred) const

### void TreeItem::forSelectedChildren(const std::function<bool( TreeItem * ) > &pred) const

### `[virtual]` bool TreeItem::hasChildren() const

### QModelIndex TreeItem::index() const

### int TreeItem::indexInParent() const

### int TreeItem::indexOf(const TreeItem *item) const

### void TreeItem::insertChild(int pos, TreeItem *item)

### void TreeItem::insertOrderedChild(TreeItem *item, const std::function<bool( const TreeItem *, const TreeItem * ) > &cmp)

### TreeItem *TreeItem::lastChild() const

### int TreeItem::level() const

### QAbstractItemModel *TreeItem::model() const

### TreeItem *TreeItem::parent() const

### void TreeItem::prependChild(TreeItem *item)

### void TreeItem::removeChildAt(int pos)

### void TreeItem::removeChildren()

### TreeItem *TreeItem::reverseFindAnyChild(const std::function<bool( TreeItem * ) > &pred) const

### `[virtual]` bool TreeItem::setData(int column, const QVariant &data, int role)

See also data().

### void TreeItem::sortChildren(const std::function<bool( const TreeItem *, const TreeItem * ) > &cmp)

### void TreeItem::update()

### void TreeItem::updateAll()

### void TreeItem::updateColumn(int column)