44 #ifndef QT_NO_GRAPHICSVIEW 46 #include <QtCore/qstring.h> 47 #include <private/qgraphicsitem_p.h> 77 for (
int i = 0; i < items->
size(); ++i) {
81 if (!item->d_func()->itemDiscovered && item->
d_ptr->
visible) {
82 item->d_func()->itemDiscovered = 1;
108 nodes.resize((1 << (depth + 1)) - 1);
140 for (
int j = 0; j < oldItemList.
size(); ++j) {
156 for (
int i = 0; i < tmp.
size(); ++i)
203 qreal offset1, offset2;
225 child = &
nodes[childIndex + 1];
254 climbTree(visitor, rect, childIndex + 1);
256 climbTree(visitor, rect, childIndex + 1);
263 climbTree(visitor, rect, childIndex + 1);
265 climbTree(visitor, rect, childIndex + 1);
277 const Node *parent = &
nodes.at(parentIdx);
296 #endif // QT_NO_GRAPHICSVIEW
qreal right() const
Returns the x-coordinate of the rectangle's right edge.
QGraphicsSceneFindItemBspTreeVisitor * findVisitor
#define QT_END_NAMESPACE
This macro expands to.
QScopedPointer< QGraphicsItemPrivate > d_ptr
void setLeft(qreal pos)
Sets the left edge of the rectangle to the given x coordinate.
QVector< T > & fill(const T &t, int size=-1)
Assigns value to all items in the vector.
void visit(QList< QGraphicsItem *> *items)
void visit(QList< QGraphicsItem *> *items)
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
qreal left() const
Returns the x-coordinate of the rectangle's left edge.
void initialize(const QRectF &rect, int depth)
void setTop(qreal pos)
Sets the top edge of the rectangle to the given y coordinate.
void setBottom(qreal pos)
Sets the bottom edge of the rectangle to the given y coordinate.
int firstChildIndex(int index) const
QList< QGraphicsItem * > items(const QRectF &rect, bool onlyTopLevelItems=false) const
The QString class provides a Unicode character string.
virtual void visit(QList< QGraphicsItem *> *items)=0
int parentIndex(int index) const
void setRight(qreal pos)
Sets the right edge of the rectangle to the given x coordinate.
qreal x() const
Returns the x-coordinate of this point.
void resize(int size)
Sets the size of the vector to size.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
void clear()
Removes all the elements from the vector and releases the memory used by the vector.
bool contains(const T &value) const
qreal height() const
Returns the height of the rectangle.
void prepend(const T &t)
Inserts value at the beginning of the list.
const T & at(int i) const
Returns the item at index position i in the list.
QList< QGraphicsItem * > * foundItems
void visit(QList< QGraphicsItem *> *items)
QGraphicsSceneInsertItemBspTreeVisitor * insertVisitor
qreal width() const
Returns the width of the rectangle.
void setRect(qreal x, qreal y, qreal w, qreal h)
Sets the coordinates of the rectangle's top-left corner to (x, y), and its size to the given width an...
QGraphicsItem * topLevelItem() const
Returns this item's top-level item.
QGraphicsSceneRemoveItemBspTreeVisitor * removeVisitor
void insertItem(QGraphicsItem *item, const QRectF &rect)
void climbTree(QGraphicsSceneBspTreeVisitor *visitor, const QRectF &rect, int index=0) const
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
int size() const
Returns the number of items in the list.
QString debug(int index) const
QVector< QList< QGraphicsItem * > > leaves
qreal y() const
Returns the y-coordinate of this point.
qreal top() const
Returns the y-coordinate of the rectangle's top edge.
bool isEmpty() const
Returns true if the vector has size 0; otherwise returns false.
qreal bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
void removeItems(const QSet< QGraphicsItem *> &items)
QPointF center() const
Returns the center point of the rectangle.
int size() const
Returns the number of items in the vector.
void removeItem(QGraphicsItem *item, const QRectF &rect)
The QList class is a template class that provides lists.
QRectF rectForIndex(int index) const
int removeAll(const T &t)
Removes all occurrences of value in the list and returns the number of entries removed.