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
qquickitem_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 QQUICKITEM_P_H
6#define QQUICKITEM_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 purely as an
13// implementation detail. 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 <QtQuick/private/qquickanchors_p.h>
20#include <QtQuick/private/qquickanchors_p_p.h>
21#include <QtQuick/private/qquickitemchangelistener_p.h>
22#include <QtQuick/private/qquickevents_p_p.h>
23#include <QtQuick/private/qquickclipnode_p.h>
24#include <QtQuick/private/qquickstate_p.h>
25#include <QtQuick/private/qquickpaletteproviderprivatebase_p.h>
26#include <QtQuick/private/qquickwindow_p.h>
27#include <QtCore/private/qproperty_p.h>
28
29#if QT_CONFIG(quick_shadereffect)
30#include <QtQuick/private/qquickshadereffectsource_p.h>
31#endif
32
33#include <QtQuick/qquickitem.h>
34#include <QtQuick/qsgnode.h>
35
36#include <QtQml/private/qqmlnullablevalue_p.h>
37#include <QtQml/private/qqmlnotifier_p.h>
38#include <QtQml/private/qqmlglobal_p.h>
39#include <QtQml/private/qlazilyallocated_p.h>
40#include <QtQml/qqml.h>
41#include <QtQml/qqmlcontext.h>
42
43#include <QtCore/qlist.h>
44#include <QtCore/qdebug.h>
45#include <QtCore/qelapsedtimer.h>
46#include <QtCore/qpointer.h>
47
48#include <QtGui/private/qlayoutpolicy_p.h>
49#if QT_CONFIG(accessibility)
50#include <QtGui/qaccessible_base.h>
51#endif
52
53QT_BEGIN_NAMESPACE
54
55Q_DECLARE_LOGGING_CATEGORY(lcHandlerParent)
56Q_DECLARE_LOGGING_CATEGORY(lcVP)
57
58class QNetworkReply;
59class QQuickItemKeyFilter;
62class QQuickScreenAttached;
63class QQuickPointerHandler;
64
65namespace QtPrivate {
66class QQuickAttachedPropertyPropagator;
67}
68
70{
72public:
75
76 QRectF rectF() const { return m_contents; }
77
78 inline void calcGeometry(QQuickItem *changed = nullptr);
79 void complete();
80
81 bool inDestructor = false;
82
83protected:
84 void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &) override;
85 void itemDestroyed(QQuickItem *item) override;
86 void itemChildAdded(QQuickItem *, QQuickItem *) override;
87 void itemChildRemoved(QQuickItem *, QQuickItem *) override;
88 //void itemVisibilityChanged(QQuickItem *item)
89
90private:
91 bool calcHeight(QQuickItem *changed = nullptr);
92 bool calcWidth(QQuickItem *changed = nullptr);
93 void updateRect();
94
95 QQuickItem *m_item;
96 QRectF m_contents;
97};
98
99void QQuickContents::calcGeometry(QQuickItem *changed)
100{
101 bool wChanged = calcWidth(changed);
102 bool hChanged = calcHeight(changed);
103 if (wChanged || hChanged)
104 updateRect();
105}
106
108{
109 Q_DECLARE_PUBLIC(QQuickTransform)
110public:
112
114
116};
117
118#if QT_CONFIG(quick_shadereffect)
119
120class Q_QUICK_EXPORT QQuickItemLayer : public QObject,
121 public QSafeQuickItemChangeListener<QQuickItemLayer>
122{
123 Q_OBJECT
124 Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged FINAL)
125 Q_PROPERTY(QSize textureSize READ size WRITE setSize NOTIFY sizeChanged FINAL)
126 Q_PROPERTY(QRectF sourceRect READ sourceRect WRITE setSourceRect NOTIFY sourceRectChanged FINAL)
127 Q_PROPERTY(bool mipmap READ mipmap WRITE setMipmap NOTIFY mipmapChanged FINAL)
128 Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged FINAL)
129 Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged REVISION(6, 5) FINAL)
130 Q_PROPERTY(QQuickShaderEffectSource::WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged FINAL)
131 Q_PROPERTY(QQuickShaderEffectSource::Format format READ format WRITE setFormat NOTIFY formatChanged FINAL)
132 Q_PROPERTY(QByteArray samplerName READ name WRITE setName NOTIFY nameChanged FINAL)
133 Q_PROPERTY(QQmlComponent *effect READ effect WRITE setEffect NOTIFY effectChanged FINAL)
134 Q_PROPERTY(QQuickShaderEffectSource::TextureMirroring textureMirroring READ textureMirroring WRITE setTextureMirroring NOTIFY textureMirroringChanged FINAL)
135 Q_PROPERTY(int samples READ samples WRITE setSamples NOTIFY samplesChanged FINAL)
136 QML_ANONYMOUS
137 QML_ADDED_IN_VERSION(2, 0)
138
139public:
140 QQuickItemLayer(QQuickItem *item);
141 ~QQuickItemLayer() override;
142
143 void classBegin();
144 void componentComplete();
145
146 bool enabled() const { return m_enabled; }
147 void setEnabled(bool enabled);
148
149 bool mipmap() const { return m_mipmap; }
150 void setMipmap(bool mipmap);
151
152 bool smooth() const { return m_smooth; }
153 void setSmooth(bool s);
154
155 bool live() const { return m_live; }
156 void setLive(bool live);
157
158 QSize size() const { return m_size; }
159 void setSize(const QSize &size);
160
161 QQuickShaderEffectSource::Format format() const { return m_format; }
162 void setFormat(QQuickShaderEffectSource::Format f);
163
164 QRectF sourceRect() const { return m_sourceRect; }
165 void setSourceRect(const QRectF &sourceRect);
166
167 QQuickShaderEffectSource::WrapMode wrapMode() const { return m_wrapMode; }
168 void setWrapMode(QQuickShaderEffectSource::WrapMode mode);
169
170 QByteArray name() const { return m_name; }
171 void setName(const QByteArray &name);
172
173 QQmlComponent *effect() const { return m_effectComponent; }
174 void setEffect(QQmlComponent *effect);
175
176 QQuickShaderEffectSource::TextureMirroring textureMirroring() const { return m_textureMirroring; }
177 void setTextureMirroring(QQuickShaderEffectSource::TextureMirroring mirroring);
178
179 int samples() const { return m_samples; }
180 void setSamples(int count);
181
182 QQuickShaderEffectSource *effectSource() const { return m_effectSource; }
183
184 void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override;
185 void itemOpacityChanged(QQuickItem *) override;
186 void itemParentChanged(QQuickItem *, QQuickItem *) override;
187 void itemSiblingOrderChanged(QQuickItem *) override;
188 void itemVisibilityChanged(QQuickItem *) override;
189
190 void updateMatrix();
191 void updateGeometry();
192 void updateOpacity();
193 void updateZ();
194
195Q_SIGNALS:
196 void enabledChanged(bool enabled);
197 void sizeChanged(const QSize &size);
198 void mipmapChanged(bool mipmap);
199 void wrapModeChanged(QQuickShaderEffectSource::WrapMode mode);
200 void nameChanged(const QByteArray &name);
201 void effectChanged(QQmlComponent *component);
202 void smoothChanged(bool smooth);
203 void liveChanged(bool live);
204 void formatChanged(QQuickShaderEffectSource::Format format);
205 void sourceRectChanged(const QRectF &sourceRect);
206 void textureMirroringChanged(QQuickShaderEffectSource::TextureMirroring mirroring);
207 void samplesChanged(int count);
208
209private:
210 friend class QQuickTransformAnimatorJob;
211 friend class QQuickOpacityAnimatorJob;
212
213 void activate();
214 void deactivate();
215 void activateEffect();
216 void deactivateEffect();
217
218 QQuickItem *m_item;
219 bool m_enabled;
220 bool m_mipmap;
221 bool m_smooth;
222 bool m_live;
223 bool m_componentComplete;
224 QQuickShaderEffectSource::WrapMode m_wrapMode;
225 QQuickShaderEffectSource::Format m_format;
226 QSize m_size;
227 QRectF m_sourceRect;
228 QByteArray m_name;
229 QQmlComponent *m_effectComponent;
230 QQuickItem *m_effect;
231 QQuickShaderEffectSource *m_effectSource;
232 QQuickShaderEffectSource::TextureMirroring m_textureMirroring;
233 int m_samples;
234};
235
236#endif
237
238class Q_QUICK_EXPORT QQuickItemPrivate
239 : public QObjectPrivate
240 , public QQuickPaletteProviderPrivateBase<QQuickItem, QQuickItemPrivate>
241{
242 Q_DECLARE_PUBLIC(QQuickItem)
243
244public:
245 static QQuickItemPrivate* get(QQuickItem *item) { return item->d_func(); }
246 static const QQuickItemPrivate* get(const QQuickItem *item) { return item->d_func(); }
247
248 QQuickItemPrivate();
249 ~QQuickItemPrivate() override;
250 void init(QQuickItem *parent);
251
252 QQmlListProperty<QObject> data();
253 QQmlListProperty<QObject> resources();
254 QQmlListProperty<QQuickItem> children();
255 QQmlListProperty<QQuickItem> visibleChildren();
256
257 QQmlListProperty<QQuickState> states();
258 QQmlListProperty<QQuickTransition> transitions();
259
260 QString state() const;
261 void setState(const QString &);
262
263 QQuickAnchorLine left() const;
264 QQuickAnchorLine right() const;
265 QQuickAnchorLine horizontalCenter() const;
266 QQuickAnchorLine top() const;
267 QQuickAnchorLine bottom() const;
268 QQuickAnchorLine verticalCenter() const;
269 QQuickAnchorLine baseline() const;
270
271#if QT_CONFIG(quick_shadereffect)
272 QQuickItemLayer *layer() const;
273#endif
274
275 void localizedTouchEvent(const QTouchEvent *event, bool isFiltering, QMutableTouchEvent *localized);
276 bool hasPointerHandlers() const;
277 bool hasEnabledHoverHandlers() const;
278 virtual void addPointerHandler(QQuickPointerHandler *h);
279 virtual void removePointerHandler(QQuickPointerHandler *h);
280
281 QObject *setContextMenu(QObject *menu);
282
283 virtual QtPrivate::QQuickAttachedPropertyPropagator *attachedPropertyPropagator_parent(
284 const QMetaObject *attachedType);
285
286 // data property
287 static void data_append(QQmlListProperty<QObject> *, QObject *);
288 static qsizetype data_count(QQmlListProperty<QObject> *);
289 static QObject *data_at(QQmlListProperty<QObject> *, qsizetype);
290 static void data_clear(QQmlListProperty<QObject> *);
291 static void data_removeLast(QQmlListProperty<QObject> *);
292
293 // resources property
294 static QObject *resources_at(QQmlListProperty<QObject> *, qsizetype);
295 static void resources_append(QQmlListProperty<QObject> *, QObject *);
296 static qsizetype resources_count(QQmlListProperty<QObject> *);
297 static void resources_clear(QQmlListProperty<QObject> *);
298 static void resources_removeLast(QQmlListProperty<QObject> *);
299
300 // children property
301 static void children_append(QQmlListProperty<QQuickItem> *, QQuickItem *);
302 static qsizetype children_count(QQmlListProperty<QQuickItem> *);
303 static QQuickItem *children_at(QQmlListProperty<QQuickItem> *, qsizetype);
304 static void children_clear(QQmlListProperty<QQuickItem> *);
305 static void children_removeLast(QQmlListProperty<QQuickItem> *);
306
307 // visibleChildren property
308 static qsizetype visibleChildren_count(QQmlListProperty<QQuickItem> *prop);
309 static QQuickItem *visibleChildren_at(QQmlListProperty<QQuickItem> *prop, qsizetype index);
310
311 // transform property
312 static qsizetype transform_count(QQmlListProperty<QQuickTransform> *list);
313 static void transform_append(QQmlListProperty<QQuickTransform> *list, QQuickTransform *);
314 static QQuickTransform *transform_at(QQmlListProperty<QQuickTransform> *list, qsizetype);
315 static void transform_clear(QQmlListProperty<QQuickTransform> *list);
316
317 void _q_resourceObjectDeleted(QObject *);
318 quint64 _q_createJSWrapper(QQmlV4ExecutionEnginePtr engine);
319
320 enum ChangeType {
321 Geometry = 0x01,
322 SiblingOrder = 0x02,
323 Visibility = 0x04,
324 Opacity = 0x08,
325 Destroyed = 0x10,
326 Parent = 0x20,
327 Children = 0x40,
328 Rotation = 0x80,
329 ImplicitWidth = 0x100,
330 ImplicitHeight = 0x200,
331 Enabled = 0x400,
332 Focus = 0x800,
333 Scale = 0x1000,
334 Matrix = 0x2000,
335 AllChanges = 0xFFFFFFFF
336 };
337
338 Q_DECLARE_FLAGS(ChangeTypes, ChangeType)
339 friend inline QDebug &operator<<(QDebug &dbg, QQuickItemPrivate::ChangeTypes types) {
340#define CHANGETYPE_OUTPUT(Type) if (types & QQuickItemPrivate::Type) { dbg << first << #Type ; first = '|'; }
341 QDebugStateSaver state(dbg);
342 dbg.noquote().nospace();
343 if (types == QQuickItemPrivate::AllChanges) {
344 dbg << " AllChanges";
345 } else {
346 char first = ' ';
347 CHANGETYPE_OUTPUT(Geometry);
348 CHANGETYPE_OUTPUT(SiblingOrder);
349 CHANGETYPE_OUTPUT(Visibility);
350 CHANGETYPE_OUTPUT(Opacity);
351 CHANGETYPE_OUTPUT(Destroyed);
352 CHANGETYPE_OUTPUT(Parent);
353 CHANGETYPE_OUTPUT(Children);
354 CHANGETYPE_OUTPUT(Rotation);
355 CHANGETYPE_OUTPUT(ImplicitWidth);
356 CHANGETYPE_OUTPUT(ImplicitHeight);
357 CHANGETYPE_OUTPUT(Enabled);
358 CHANGETYPE_OUTPUT(Focus);
359 CHANGETYPE_OUTPUT(Scale);
360 CHANGETYPE_OUTPUT(Matrix);
361#undef CHANGETYPE_OUTPUT
362 }
363 return dbg;
364 }
365
366 struct ChangeListener {
367 using ChangeTypes = QQuickItemPrivate::ChangeTypes;
368
369 ChangeListener(QQuickItemChangeListener *l = nullptr, ChangeTypes t = { })
370 : listener(l)
371 , types(t)
372 , gTypes(QQuickGeometryChange::All)
373 {}
374
375 ChangeListener(QQuickItemChangeListener *l, QQuickGeometryChange gt)
376 : listener(l)
377 , types(Geometry)
378 , gTypes(gt)
379 {}
380
381 bool operator==(const ChangeListener &other) const
382 { return listener == other.listener && types == other.types; }
383
384 QQuickItemChangeListener *listener;
385 ChangeTypes types;
386 QQuickGeometryChange gTypes; //NOTE: not used for ==
387
388#ifndef QT_NO_DEBUG_STREAM
389 private:
390 friend QDebug operator<<(QDebug debug, const QQuickItemPrivate::ChangeListener &listener);
391#endif // QT_NO_DEBUG_STREAM
392 };
393
394 // call QQuickItemChangeListener
395 template <typename Fn, typename ...Args>
396 void notifyChangeListeners(QQuickItemPrivate::ChangeTypes changeTypes, Fn &&function, Args &&...args)
397 {
398 Q_Q(QQuickItem);
399 if (changeListeners.isEmpty())
400 return;
401
402 const auto listeners = changeListeners; // NOTE: intentional copy (QTBUG-54732)
403 for (const QQuickItemPrivate::ChangeListener &change : listeners) {
404 Q_ASSERT(change.listener);
405 if (change.types & changeTypes) {
406#ifdef QT_BUILD_INTERNAL
407 if (changeTypes == AllChanges && change.listener->anchorPrivate() == nullptr) {
408 // Nothing to worry about as long as the lambdas in ~QQuickItem
409 // don't mess around with the change.listener directly!
410 } else if (change.listener->baseDeleted(q)) {
411 auto output = qCritical();
412 output.noquote();
413 output << "Listener already tagged as destroyed when called!"
414 << "\n\tListener:" << change.listener->debugName()
415 << "\n\tChanges:" << change.types
416 << "\n\tCaller: " << q
417 << "\n\tChanges:" << changeTypes;
418 }
419#endif
420 if constexpr (std::is_member_function_pointer_v<Fn>)
421 (change.listener->*function)(args...);
422 else
423 function(change, args...);
424 }
425 if (changeTypes & QQuickItemPrivate::Destroyed)
426 change.listener->removeSourceItem(q);
427 }
428 }
429
430 struct ExtraData {
431 Q_QUICK_EXPORT ExtraData();
432
433 qreal z;
434 qreal scale;
435 qreal rotation;
436 qreal opacity;
437 qreal biggestPointerHandlerMarginCache;
438
439 QQuickContents *contents;
440 QQuickScreenAttached *screenAttached;
441 QQuickLayoutMirroringAttached* layoutDirectionAttached;
442 QQuickEnterKeyAttached *enterKeyAttached;
443 QQuickItemKeyFilter *keyHandler;
444 QList<QQuickPointerHandler *> pointerHandlers;
445 QObject *contextMenu;
446#if QT_CONFIG(quick_shadereffect)
447 mutable QQuickItemLayer *layer;
448#endif
449#if QT_CONFIG(cursor)
450 QCursor cursor;
451#endif
452 QPointF userTransformOriginPoint;
453
454 // these do not include child items
455 int effectRefCount;
456 int hideRefCount;
457 // updated recursively for child items as well
458 int recursiveEffectRefCount;
459 // Mask contains() method index
460 int maskContainsIndex;
461
462 // Contains mask
463 QPointer<QObject> mask;
464
465 QSGOpacityNode *opacityNode;
466 QQuickDefaultClipNode *clipNode;
467 QSGRootNode *rootNode;
468 // subsceneDeliveryAgent is set only if this item is the root of a subscene, not on all items within.
469 QQuickDeliveryAgent *subsceneDeliveryAgent = nullptr;
470
471 QObjectList resourcesList;
472
473 // Although acceptedMouseButtons is inside ExtraData, we actually store
474 // the LeftButton flag in the extra.tag() bit. This is because it is
475 // extremely common to set acceptedMouseButtons to LeftButton, but very
476 // rare to use any of the other buttons.
477 Qt::MouseButtons acceptedMouseButtons;
478 Qt::MouseButtons acceptedMouseButtonsWithoutHandlers;
479
480 uint origin:5; // QQuickItem::TransformOrigin
481 uint transparentForPositioner : 1;
482
483 // 26 bits padding
484 };
485
486 enum ExtraDataTag {
487 NoTag = 0x1,
488 LeftMouseButtonAccepted = 0x2
489 };
490 Q_DECLARE_FLAGS(ExtraDataTags, ExtraDataTag)
491
492 QLazilyAllocated<ExtraData, ExtraDataTags> extra;
493 // If the mask is an Item, inform it that it's being used as a mask (true) or is no longer being used (false)
494 virtual void registerAsContainmentMask(QQuickItem * /* maskedItem */, bool /* set */) { }
495
496 QQuickAnchors *anchors() const;
497 mutable QQuickAnchors *_anchors;
498
499 inline Qt::MouseButtons acceptedMouseButtons() const;
500
501 QList<QQuickItemPrivate::ChangeListener> changeListeners;
502
503 void addItemChangeListener(QQuickItemChangeListener *listener, ChangeTypes types);
504 void updateOrAddItemChangeListener(QQuickItemChangeListener *listener, ChangeTypes types);
505 void removeItemChangeListener(QQuickItemChangeListener *, ChangeTypes types);
506 void updateOrAddGeometryChangeListener(QQuickItemChangeListener *listener, QQuickGeometryChange types);
507 void updateOrRemoveGeometryChangeListener(QQuickItemChangeListener *listener, QQuickGeometryChange types);
508
509 QQuickStateGroup *_states();
510 QQuickStateGroup *_stateGroup;
511
512 inline QQuickItem::TransformOrigin origin() const;
513
514 // Bit 0
515 quint32 flags:7;
516 quint32 widthValidFlag:1;
517 quint32 heightValidFlag:1;
518 quint32 componentComplete:1;
519 quint32 keepMouse:1;
520 quint32 keepTouch:1;
521 quint32 hoverEnabled:1;
522 quint32 smooth:1;
523 quint32 antialiasing:1;
524 quint32 focus:1;
525 // Bit 16
526 quint32 activeFocus:1;
527 quint32 notifiedFocus:1;
528 quint32 notifiedActiveFocus:1;
529 quint32 filtersChildMouseEvents:1;
530 quint32 explicitVisible:1;
531 quint32 effectiveVisible:1;
532 quint32 explicitEnable:1;
533 quint32 effectiveEnable:1;
534 quint32 polishScheduled:1;
535 quint32 inheritedLayoutMirror:1;
536 quint32 effectiveLayoutMirror:1;
537 quint32 isMirrorImplicit:1;
538 quint32 inheritMirrorFromParent:1;
539 quint32 inheritMirrorFromItem:1;
540 quint32 isAccessible:1;
541 quint32 culled:1;
542 // Bit 32
543 quint32 hasCursor:1;
544 quint32 subtreeCursorEnabled:1;
545 quint32 subtreeHoverEnabled:1;
546 quint32 activeFocusOnTab:1;
547 quint32 implicitAntialiasing:1;
548 quint32 antialiasingValid:1;
549 // isTabFence: When true, the item acts as a fence within the tab focus chain.
550 // This means that the item and its children will be skipped from the tab focus
551 // chain when navigating from its parent or any of its siblings. Similarly,
552 // when any of the item's descendants gets focus, the item constrains the tab
553 // focus chain and prevents tabbing outside.
554 quint32 isTabFence:1;
555 quint32 replayingPressEvent:1;
556 // Bit 40
557 quint32 touchEnabled:1;
558 quint32 hasCursorHandler:1;
559 // set true when this item does not expect events via a subscene delivery agent; false otherwise
560 quint32 maybeHasSubsceneDeliveryAgent:1;
561 // set true if this item or any child wants QQuickItemPrivate::transformChanged() to visit all children
562 // (e.g. when parent has ItemIsViewport and child has ItemObservesViewport)
563 quint32 subtreeTransformChangedEnabled:1;
564 quint32 inDestructor:1; // has entered ~QQuickItem
565 quint32 focusReason:4;
566 quint32 focusPolicy:4;
567 // Bit 53
568 // eventHandlingChildrenWithinBounds is true if all children recursively
569 // are known to be within their parents' bounds.
570 // eventHandlingChildrenWithinBoundsSet is true only when we've checked.
571 mutable quint32 eventHandlingChildrenWithinBounds:1;
572 mutable quint32 eventHandlingChildrenWithinBoundsSet:1;
573 // Bit 55
574 quint32 customOverlay:1;
575 // Bit 56
576
577 static bool customOverlayRequested;
578 void requestCustomOverlay();
579
580 enum DirtyType {
581 TransformOrigin = 0x00000001,
582 Transform = 0x00000002,
583 BasicTransform = 0x00000004,
584 Position = 0x00000008,
585 Size = 0x00000010,
586
587 ZValue = 0x00000020,
588 Content = 0x00000040,
589 Smooth = 0x00000080,
590 OpacityValue = 0x00000100,
591 ChildrenChanged = 0x00000200,
592 ChildrenStackingChanged = 0x00000400,
593 ParentChanged = 0x00000800,
594
595 Clip = 0x00001000,
596 Window = 0x00002000,
597
598 EffectReference = 0x00008000,
599 Visible = 0x00010000,
600 HideReference = 0x00020000,
601 Antialiasing = 0x00040000,
602 // When you add an attribute here, don't forget to update
603 // dirtyToString()
604
605 TransformUpdateMask = TransformOrigin | Transform | BasicTransform | Position |
606 Window,
607 ComplexTransformUpdateMask = Transform | Window,
608 ContentUpdateMask = Size | Content | Smooth | Window | Antialiasing,
609 ChildrenUpdateMask = ChildrenChanged | ChildrenStackingChanged | EffectReference | Window
610 };
611
612 quint32 dirtyAttributes;
613 QString dirtyToString() const;
614 void dirty(DirtyType);
615 void addToDirtyList();
616 void removeFromDirtyList();
617 QQuickItem *nextDirtyItem;
618 QQuickItem**prevDirtyItem;
619
620 void setCulled(bool);
621
622 QQuickWindow *window;
623 int windowRefCount;
624 inline QSGContext *sceneGraphContext() const;
625 inline QSGRenderContext *sceneGraphRenderContext() const;
626
627 QQuickItem *parentItem;
628
629 QList<QQuickItem *> childItems;
630 mutable QList<QQuickItem *> *sortedChildItems;
631 QList<QQuickItem *> paintOrderChildItems() const;
632 void addChild(QQuickItem *);
633 void removeChild(QQuickItem *);
634 void siblingOrderChanged();
635
636 inline void markSortedChildrenDirty(QQuickItem *child);
637
638 void refWindow(QQuickWindow *);
639 void derefWindow();
640
641 qreal effectiveDevicePixelRatio() const;
642
643 QPointer<QQuickItem> subFocusItem;
644 void updateSubFocusItem(QQuickItem *scope, bool focus);
645
646 bool setFocusIfNeeded(QEvent::Type);
647 Qt::FocusReason lastFocusChangeReason() const;
648 virtual bool setLastFocusChangeReason(Qt::FocusReason reason);
649
650 QTransform windowToItemTransform() const;
651 QTransform itemToWindowTransform() const;
652 void itemToParentTransform(QTransform *) const;
653
654 static bool focusNextPrev(QQuickItem *item, bool forward);
655 static QQuickItem *nextTabChildItem(const QQuickItem *item, int start);
656 static QQuickItem *prevTabChildItem(const QQuickItem *item, int start);
657 static QQuickItem *nextPrevItemInTabFocusChain(QQuickItem *item, bool forward, bool wrap = true);
658
659 static bool canAcceptTabFocus(QQuickItem *item);
660
661 void setX(qreal x) {q_func()->setX(x);}
662 void xChanged() { Q_EMIT q_func()->xChanged(); }
663 Q_OBJECT_COMPAT_PROPERTY(QQuickItemPrivate, qreal, x, &QQuickItemPrivate::setX, &QQuickItemPrivate::xChanged);
664 void setY(qreal y) {q_func()->setY(y);}
665 void yChanged() { Q_EMIT q_func()->yChanged(); }
666 Q_OBJECT_COMPAT_PROPERTY(QQuickItemPrivate, qreal, y, &QQuickItemPrivate::setY, &QQuickItemPrivate::yChanged);
667 void setWidth(qreal width) {q_func()->setWidth(width);}
668 void widthChanged() { Q_EMIT q_func()->widthChanged(); }
669 Q_OBJECT_COMPAT_PROPERTY(QQuickItemPrivate, qreal, width, &QQuickItemPrivate::setWidth, &QQuickItemPrivate::widthChanged);
670 void setHeight(qreal height) {q_func()->setHeight(height);}
671 void heightChanged() { Q_EMIT q_func()->heightChanged(); }
672 Q_OBJECT_COMPAT_PROPERTY(QQuickItemPrivate, qreal, height, &QQuickItemPrivate::setHeight, &QQuickItemPrivate::heightChanged);
673 qreal implicitWidth;
674 qreal implicitHeight;
675
676 bool widthValid() const { return widthValidFlag || (width.hasBinding() && !QQmlPropertyBinding::isUndefined(width.binding()) ); }
677 bool heightValid() const { return heightValidFlag || (height.hasBinding() && !QQmlPropertyBinding::isUndefined(height.binding()) ); }
678
679 qreal baselineOffset;
680
681 QList<QQuickTransform *> transforms;
682
683 inline qreal z() const { return extra.isAllocated()?extra->z:0; }
684 inline qreal scale() const { return extra.isAllocated()?extra->scale:1; }
685 inline qreal rotation() const { return extra.isAllocated()?extra->rotation:0; }
686 inline qreal opacity() const { return extra.isAllocated()?extra->opacity:1; }
687
688 void setAccessible();
689
690 virtual qreal getImplicitWidth() const;
691 virtual qreal getImplicitHeight() const;
692 virtual void implicitWidthChanged();
693 virtual void implicitHeightChanged();
694
695#if QT_CONFIG(accessibility)
696 QAccessible::Role effectiveAccessibleRole() const;
697private:
698 virtual QAccessible::Role accessibleRole() const;
699public:
700#endif
701
702 void setImplicitAntialiasing(bool antialiasing);
703
704 void resolveLayoutMirror();
705 void setImplicitLayoutMirror(bool mirror, bool inherit);
706 void setLayoutMirror(bool mirror);
707 bool isMirrored() const {
708 return effectiveLayoutMirror;
709 }
710
711 void emitChildrenRectChanged(const QRectF &rect) {
712 Q_Q(QQuickItem);
713 Q_EMIT q->childrenRectChanged(rect);
714 }
715
716 QPointF computeTransformOrigin() const;
717 virtual bool transformChanged(QQuickItem *transformedItem);
718
719 QPointF adjustedPosForTransform(const QPointF &centroid,
720 const QPointF &startPos, const QVector2D &activeTranslatation,
721 qreal startScale, qreal activeScale,
722 qreal startRotation, qreal activeRotation);
723
724 QQuickDeliveryAgent *deliveryAgent();
725 QQuickDeliveryAgentPrivate *deliveryAgentPrivate();
726 QQuickDeliveryAgent *ensureSubsceneDeliveryAgent();
727
728 void deliverKeyEvent(QKeyEvent *);
729 bool filterKeyEvent(QKeyEvent *, bool post);
730#if QT_CONFIG(im)
731 void deliverInputMethodEvent(QInputMethodEvent *);
732#endif
733 void deliverShortcutOverrideEvent(QKeyEvent *);
734
735 void deliverPointerEvent(QEvent *);
736
737 bool anyPointerHandlerWants(const QPointerEvent *event, const QEventPoint &point) const;
738 virtual bool handlePointerEvent(QPointerEvent *, bool avoidGrabbers = false);
739#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
740 virtual bool handleContextMenuEvent(QContextMenuEvent *event);
741#endif
742
743 virtual void setVisible(bool visible);
744
745 bool isTransparentForPositioner() const;
746 void setTransparentForPositioner(bool trans);
747
748 bool calcEffectiveVisible() const;
749 bool setEffectiveVisibleRecur(bool);
750 bool calcEffectiveEnable() const;
751 void setEffectiveEnableRecur(QQuickItem *scope, bool);
752
753 qreal biggestPointerHandlerMargin() const;
754 QRectF eventHandlingBounds(qreal margin = 0) const;
755 bool parentFullyContains() const;
756 bool effectivelyClipsEventHandlingChildren() const;
757
758 inline QSGTransformNode *itemNode();
759 inline QSGNode *childContainerNode();
760
761 /*
762 QSGNode order is:
763 - itemNode
764 - (opacityNode)
765 - (clipNode)
766 - (rootNode) (shader effect source's root node)
767 */
768
769 QSGOpacityNode *opacityNode() const { return extra.isAllocated()?extra->opacityNode:nullptr; }
770 QQuickDefaultClipNode *clipNode() const { return extra.isAllocated()?extra->clipNode:nullptr; }
771 QSGRootNode *rootNode() const { return extra.isAllocated()?extra->rootNode:nullptr; }
772
773 QSGTransformNode *itemNodeInstance;
774 QSGNode *paintNode;
775
776 virtual QSGTransformNode *createTransformNode();
777
778 // A reference from an effect item means that this item is used by the effect, so
779 // it should insert a root node.
780 void refFromEffectItem(bool hide);
781 void recursiveRefFromEffectItem(int refs);
782 void derefFromEffectItem(bool unhide);
783
784 void itemChange(QQuickItem::ItemChange, const QQuickItem::ItemChangeData &);
785
786 void enableSubtreeChangeNotificationsForParentHierachy();
787
788 virtual void mirrorChange() {}
789
790 void setHasCursorInChild(bool hasCursor);
791 void setHasHoverInChild(bool hasHover);
792#if QT_CONFIG(cursor)
793 QCursor effectiveCursor(const QQuickPointerHandler *handler) const;
794 QQuickPointerHandler *effectiveCursorHandler() const;
795#endif
796
797 virtual void updatePolish() { }
798 virtual void dumpItemTree(int indent) const;
799
800 QLayoutPolicy sizePolicy() const;
801 void setSizePolicy(const QLayoutPolicy::Policy &horizontalPolicy, const QLayoutPolicy::Policy &verticalPolicy);
802 QLayoutPolicy szPolicy;
803
804#ifdef QT_BUILD_INTERNAL
805 inline static quint32 item_counter = 0;
806 inline static quint32 itemExtra_counter = 0;
807 inline static quint32 eventHandlingChildrenWithinBounds_counter = 0;
808 inline static quint64 itemToParentTransform_counter = 0;
809 inline static quint64 itemToWindowTransform_counter = 0;
810 inline static quint64 windowToItemTransform_counter = 0;
811 inline static quint64 effectiveClippingSkips_counter = 0;
812#endif
813};
814
815Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickItemPrivate::ExtraDataTags)
816
817/*
818 Key filters can be installed on a QQuickItem, but not removed. Currently they
819 are only used by attached objects (which are only destroyed on Item
820 destruction), so this isn't a problem. If in future this becomes any form
821 of public API, they will have to support removal too.
822*/
823class QQuickItemKeyFilter
824{
825public:
826 QQuickItemKeyFilter(QQuickItem * = nullptr);
827 virtual ~QQuickItemKeyFilter();
828
829 virtual void keyPressed(QKeyEvent *event, bool post);
830 virtual void keyReleased(QKeyEvent *event, bool post);
831#if QT_CONFIG(im)
832 virtual void inputMethodEvent(QInputMethodEvent *event, bool post);
833 virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
834#endif
835 virtual void shortcutOverrideEvent(QKeyEvent *event);
836 virtual void componentComplete();
837
838 bool m_processPost;
839
840private:
841 QQuickItemKeyFilter *m_next;
842};
843
864
865class Q_QUICK_EXPORT QQuickKeyNavigationAttached : public QObject, public QQuickItemKeyFilter
866{
867 Q_OBJECT
868 Q_DECLARE_PRIVATE(QQuickKeyNavigationAttached)
869
870 Q_PROPERTY(QQuickItem *left READ left WRITE setLeft NOTIFY leftChanged FINAL)
871 Q_PROPERTY(QQuickItem *right READ right WRITE setRight NOTIFY rightChanged FINAL)
872 Q_PROPERTY(QQuickItem *up READ up WRITE setUp NOTIFY upChanged FINAL)
873 Q_PROPERTY(QQuickItem *down READ down WRITE setDown NOTIFY downChanged FINAL)
874 Q_PROPERTY(QQuickItem *tab READ tab WRITE setTab NOTIFY tabChanged FINAL)
875 Q_PROPERTY(QQuickItem *backtab READ backtab WRITE setBacktab NOTIFY backtabChanged FINAL)
876 Q_PROPERTY(Priority priority READ priority WRITE setPriority NOTIFY priorityChanged FINAL)
877
878 QML_NAMED_ELEMENT(KeyNavigation)
879 QML_ADDED_IN_VERSION(2, 0)
880 QML_UNCREATABLE("KeyNavigation is only available via attached properties.")
881 QML_ATTACHED(QQuickKeyNavigationAttached)
882
883public:
884 QQuickKeyNavigationAttached(QObject * = nullptr);
885
886 QQuickItem *left() const;
887 void setLeft(QQuickItem *);
888 QQuickItem *right() const;
889 void setRight(QQuickItem *);
890 QQuickItem *up() const;
891 void setUp(QQuickItem *);
892 QQuickItem *down() const;
893 void setDown(QQuickItem *);
894 QQuickItem *tab() const;
895 void setTab(QQuickItem *);
896 QQuickItem *backtab() const;
897 void setBacktab(QQuickItem *);
898
899 enum Priority { BeforeItem, AfterItem };
900 Q_ENUM(Priority)
901 Priority priority() const;
902 void setPriority(Priority);
903
904 static QQuickKeyNavigationAttached *qmlAttachedProperties(QObject *);
905
906Q_SIGNALS:
907 void leftChanged();
908 void rightChanged();
909 void upChanged();
910 void downChanged();
911 void tabChanged();
912 void backtabChanged();
913 void priorityChanged();
914
915private:
916 void keyPressed(QKeyEvent *event, bool post) override;
917 void keyReleased(QKeyEvent *event, bool post) override;
918 void setFocusNavigation(QQuickItem *currentItem, const char *dir,
919 Qt::FocusReason reason = Qt::OtherFocusReason);
920};
921
923{
924 Q_OBJECT
925 Q_PROPERTY(bool enabled READ enabled WRITE setEnabled RESET resetEnabled NOTIFY enabledChanged FINAL)
927
930 QML_UNCREATABLE("LayoutMirroring is only available via attached properties.")
932
933public:
934 explicit QQuickLayoutMirroringAttached(QObject *parent = nullptr);
935
936 bool enabled() const;
937 void setEnabled(bool);
938 void resetEnabled();
939
940 bool childrenInherit() const;
941 void setChildrenInherit(bool);
942
947private:
948 friend class QQuickItemPrivate;
949 QQuickItemPrivate *itemPrivate;
950};
951
953{
954 Q_OBJECT
955 Q_PROPERTY(Qt::EnterKeyType type READ type WRITE setType NOTIFY typeChanged FINAL)
956
958 QML_UNCREATABLE("EnterKey is only available via attached properties")
961
962public:
963 explicit QQuickEnterKeyAttached(QObject *parent = nullptr);
964
965 Qt::EnterKeyType type() const;
966 void setType(Qt::EnterKeyType type);
967
971private:
972 friend class QQuickItemPrivate;
973 QQuickItemPrivate *itemPrivate;
974
975 Qt::EnterKeyType keyType;
976};
977
979{
980public:
982 : inPress(false), inRelease(false), inIM(false), enabled(true)
983 {}
984
985 //loop detection
986 bool inPress:1;
987 bool inRelease:1;
988 bool inIM:1;
989
990 bool enabled : 1;
991
992 QQuickItem *imeItem = nullptr;
994 QQuickItem *item = nullptr;
996};
997
998class Q_QUICK_EXPORT QQuickKeysAttached : public QObject, public QQuickItemKeyFilter
999{
1000 Q_OBJECT
1001 Q_DECLARE_PRIVATE(QQuickKeysAttached)
1002
1003 Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged FINAL)
1004 Q_PROPERTY(QQmlListProperty<QQuickItem> forwardTo READ forwardTo FINAL)
1005 Q_PROPERTY(Priority priority READ priority WRITE setPriority NOTIFY priorityChanged FINAL)
1006
1007 QML_NAMED_ELEMENT(Keys)
1008 QML_ADDED_IN_VERSION(2, 0)
1009 QML_UNCREATABLE("Keys is only available via attached properties")
1010 QML_ATTACHED(QQuickKeysAttached)
1011
1012public:
1013 QQuickKeysAttached(QObject *parent=nullptr);
1014 ~QQuickKeysAttached() override;
1015
1016 bool enabled() const { Q_D(const QQuickKeysAttached); return d->enabled; }
1017 void setEnabled(bool enabled) {
1018 Q_D(QQuickKeysAttached);
1019 if (enabled != d->enabled) {
1020 d->enabled = enabled;
1021 Q_EMIT enabledChanged();
1022 }
1023 }
1024
1025 enum Priority { BeforeItem, AfterItem};
1026 Q_ENUM(Priority)
1027 Priority priority() const;
1028 void setPriority(Priority);
1029
1030 QQmlListProperty<QQuickItem> forwardTo() {
1031 Q_D(QQuickKeysAttached);
1032 return QQmlListProperty<QQuickItem>(this, &(d->targets));
1033 }
1034
1035 void componentComplete() override;
1036
1037 static QQuickKeysAttached *qmlAttachedProperties(QObject *);
1038
1039Q_SIGNALS:
1040 void enabledChanged();
1041 void priorityChanged();
1042 void pressed(QQuickKeyEvent *event);
1043 void released(QQuickKeyEvent *event);
1044 void shortcutOverride(QQuickKeyEvent *event);
1045 void digit0Pressed(QQuickKeyEvent *event);
1046 void digit1Pressed(QQuickKeyEvent *event);
1047 void digit2Pressed(QQuickKeyEvent *event);
1048 void digit3Pressed(QQuickKeyEvent *event);
1049 void digit4Pressed(QQuickKeyEvent *event);
1050 void digit5Pressed(QQuickKeyEvent *event);
1051 void digit6Pressed(QQuickKeyEvent *event);
1052 void digit7Pressed(QQuickKeyEvent *event);
1053 void digit8Pressed(QQuickKeyEvent *event);
1054 void digit9Pressed(QQuickKeyEvent *event);
1055
1056 void leftPressed(QQuickKeyEvent *event);
1057 void rightPressed(QQuickKeyEvent *event);
1058 void upPressed(QQuickKeyEvent *event);
1059 void downPressed(QQuickKeyEvent *event);
1060 void tabPressed(QQuickKeyEvent *event);
1061 void backtabPressed(QQuickKeyEvent *event);
1062
1063 void asteriskPressed(QQuickKeyEvent *event);
1064 void numberSignPressed(QQuickKeyEvent *event);
1065 void escapePressed(QQuickKeyEvent *event);
1066 void returnPressed(QQuickKeyEvent *event);
1067 void enterPressed(QQuickKeyEvent *event);
1068 void deletePressed(QQuickKeyEvent *event);
1069 void spacePressed(QQuickKeyEvent *event);
1070 void backPressed(QQuickKeyEvent *event);
1071 void cancelPressed(QQuickKeyEvent *event);
1072 void selectPressed(QQuickKeyEvent *event);
1073 void yesPressed(QQuickKeyEvent *event);
1074 void noPressed(QQuickKeyEvent *event);
1075 void context1Pressed(QQuickKeyEvent *event);
1076 void context2Pressed(QQuickKeyEvent *event);
1077 void context3Pressed(QQuickKeyEvent *event);
1078 void context4Pressed(QQuickKeyEvent *event);
1079 void callPressed(QQuickKeyEvent *event);
1080 void hangupPressed(QQuickKeyEvent *event);
1081 void flipPressed(QQuickKeyEvent *event);
1082 void menuPressed(QQuickKeyEvent *event);
1083 void volumeUpPressed(QQuickKeyEvent *event);
1084 void volumeDownPressed(QQuickKeyEvent *event);
1085
1086private:
1087 void keyPressed(QKeyEvent *event, bool post) override;
1088 void keyReleased(QKeyEvent *event, bool post) override;
1089#if QT_CONFIG(im)
1090 void inputMethodEvent(QInputMethodEvent *, bool post) override;
1091 QVariant inputMethodQuery(Qt::InputMethodQuery query) const override;
1092#endif
1093 void shortcutOverrideEvent(QKeyEvent *event) override;
1094 static QByteArray keyToSignal(int key);
1095
1096 bool isConnected(const char *signalName) const;
1097};
1098
1099Qt::MouseButtons QQuickItemPrivate::acceptedMouseButtons() const
1100{
1101 return ((extra.tag().testFlag(LeftMouseButtonAccepted) ? Qt::LeftButton : Qt::MouseButton(0)) |
1102 (extra.isAllocated() ? extra->acceptedMouseButtons : Qt::MouseButtons{}));
1103}
1104
1105QSGContext *QQuickItemPrivate::sceneGraphContext() const
1106{
1107 Q_ASSERT(window);
1108 return static_cast<QQuickWindowPrivate *>(QObjectPrivate::get(window))->context->sceneGraphContext();
1109}
1110
1111QSGRenderContext *QQuickItemPrivate::sceneGraphRenderContext() const
1112{
1113 Q_ASSERT(window);
1114 return static_cast<QQuickWindowPrivate *>(QObjectPrivate::get(window))->context;
1115}
1116
1117void QQuickItemPrivate::markSortedChildrenDirty(QQuickItem *child)
1118{
1119 // If sortedChildItems == &childItems then all in childItems have z == 0
1120 // and we don't need to invalidate if the changed item also has z == 0.
1121 if (child->z() != 0. || sortedChildItems != &childItems) {
1122 if (sortedChildItems != &childItems)
1123 delete sortedChildItems;
1124 sortedChildItems = nullptr;
1125 }
1126}
1127
1128QQuickItem::TransformOrigin QQuickItemPrivate::origin() const
1129{
1130 return extra.isAllocated() ? QQuickItem::TransformOrigin(extra->origin)
1131 : QQuickItem::Center;
1132}
1133
1134QSGTransformNode *QQuickItemPrivate::itemNode()
1135{
1136 if (!itemNodeInstance) {
1137 itemNodeInstance = createTransformNode();
1138 itemNodeInstance->setFlag(QSGNode::OwnedByParent, false);
1139#ifdef QSG_RUNTIME_DESCRIPTION
1140 Q_Q(QQuickItem);
1141 qsgnode_set_description(itemNodeInstance, QString::fromLatin1("QQuickItem(%1:%2)").arg(QString::fromLatin1(q->metaObject()->className())).arg(q->objectName()));
1142#endif
1143 }
1144 return itemNodeInstance;
1145}
1146
1147QSGNode *QQuickItemPrivate::childContainerNode()
1148{
1149 if (rootNode())
1150 return rootNode();
1151 else if (clipNode())
1152 return clipNode();
1153 else if (opacityNode())
1154 return opacityNode();
1155 else
1156 return itemNode();
1157}
1158
1159Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickItemPrivate::ChangeTypes)
1160Q_DECLARE_TYPEINFO(QQuickItemPrivate::ChangeListener, Q_PRIMITIVE_TYPE);
1161
1162QT_END_NAMESPACE
1163
1164#endif // QQUICKITEM_P_H
bool checkHAnchorValid(QQuickAnchorLine anchor) const
bool isItemComplete() const
void remDepend(QQuickItem *)
QQuickGeometryChange calculateDependency(QQuickItem *) const
bool checkVAnchorValid(QQuickAnchorLine anchor) const
void addDepend(QQuickItem *)
void setItemSize(const QSizeF &)
static QQuickAnchorsPrivate * get(QQuickAnchors *o)
void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override
bool isMirrored() const
QQuickItem * baselineAnchorItem
QQuickAnchorsPrivate * anchorPrivate() override
bool calcStretch(QQuickItem *edge1Item, QQuickAnchors::Anchor edge1Line, QQuickItem *edge2Item, QQuickAnchors::Anchor edge2Line, qreal offset1, qreal offset2, QQuickAnchors::Anchor line, qreal &stretch) const
void setItemPos(const QPointF &)
~QQuickContents() override
void calcGeometry(QQuickItem *changed=nullptr)
void itemChildRemoved(QQuickItem *, QQuickItem *) override
void itemChildAdded(QQuickItem *, QQuickItem *) override
QRectF rectF() const
void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &) override
void itemDestroyed(QQuickItem *item) override
void setType(Qt::EnterKeyType type)
Qt::EnterKeyType type() const
static QQuickEnterKeyAttached * qmlAttachedProperties(QObject *)
bool matches(QQuickGeometryChange other) const
void set(int bits, bool enabled)
QQuickGeometryChange(int change=Nothing)
void setVerticalChange(bool enabled)
void setHorizontalChange(bool enabled)
QPointer< QQuickItem > backtab
QList< QQuickItem * > targets
static QQuickLayoutMirroringAttached * qmlAttachedProperties(QObject *)
QList< QQuickItem * > items
bool baseDeleted(const QObject *caller) const override
decltype(T::inDestructor) InDestructorTest
Combined button and popup list for selecting options.
static qreal hcenter(const QQuickItem *item)
static qreal vcenter(const QQuickItem *item)
static QQuickAnchors::Anchor reverseAnchorLine(QQuickAnchors::Anchor anchorLine)
static qreal adjustedPosition(QQuickItem *item, QQuickAnchors::Anchor anchorLine)
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
bool operator==(const QQuickAnchorLine &a, const QQuickAnchorLine &b)
#define CHANGETYPE_OUTPUT(Type)