FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
qtgui::QStandardItemExplorer Class Reference

Provides a BFS (breadth-first search) exploration of a QStandardItemModel object. More...

#include <qttools/gui/qstandard_item_explorer.h>

Inheritance diagram for qtgui::QStandardItemExplorer:
cpp::TreeBfsExplorer< QStandardItem, QStandardItemTreeBfsModel >

Public Member Functions

 QStandardItemExplorer ()
 
 QStandardItemExplorer (QStandardItem *rootItem)
 
 QStandardItemExplorer (QStandardItemModel *model)
 
- Public Member Functions inherited from cpp::TreeBfsExplorer< QStandardItem, QStandardItemTreeBfsModel >
 TreeBfsExplorer ()
 
void begin (QStandardItem *node=nullptr)
 Prepares exploration to start from tree node. More...
 
void goNext ()
 Move exploration to the next tree node. More...
 
bool atEnd () const
 Is exploration beyond the last tree node (ended) ? More...
 
QStandardItem * current () const
 Current explored tree node. More...
 
unsigned depth () const
 Depth of the current tree node. More...
 

Detailed Description

Provides a BFS (breadth-first search) exploration of a QStandardItemModel object.

Example of use :

QStandardItemModel* model = ...;
for (QStandardItemExplorer explorer(model);
!explorer.atEnd();
explorer.goNext())
{
QStandardItem* item = explorer.current();
// Do something with item ...
}

Constructor & Destructor Documentation

qtgui::QStandardItemExplorer::QStandardItemExplorer ( )
qtgui::QStandardItemExplorer::QStandardItemExplorer ( QStandardItem *  rootItem)
qtgui::QStandardItemExplorer::QStandardItemExplorer ( QStandardItemModel *  model)

The documentation for this class was generated from the following files: