Qt 4.8
Public Functions | Public Variables | List of all members
QGraphicsSceneFindItemBspTreeVisitor Class Reference
Inheritance diagram for QGraphicsSceneFindItemBspTreeVisitor:
QGraphicsSceneBspTreeVisitor

Public Functions

void visit (QList< QGraphicsItem *> *items)
 
- Public Functions inherited from QGraphicsSceneBspTreeVisitor
virtual ~QGraphicsSceneBspTreeVisitor ()
 

Public Variables

QList< QGraphicsItem * > * foundItems
 
bool onlyTopLevelItems
 

Detailed Description

Definition at line 69 of file qgraphicsscene_bsp.cpp.

Functions

◆ visit()

void QGraphicsSceneFindItemBspTreeVisitor::visit ( QList< QGraphicsItem *> *  items)
inlinevirtual

Implements QGraphicsSceneBspTreeVisitor.

Definition at line 75 of file qgraphicsscene_bsp.cpp.

76  {
77  for (int i = 0; i < items->size(); ++i) {
78  QGraphicsItem *item = items->at(i);
79  if (onlyTopLevelItems && item->d_ptr->parent)
80  item = item->topLevelItem();
81  if (!item->d_func()->itemDiscovered && item->d_ptr->visible) {
82  item->d_func()->itemDiscovered = 1;
83  foundItems->prepend(item);
84  }
85  }
86  }
QGraphicsItem * parent
QScopedPointer< QGraphicsItemPrivate > d_ptr
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
Definition: qgraphicsitem.h:89
void prepend(const T &t)
Inserts value at the beginning of the list.
Definition: qlist.h:541
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
QList< QGraphicsItem * > * foundItems
QGraphicsItem * topLevelItem() const
Returns this item&#39;s top-level item.
int size() const
Returns the number of items in the list.
Definition: qlist.h:137

Properties

◆ foundItems

QList<QGraphicsItem *>* QGraphicsSceneFindItemBspTreeVisitor::foundItems

Definition at line 72 of file qgraphicsscene_bsp.cpp.

Referenced by QGraphicsSceneBspTree::items().

◆ onlyTopLevelItems

bool QGraphicsSceneFindItemBspTreeVisitor::onlyTopLevelItems

Definition at line 73 of file qgraphicsscene_bsp.cpp.

Referenced by QGraphicsSceneBspTree::items().


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