15#ifndef QGRAPHICSBSPTREEINDEX_H
16#define QGRAPHICSBSPTREEINDEX_H
18#include <QtWidgets/private/qtwidgetsglobal_p.h>
24#include <QtCore/qrect.h>
25#include <QtCore/qlist.h>
39 Q_PROPERTY(
int bspTreeDepth READ bspTreeDepth WRITE setBspTreeDepth)
48 int bspTreeDepth()
const;
49 void setBspTreeDepth(
int depth);
56 void clear()
override;
95 void purgeRemovedItems();
97 void _q_updateIndex();
101 void _q_updateSortCache();
104 void invalidateSortCache();
113 return item1->d_ptr->globalStackingOrder < item2->d_ptr->globalStackingOrder;
117 return item1->d_ptr->globalStackingOrder >= item2->d_ptr->globalStackingOrder;
121 bool cached,
bool onlyTopLevelItems =
false);
144 if (l1 >=
r2 || l2 >=
r1)
161 return !(
t1 >= b2 ||
t2 >= b1);
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
GraphicsItemChange
This enum describes the state changes that are notified by QGraphicsItem::itemChange().
QSet< QGraphicsItem * > removedItems
QList< QGraphicsItem * > unindexedItems
static bool closestItemFirst_withCache(const QGraphicsItem *item1, const QGraphicsItem *item2)
QList< int > freeItemIndexes
QList< QGraphicsItem * > untransformableItems
QList< QGraphicsItem * > indexedItems
QGraphicsSceneBspTree bsp
static bool closestItemLast_withCache(const QGraphicsItem *item1, const QGraphicsItem *item2)
The QGraphicsSceneBspTreeIndex class provides an implementation of a BSP indexing algorithm for disco...
The QGraphicsSceneIndex class provides a base class to implement a custom indexing algorithm for disc...
virtual QList< QGraphicsItem * > estimateTopLevelItems(const QRectF &, Qt::SortOrder order) const
virtual void addItem(QGraphicsItem *item)=0
This pure virtual function inserts an item to the scene index.
virtual void updateSceneRect(const QRectF &rect)
Notifies the index that the scene's scene rect has changed.
virtual void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange, const void *const value)
This virtual function is called by QGraphicsItem to notify the index that some part of the item 's st...
virtual void clear()
This virtual function removes all items in the scene index.
virtual void prepareBoundingRectChange(const QGraphicsItem *item)
Notify the index for a geometry change of an item.
virtual QList< QGraphicsItem * > estimateItems(const QPointF &point, Qt::SortOrder order) const
This virtual function return an estimation of items at position point.
friend class QGraphicsSceneBspTreeIndex
virtual void removeItem(QGraphicsItem *item)=0
This pure virtual function removes an item to the scene index.
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items.
\inmodule QtCore\reentrant
constexpr int left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr int width() const noexcept
Returns the width of the rectangle.
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
static bool QRectF_intersects(const QRectF &s, const QRectF &r)
static QT_BEGIN_NAMESPACE const int QGRAPHICSSCENE_INDEXTIMER_TIMEOUT
GLboolean GLboolean GLboolean b
GLint GLenum GLsizei GLsizei GLsizei depth
GLfloat GLfloat GLfloat w
[0]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t1
[4]
GLfloat GLfloat GLfloat GLfloat h
GLfixed GLfixed GLint GLint order
#define Q_AUTOTEST_EXPORT
#define QT_REQUIRE_CONFIG(feature)