Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qgraphicsitem_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QGRAPHICSITEM_P_H
6#define QGRAPHICSITEM_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of other Qt classes. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtWidgets/private/qtwidgetsglobal_p.h>
20#include "qgraphicsitem.h"
21#include "qset.h"
22#include "qpixmapcache.h"
23#include <private/qgraphicsview_p.h>
25#include <private/qgraphicstransform_p.h>
26
27#include <QtCore/qpoint.h>
28
30
31QT_BEGIN_NAMESPACE
32
33class QGraphicsItemPrivate;
34
36{
37public:
39
40 // ItemCoordinateCache only
44
45 // DeviceCoordinateCache only
53
54 // List of logical exposed rects
57
58 // Empty cache
59 void purge();
60};
61
62class Q_WIDGETS_EXPORT QGraphicsItemPrivate
63{
64 Q_DECLARE_PUBLIC(QGraphicsItem)
65public:
66 enum Extra {
67 ExtraToolTip,
68 ExtraCursor,
69 ExtraCacheData,
70 ExtraMaxDeviceCoordCacheSize,
71 ExtraBoundingRegionGranularity
72 };
73
74 enum AncestorFlag {
75 NoFlag = 0,
76 AncestorHandlesChildEvents = 0x1,
77 AncestorClipsChildren = 0x2,
78 AncestorIgnoresTransformations = 0x4,
79 AncestorFiltersChildEvents = 0x8,
80 AncestorContainsChildren = 0x10
81 };
82
83 QGraphicsItemPrivate();
84 virtual ~QGraphicsItemPrivate();
85
86 static const QGraphicsItemPrivate *get(const QGraphicsItem *item)
87 {
88 return item->d_ptr.data();
89 }
90 static QGraphicsItemPrivate *get(QGraphicsItem *item)
91 {
92 return item->d_ptr.data();
93 }
94
95 void updateChildWithGraphicsEffectFlagRecursively();
96 void updateAncestorFlag(QGraphicsItem::GraphicsItemFlag childFlag,
97 AncestorFlag flag = NoFlag, bool enabled = false, bool root = true);
98 void updateAncestorFlags();
99 void setIsMemberOfGroup(bool enabled);
100 void remapItemPos(QEvent *event, QGraphicsItem *item);
101 QTransform genericMapFromSceneTransform(const QWidget *viewport = nullptr) const;
102 QPointF genericMapFromScene(const QPointF &pos, const QWidget *viewport) const;
103 inline bool itemIsUntransformable() const
104 {
105 return (flags & QGraphicsItem::ItemIgnoresTransformations)
106 || (ancestorFlags & AncestorIgnoresTransformations);
107 }
108
109 void combineTransformToParent(QTransform *x, const QTransform *viewTransform = nullptr) const;
110 void combineTransformFromParent(QTransform *x, const QTransform *viewTransform = nullptr) const;
111 virtual void updateSceneTransformFromParent();
112
113 static bool movableAncestorIsSelected(const QGraphicsItem *item);
114
115 virtual void setPosHelper(const QPointF &pos);
116 void setTransformHelper(const QTransform &transform);
117 void prependGraphicsTransform(QGraphicsTransform *t);
118 void appendGraphicsTransform(QGraphicsTransform *t);
119 void setVisibleHelper(bool newVisible, bool explicitly, bool update = true,
120 bool hiddenByPanel = false);
121 void setEnabledHelper(bool newEnabled, bool explicitly, bool update = true);
122 bool discardUpdateRequest(bool ignoreVisibleBit = false,
123 bool ignoreDirtyBit = false, bool ignoreOpacity = false) const;
124 virtual void transformChanged() {}
125 int depth() const;
126#if QT_CONFIG(graphicseffect)
127 enum InvalidateReason {
128 OpacityChanged
129 };
130 void invalidateParentGraphicsEffectsRecursively();
131 void invalidateChildGraphicsEffectsRecursively(InvalidateReason reason);
132#endif // QT_CONFIG(graphicseffect)
133 void invalidateDepthRecursively();
134 void resolveDepth();
135 void addChild(QGraphicsItem *child);
136 void removeChild(QGraphicsItem *child);
137 void setParentItemHelper(QGraphicsItem *parent, const QVariant *newParentVariant,
138 const QVariant *thisPointerVariant);
139 void childrenBoundingRectHelper(QTransform *x, QRectF *rect, QGraphicsItem *topMostEffectItem);
140 void initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform,
141 const QRegion &exposedRegion, bool allItems = false) const;
142 QRectF effectiveBoundingRect(QGraphicsItem *topMostEffectItem = nullptr) const;
143 QRectF sceneEffectiveBoundingRect() const;
144
145 QRectF effectiveBoundingRect(const QRectF &rect) const;
146
147 virtual void resolveFont(uint inheritedMask)
148 {
149 for (int i = 0; i < children.size(); ++i)
150 children.at(i)->d_ptr->resolveFont(inheritedMask);
151 }
152
153 virtual void resolvePalette(uint inheritedMask)
154 {
155 for (int i = 0; i < children.size(); ++i)
156 children.at(i)->d_ptr->resolvePalette(inheritedMask);
157 }
158
159 virtual bool isProxyWidget() const;
160
161 inline QVariant extra(Extra type) const
162 {
163 for (int i = 0; i < extras.size(); ++i) {
164 const ExtraStruct &extra = extras.at(i);
165 if (extra.type == type)
166 return extra.value;
167 }
168 return QVariant();
169 }
170
171 inline void setExtra(Extra type, const QVariant &value)
172 {
173 int index = -1;
174 for (int i = 0; i < extras.size(); ++i) {
175 if (extras.at(i).type == type) {
176 index = i;
177 break;
178 }
179 }
180
181 if (index == -1) {
182 extras << ExtraStruct(type, value);
183 } else {
184 extras[index].value = value;
185 }
186 }
187
188 inline void unsetExtra(Extra type)
189 {
190 for (int i = 0; i < extras.size(); ++i) {
191 if (extras.at(i).type == type) {
192 extras.removeAt(i);
193 return;
194 }
195 }
196 }
197
198 struct ExtraStruct {
199 ExtraStruct() { } // for QList, don't use
200 ExtraStruct(Extra type, const QVariant &value)
201 : type(type), value(value)
202 { }
203
204 Extra type;
205 QVariant value;
206
207 bool operator<(Extra extra) const
208 { return type < extra; }
209 };
210
211 QList<ExtraStruct> extras;
212
213 QGraphicsItemCache *maybeExtraItemCache() const;
214 QGraphicsItemCache *extraItemCache() const;
215 void removeExtraItemCache();
216
217 void updatePaintedViewBoundingRects(bool updateChildren);
218 void ensureSceneTransformRecursive(QGraphicsItem **topMostDirtyItem);
219 inline void ensureSceneTransform()
220 {
221 QGraphicsItem *that = q_func();
222 ensureSceneTransformRecursive(&that);
223 }
224
225 inline bool hasTranslateOnlySceneTransform()
226 {
227 ensureSceneTransform();
228 return sceneTransformTranslateOnly;
229 }
230
231 inline void invalidateChildrenSceneTransform()
232 {
233 for (int i = 0; i < children.size(); ++i)
234 children.at(i)->d_ptr->dirtySceneTransform = 1;
235 }
236
237 inline qreal calcEffectiveOpacity() const
238 {
239 qreal o = opacity;
240 QGraphicsItem *p = parent;
241 int myFlags = flags;
242 while (p) {
243 int parentFlags = p->d_ptr->flags;
244
245 // If I have a parent, and I don't ignore my parent's opacity, and my
246 // parent propagates to me, then combine my local opacity with my parent's
247 // effective opacity into my effective opacity.
248 if ((myFlags & QGraphicsItem::ItemIgnoresParentOpacity)
249 || (parentFlags & QGraphicsItem::ItemDoesntPropagateOpacityToChildren)) {
250 break;
251 }
252
253 o *= p->d_ptr->opacity;
254 p = p->d_ptr->parent;
255 myFlags = parentFlags;
256 }
257 return o;
258 }
259
260 inline bool isOpacityNull() const
261 { return (opacity < qreal(0.001)); }
262
263 static inline bool isOpacityNull(qreal opacity)
264 { return (opacity < qreal(0.001)); }
265
266 inline bool isFullyTransparent() const
267 {
268 if (isOpacityNull())
269 return true;
270 if (!parent)
271 return false;
272
273 return isOpacityNull(calcEffectiveOpacity());
274 }
275
276 inline qreal effectiveOpacity() const {
277 if (!parent || !opacity)
278 return opacity;
279
280 return calcEffectiveOpacity();
281 }
282
283 inline qreal combineOpacityFromParent(qreal parentOpacity) const
284 {
285 if (parent && !(flags & QGraphicsItem::ItemIgnoresParentOpacity)
286 && !(parent->d_ptr->flags & QGraphicsItem::ItemDoesntPropagateOpacityToChildren)) {
287 return parentOpacity * opacity;
288 }
289 return opacity;
290 }
291
292 inline bool childrenCombineOpacity() const
293 {
294 if (!children.size())
295 return true;
296 if (flags & QGraphicsItem::ItemDoesntPropagateOpacityToChildren)
297 return false;
298
299 for (int i = 0; i < children.size(); ++i) {
300 if (children.at(i)->d_ptr->flags & QGraphicsItem::ItemIgnoresParentOpacity)
301 return false;
302 }
303 return true;
304 }
305
306 inline bool childrenClippedToShape() const
307 { return (flags & QGraphicsItem::ItemClipsChildrenToShape) || children.isEmpty(); }
308
309 inline bool isInvisible() const
310 {
311 return !visible || (childrenCombineOpacity() && isFullyTransparent());
312 }
313
314 inline void markParentDirty(bool updateBoundingRect = false);
315
316 void setFocusHelper(Qt::FocusReason focusReason, bool climb, bool focusFromHide);
317 void clearFocusHelper(bool giveFocusToParent, bool hiddenByParentPanel);
318 void setSubFocus(QGraphicsItem *rootItem = nullptr, QGraphicsItem *stopItem = nullptr);
319 void clearSubFocus(QGraphicsItem *rootItem = nullptr, QGraphicsItem *stopItem = nullptr);
320 void resetFocusProxy();
321 virtual void subFocusItemChange();
322 virtual void focusScopeItemChange(bool isSubFocusItem);
323
324 inline QTransform transformToParent() const;
325 inline void ensureSortedChildren();
326 static inline bool insertionOrder(QGraphicsItem *a, QGraphicsItem *b);
327 void ensureSequentialSiblingIndex();
328 inline void sendScenePosChange();
329 virtual void siblingOrderChange();
330
331 // Private Properties
332 virtual qreal width() const;
333 virtual void setWidth(qreal);
334 virtual void resetWidth();
335
336 virtual qreal height() const;
337 virtual void setHeight(qreal);
338 virtual void resetHeight();
339
340 QRectF childrenBoundingRect;
341 QRectF needsRepaint;
342 QHash<QWidget *, QRect> paintedViewBoundingRects;
343 QPointF pos;
344 qreal z;
345 qreal opacity;
346 QGraphicsScene *scene;
347 QGraphicsItem *parent;
348 QList<QGraphicsItem *> children;
349 struct TransformData;
350 TransformData *transformData;
351 QGraphicsEffect *graphicsEffect;
352 QTransform sceneTransform;
353 int index;
354 int siblingIndex;
355 int itemDepth; // Lazily calculated when calling depth().
356 QGraphicsItem *focusProxy;
357 QList<QGraphicsItem **> focusProxyRefs;
358 QGraphicsItem *subFocusItem;
359 QGraphicsItem *focusScopeItem;
360 Qt::InputMethodHints imHints;
361 QGraphicsItem::PanelModality panelModality;
362#ifndef QT_NO_GESTURES
363 QMap<Qt::GestureType, Qt::GestureFlags> gestureContext;
364#endif
365
366 // Packed 32 bits
367 quint32 acceptedMouseButtons : 5;
368 quint32 visible : 1;
369 quint32 explicitlyHidden : 1;
370 quint32 enabled : 1;
371 quint32 explicitlyDisabled : 1;
372 quint32 selected : 1;
373 quint32 acceptsHover : 1;
374 quint32 acceptDrops : 1;
375 quint32 isMemberOfGroup : 1;
376 quint32 handlesChildEvents : 1;
377 quint32 itemDiscovered : 1;
378 quint32 hasCursor : 1;
379 quint32 ancestorFlags : 5;
380 quint32 cacheMode : 2;
381 quint32 hasBoundingRegionGranularity : 1;
382 quint32 isWidget : 1;
383 quint32 dirty : 1;
384 quint32 dirtyChildren : 1;
385 quint32 localCollisionHack : 1;
386 quint32 inSetPosHelper : 1;
387 quint32 needSortChildren : 1;
388 quint32 allChildrenDirty : 1;
389 quint32 fullUpdatePending : 1;
390
391 // Packed 32 bits
392 quint32 flags : 20;
393 quint32 paintedViewBoundingRectsNeedRepaint : 1;
394 quint32 dirtySceneTransform : 1;
395 quint32 geometryChanged : 1;
396 quint32 inDestructor : 1;
397 quint32 isObject : 1;
398 quint32 ignoreVisible : 1;
399 quint32 ignoreOpacity : 1;
400 quint32 acceptTouchEvents : 1;
401 quint32 acceptedTouchBeginEvent : 1;
402 quint32 filtersDescendantEvents : 1;
403 quint32 sceneTransformTranslateOnly : 1;
404 quint32 notifyBoundingRectChanged : 1;
405#ifdef Q_OS_WASM
406 unsigned char :0; //this aligns 64bit field for wasm see QTBUG-65259
407#endif
408 // New 32 bits
409 quint32 notifyInvalidated : 1;
410 quint32 mouseSetsFocus : 1;
411 quint32 explicitActivate : 1;
412 quint32 wantsActive : 1;
413 quint32 holesInSiblingIndex : 1;
414 quint32 sequentialOrdering : 1;
415 quint32 updateDueToGraphicsEffect : 1;
416 quint32 scenePosDescendants : 1;
417 quint32 pendingPolish : 1;
418 quint32 mayHaveChildWithGraphicsEffect : 1;
419 quint32 sendParentChangeNotification : 1;
420 quint32 dirtyChildrenBoundingRect : 1;
421 quint32 padding : 20;
422
423 // Optional stacking order
424 int globalStackingOrder;
425 QGraphicsItem *q_ptr;
426};
428
429struct QGraphicsItemPrivate::TransformData
430{
431 QTransform transform;
432 qreal scale;
433 qreal rotation;
434 qreal xOrigin;
435 qreal yOrigin;
436 QList<QGraphicsTransform *> graphicsTransforms;
437 bool onlyTransform;
438
439 TransformData() :
440 scale(1.0), rotation(0.0),
441 xOrigin(0.0), yOrigin(0.0),
442 onlyTransform(true)
443 { }
444
445 QTransform computedFullTransform(QTransform *postmultiplyTransform = nullptr) const
446 {
447 if (onlyTransform) {
448 if (!postmultiplyTransform || postmultiplyTransform->isIdentity())
449 return transform;
450 if (transform.isIdentity())
451 return *postmultiplyTransform;
452 return transform * *postmultiplyTransform;
453 }
454
455 QTransform x(transform);
456 if (!graphicsTransforms.isEmpty()) {
457 QMatrix4x4 m;
458 for (int i = 0; i < graphicsTransforms.size(); ++i)
459 graphicsTransforms.at(i)->applyTo(&m);
460 x *= m.toTransform();
461 }
462 x.translate(xOrigin, yOrigin);
463 x.rotate(rotation);
464 x.scale(scale, scale);
465 x.translate(-xOrigin, -yOrigin);
466 if (postmultiplyTransform)
467 x *= *postmultiplyTransform;
468 return x;
469 }
470};
471
473{
474 inline QGraphicsItemPaintInfo(const QTransform *const xform1, const QTransform *const xform2,
475 const QTransform *const xform3,
476 QRegion *r, QWidget *w, QStyleOptionGraphicsItem *opt,
477 QPainter *p, qreal o, bool b1, bool b2)
478 : viewTransform(xform1), transformPtr(xform2), effectTransform(xform3), exposedRegion(r), widget(w),
479 option(opt), painter(p), opacity(o), wasDirtySceneTransform(b1), drawItem(b2)
480 {}
481
487 QStyleOptionGraphicsItem *option;
492};
493
494#if QT_CONFIG(graphicseffect)
495class QGraphicsItemEffectSourcePrivate : public QGraphicsEffectSourcePrivate
496{
497public:
498 QGraphicsItemEffectSourcePrivate(QGraphicsItem *i)
499 : QGraphicsEffectSourcePrivate(), item(i), info(nullptr)
500 {}
501
502 void detach() override
503 {
504 item->d_ptr->graphicsEffect = nullptr;
505 item->prepareGeometryChange();
506 }
507
508 const QGraphicsItem *graphicsItem() const override
509 { return item; }
510
511 const QWidget *widget() const override
512 { return nullptr; }
513
514 void update() override {
515 item->d_ptr->updateDueToGraphicsEffect = true;
516 item->update();
517 item->d_ptr->updateDueToGraphicsEffect = false;
518 }
519
520 void effectBoundingRectChanged() override
521 { item->prepareGeometryChange(); }
522
523 bool isPixmap() const override
524 {
525 return item->type() == QGraphicsPixmapItem::Type
526 && !(item->flags() & QGraphicsItem::ItemIsSelectable)
527 && item->d_ptr->children.size() == 0;
528 }
529
530 const QStyleOption *styleOption() const override
531 { return info ? info->option : nullptr; }
532
533 QRect deviceRect() const override
534 {
535 if (!info || !info->widget) {
536 qWarning("QGraphicsEffectSource::deviceRect: Not yet implemented, lacking device context");
537 return QRect();
538 }
539 return info->widget->rect();
540 }
541
542 QRectF boundingRect(Qt::CoordinateSystem system) const override;
543 void draw(QPainter *) override;
544 QPixmap pixmap(Qt::CoordinateSystem system,
545 QPoint *offset,
546 QGraphicsEffect::PixmapPadMode mode) const override;
547 QRectF paddedEffectRect(Qt::CoordinateSystem system, QGraphicsEffect::PixmapPadMode mode, const QRectF &sourceRect, bool *unpadded = nullptr) const;
548
549 QGraphicsItem *item;
550 QGraphicsItemPaintInfo *info;
551 QTransform lastEffectTransform;
552};
553#endif // QT_CONFIG(graphicseffect)
554
555/*!
556 Returns \c true if \a item1 is on top of \a item2.
557 The items don't need to be siblings.
558
559 \internal
560*/
561inline bool qt_closestItemFirst(const QGraphicsItem *item1, const QGraphicsItem *item2)
562{
563 // Siblings? Just check their z-values.
564 const QGraphicsItemPrivate *d1 = item1->d_ptr.data();
565 const QGraphicsItemPrivate *d2 = item2->d_ptr.data();
566 if (d1->parent == d2->parent)
567 return qt_closestLeaf(item1, item2);
568
569 // Find common ancestor, and each item's ancestor closest to the common
570 // ancestor.
571 int item1Depth = d1->depth();
572 int item2Depth = d2->depth();
573 const QGraphicsItem *p = item1;
574 const QGraphicsItem *t1 = item1;
575 while (item1Depth > item2Depth && (p = p->d_ptr->parent)) {
576 if (p == item2) {
577 // item2 is one of item1's ancestors; item1 is on top
578 return !(t1->d_ptr->flags & QGraphicsItem::ItemStacksBehindParent);
579 }
580 t1 = p;
581 --item1Depth;
582 }
583 p = item2;
584 const QGraphicsItem *t2 = item2;
585 while (item2Depth > item1Depth && (p = p->d_ptr->parent)) {
586 if (p == item1) {
587 // item1 is one of item2's ancestors; item1 is not on top
588 return (t2->d_ptr->flags & QGraphicsItem::ItemStacksBehindParent);
589 }
590 t2 = p;
591 --item2Depth;
592 }
593
594 // item1Ancestor is now at the same level as item2Ancestor, but not the same.
595 const QGraphicsItem *p1 = t1;
596 const QGraphicsItem *p2 = t2;
597 while (t1 && t1 != t2) {
598 p1 = t1;
599 p2 = t2;
600 t1 = t1->d_ptr->parent;
601 t2 = t2->d_ptr->parent;
602 }
603
604 // in case we have a common ancestor, we compare the immediate children in the ancestor's path.
605 // otherwise we compare the respective items' topLevelItems directly.
606 return qt_closestLeaf(p1, p2);
607}
608
609/*!
610 Returns \c true if \a item2 is on top of \a item1.
611 The items don't need to be siblings.
612
613 \internal
614*/
615inline bool qt_closestItemLast(const QGraphicsItem *item1, const QGraphicsItem *item2)
616{
617 return qt_closestItemFirst(item2, item1);
618}
619
620/*!
621 \internal
622*/
623inline bool qt_closestLeaf(const QGraphicsItem *item1, const QGraphicsItem *item2)
624{
625 // Return true if sibling item1 is on top of item2.
626 const QGraphicsItemPrivate *d1 = item1->d_ptr.data();
627 const QGraphicsItemPrivate *d2 = item2->d_ptr.data();
628 bool f1 = d1->flags & QGraphicsItem::ItemStacksBehindParent;
629 bool f2 = d2->flags & QGraphicsItem::ItemStacksBehindParent;
630 if (f1 != f2)
631 return f2;
632 if (d1->z != d2->z)
633 return d1->z > d2->z;
634 return d1->siblingIndex > d2->siblingIndex;
635}
636
637/*!
638 \internal
639*/
640inline bool qt_notclosestLeaf(const QGraphicsItem *item1, const QGraphicsItem *item2)
641{ return qt_closestLeaf(item2, item1); }
642
643/*
644 return the full transform of the item to the parent. This include the position and all the transform data
645*/
646inline QTransform QGraphicsItemPrivate::transformToParent() const
647{
648 QTransform matrix;
649 combineTransformToParent(&matrix);
650 return matrix;
651}
652
653/*!
654 \internal
655*/
656inline void QGraphicsItemPrivate::ensureSortedChildren()
657{
658 if (needSortChildren) {
659 needSortChildren = 0;
660 sequentialOrdering = 1;
661 if (children.isEmpty())
662 return;
663 std::sort(children.begin(), children.end(), qt_notclosestLeaf);
664 for (int i = 0; i < children.size(); ++i) {
665 if (children.at(i)->d_ptr->siblingIndex != i) {
666 sequentialOrdering = 0;
667 break;
668 }
669 }
670 }
671}
672
673/*!
674 \internal
675*/
676inline bool QGraphicsItemPrivate::insertionOrder(QGraphicsItem *a, QGraphicsItem *b)
677{
678 return a->d_ptr->siblingIndex < b->d_ptr->siblingIndex;
679}
680
681/*!
682 \internal
683*/
684inline void QGraphicsItemPrivate::markParentDirty(bool updateBoundingRect)
685{
686 QGraphicsItemPrivate *parentp = this;
687#if QT_CONFIG(graphicseffect)
688 if (updateBoundingRect && parentp->graphicsEffect && !parentp->inSetPosHelper) {
689 parentp->notifyInvalidated = 1;
690 static_cast<QGraphicsItemEffectSourcePrivate *>(parentp->graphicsEffect->d_func()
691 ->source->d_func())->invalidateCache();
692 }
693#endif
694 while (parentp->parent) {
695 parentp = parentp->parent->d_ptr.data();
696 parentp->dirtyChildren = 1;
697
698 if (updateBoundingRect) {
699 parentp->dirtyChildrenBoundingRect = 1;
700 // ### Only do this if the parent's effect applies to the entire subtree.
701 parentp->notifyBoundingRectChanged = 1;
702 }
703#if QT_CONFIG(graphicseffect)
704 if (parentp->graphicsEffect) {
705 if (updateBoundingRect) {
706 static_cast<QGraphicsItemEffectSourcePrivate *>(parentp->graphicsEffect->d_func()
707 ->source->d_func())->invalidateCache();
708 parentp->notifyInvalidated = 1;
709 }
710 if (parentp->scene && parentp->graphicsEffect->isEnabled()) {
711 parentp->dirty = 1;
712 parentp->fullUpdatePending = 1;
713 }
714 }
715#endif
716 }
717}
718
719QT_END_NAMESPACE
720
721#endif
The QAbstractGraphicsShapeItem class provides a common base for all path items.
The QGraphicsEllipseItem class provides an ellipse item that you can add to a QGraphicsScene.
QList< QRectF > exposed
QHash< QPaintDevice *, DeviceData > deviceData
QHash< const QGraphicsItem *, QMap< int, QVariant > > data
The QGraphicsItemGroup class provides a container that treats a group of items as a single item.
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
The QGraphicsLineItem class provides a line item that you can add to a QGraphicsScene.
The QGraphicsObject class provides a base class for all graphics items that require signals,...
QGraphicsPixmapItem::ShapeMode shapeMode
Qt::TransformationMode transformationMode
The QGraphicsPixmapItem class provides a pixmap item that you can add to a QGraphicsScene.
The QGraphicsPolygonItem class provides a polygon item that you can add to a QGraphicsScene.
The QGraphicsRectItem class provides a rectangle item that you can add to a QGraphicsScene.
The QGraphicsSceneContextMenuEvent class provides context menu events in the graphics view framework.
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...
The QGraphicsSceneEvent class provides a base class for all graphics view related events.
The QGraphicsSceneHelpEvent class provides events when a tooltip is requested.
The QGraphicsSceneHoverEvent class provides hover events in the graphics view framework.
The QGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.
The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework.
The QGraphicsSceneResizeEvent class provides events for widget resizing in the graphics view framewor...
The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items.
The QGraphicsSimpleTextItem class provides a simple text item that you can add to a QGraphicsScene.
void _q_updateBoundingRect(const QSizeF &)
bool _q_mouseOnEdge(QGraphicsSceneMouseEvent *)
QWidgetTextControl * control
QWidgetTextControl * textControl() const
void sendControlEvent(QEvent *e)
The QGraphicsTextItem class provides a text item that you can add to a QGraphicsScene to display form...
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
friend class QPainter
\inmodule QtGui
friend class QWidget
Definition qpainter.h:431
\inmodule QtCore\reentrant
Definition qpoint.h:231
The QPolygonF class provides a list of points using floating point precision.
Definition qpolygon.h:96
QT_REQUIRE_CONFIG(animation)
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition qdir.cpp:2568
static void formatGraphicsItemHelper(QDebug debug, const QGraphicsItem *item)
bool _qt_movableAncestorIsSelected(const QGraphicsItem *item)
static QRectF setupTextLayout(QTextLayout *layout)
QDebug operator<<(QDebug debug, const QGraphicsObject *item)
static QPainterPath qt_graphicsItem_shapeFromPath(const QPainterPath &path, const QPen &pen)
QDebug operator<<(QDebug debug, const QGraphicsItem *item)
static bool qt_QGraphicsItem_isObscured(const QGraphicsItem *item, const QGraphicsItem *other, const QRectF &rect)
bool qt_closestItemLast(const QGraphicsItem *item1, const QGraphicsItem *item2)
Returns true if item2 is on top of item1.
bool qt_closestLeaf(const QGraphicsItem *item1, const QGraphicsItem *item2)
bool qt_notclosestLeaf(const QGraphicsItem *item1, const QGraphicsItem *item2)
bool qt_closestItemFirst(const QGraphicsItem *item1, const QGraphicsItem *item2)
Returns true if item1 is on top of item2.
QT_REQUIRE_CONFIG(graphicsview)
static QRectF adjustedItemBoundingRect(const QGraphicsItem *item)
static QRectF adjustedItemEffectiveBoundingRect(const QGraphicsItem *item)
static void _q_adjustRect(QRectF *rect)
QDebug operator<<(QDebug debug, QIODevice::OpenMode modes)
Q_DECLARE_TYPEINFO(QObjectPrivate::ConnectionList, Q_RELOCATABLE_TYPE)
const QTransform * transformPtr
const QTransform * effectTransform
QStyleOptionGraphicsItem * option
const QTransform * viewTransform