63 #include <QtGui/qpainterpath.h>
72 const QRectF sceneRect = *
static_cast<const QRectF *
>(intersectData);
75 _q_adjustRect(&brect);
87 keep = itemRect.
contains(brect) && itemRect != brect;
102 keep = sceneRect != brect && sceneRect.
contains(itemSceneBoundingRect);
104 keep = sceneRect.
intersects(itemSceneBoundingRect);
121 const QPointF scenePoint = *
static_cast<const QPointF *
>(intersectData);
124 _q_adjustRect(&brect);
166 _q_adjustRect(&brect);
190 keep = scenePath.
contains(itemSceneBoundingRect);
192 keep = scenePath.
intersects(itemSceneBoundingRect);
239 bool intersects =
path.intersects(frameRect);
241 return intersects ||
path.contains(frameRect.
topLeft())
243 return !intersects &&
path.contains(frameRect.
topLeft());
258 qreal parentOpacity,
const void *intersectData)
const
273 if (wasDirtyParentSceneTransform) {
280 bool processItem = !itemIsFullyTransparent;
282 processItem = intersect(
item, exposeRect,
mode, viewTransform, intersectData);
283 if (!processItem && (!itemHasChildren || itemClipsChildrenToShape)) {
284 if (wasDirtyParentSceneTransform)
291 if (itemHasChildren) {
296 if (itemClipsChildrenToShape && !itemIsUntransformable) {
307 if (wasDirtyParentSceneTransform)
308 child->d_ptr->dirtySceneTransform = 1;
314 mode, opacity, intersectData);
323 if (itemHasChildren) {
326 if (wasDirtyParentSceneTransform)
327 child->d_ptr->dirtySceneTransform = 1;
331 mode, opacity, intersectData);
437 _q_adjustRect(&exposeRect);
471 _q_adjustRect(&exposeRect);
506 _q_adjustRect(&exposeRect);
529 sorted.reserve(numTopLevelItems);
530 for (
int i = numTopLevelItems - 1;
i >= 0; --
i)
562 for (
int i = 0 ;
i < allItems.
size(); ++
i)
628 #include "moc_qgraphicssceneindex_p.cpp"
small capitals from c petite p scientific i
[1]
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
virtual bool contains(const QPointF &point) const
QTransform deviceTransform(const QTransform &viewportTransform) const
QScopedPointer< QGraphicsItemPrivate > d_ptr
virtual QPainterPath shape() const
@ ItemClipsChildrenToShape
@ ItemContainsChildrenInShape
@ ItemIgnoresParentOpacity
virtual QRectF boundingRect() const =0
virtual bool collidesWithPath(const QPainterPath &path, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const
bool isOpacityNull() const
void invalidateChildrenSceneTransform()
quint32 dirtySceneTransform
bool itemIsUntransformable() const
static const QGraphicsItemPrivate * get(const QGraphicsItem *item)
bool childrenCombineOpacity() const
QList< QGraphicsItem * > children
quint32 sceneTransformTranslateOnly
virtual void updateSceneTransformFromParent()
QTransform sceneTransform
qreal combineOpacityFromParent(qreal parentOpacity) const
void ensureSortedChildren()
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items.
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 QList< QGraphicsItem * > items(Qt::SortOrder order=Qt::DescendingOrder) const =0
virtual void updateSceneRect(const QRectF &rect)
QGraphicsSceneIndex(QGraphicsScene *scene=nullptr)
virtual ~QGraphicsSceneIndex()
virtual void itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange, const void *const value)
virtual void prepareBoundingRectChange(const QGraphicsItem *item)
virtual void deleteItem(QGraphicsItem *item)
virtual QList< QGraphicsItem * > estimateItems(const QPointF &point, Qt::SortOrder order) const
QGraphicsScene * scene() const
virtual void removeItem(QGraphicsItem *item)=0
QGraphicsSceneIndexPrivate(QGraphicsScene *scene)
static bool itemCollidesWithPath(const QGraphicsItem *item, const QPainterPath &path, Qt::ItemSelectionMode mode)
void recursive_items_helper(QGraphicsItem *item, QRectF exposeRect, QGraphicsSceneIndexIntersector intersect, QList< QGraphicsItem * > *items, const QTransform &viewTransform, Qt::ItemSelectionMode mode, qreal parentOpacity, const void *intersectData) const
~QGraphicsSceneIndexPrivate()
void ensureSortedTopLevelItems()
QList< QGraphicsItem * > topLevelItems
qsizetype size() const noexcept
bool isEmpty() const noexcept
const_reference at(qsizetype i) const noexcept
void append(parameter_type t)
The QObject class is the base class of all Qt objects.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
QPainterPath translated(qreal dx, qreal dy) const
void translate(qreal dx, qreal dy)
void addRect(const QRectF &rect)
QRectF controlPointRect() const
bool intersects(const QRectF &rect) const
bool contains(const QPointF &pt) const
The QPointF class defines a point in the plane using floating point precision.
constexpr qreal x() const noexcept
constexpr qreal y() const noexcept
The QPolygonF class provides a list of points using floating point precision. \inmodule QtGui.
The QRectF class defines a finite rectangle in the plane using floating point precision.
constexpr QRectF translated(qreal dx, qreal dy) const noexcept
bool contains(const QRectF &r) const noexcept
bool intersects(const QRectF &r) const noexcept
constexpr QPointF topLeft() const noexcept
The QSizeF class defines the size of a two-dimensional object using floating point precision.
The QSize class defines the size of a two-dimensional object using integer point precision.
QMap< QString, QString > map
[6]
@ IntersectsItemBoundingRect
@ ContainsItemBoundingRect
EGLOutputLayerEXT EGLint EGLAttrib value
QT_END_INCLUDE_NAMESPACE typedef double qreal
bool(* QGraphicsSceneIndexIntersector)(const QGraphicsItem *item, const QRectF &exposeRect, Qt::ItemSelectionMode mode, const QTransform &deviceTransform, const void *data)
GLuint GLenum GLenum transform
GLsizei const GLchar *const * path
GLfixed GLfixed GLint GLint order
rect sceneTransform().map(QPointF(0
rect deviceTransform(view->viewportTransform()).map(QPointF(0