Objects nodes for the TreeModel.
TreeModelIterator provides a way to iterate over TreeItems in a TreeModel. Usage:
TreeItem * next(const TreeItem *current)
The traversal implementation.
TreeModelIterator(TreeModel *model)
Constructor. Provide a tree model to iterate over.
QStack< int > _parentIndex
Stack to save the child indices of the parent TreeItems.
TreeModel * _model
The model to iterate over.
TreeItem * operator*() const
Dereferencing the iterator to retrieve the current TreeItem. Returns nullptr if the iterator is at th...
int _currentIndex
The current child index.
TreeItem * _current
The current TreeItem.
TreeModelIterator & operator++()
Advance the iterator to the next TreeItem.
A hierarchical model for a tree implemented as a double-linked list.