18#include <QtQuick/private/qquickanchors_p.h>
19#include <QtQuick/private/qquickanchors_p_p.h>
20#include <QtQuick/private/qquickitemchangelistener_p.h>
21#include <QtQuick/private/qquickevents_p_p.h>
22#include <QtQuick/private/qquickclipnode_p.h>
23#include <QtQuick/private/qquickstate_p.h>
24#include <QtQuick/private/qquickpaletteproviderprivatebase_p.h>
25#include <QtQuick/private/qquickwindow_p.h>
26#include <QtCore/private/qproperty_p.h>
28#if QT_CONFIG(quick_shadereffect)
29#include <QtQuick/private/qquickshadereffectsource_p.h>
32#include <QtQuick/qquickitem.h>
33#include <QtQuick/qsgnode.h>
35#include <QtQml/private/qqmlnullablevalue_p.h>
36#include <QtQml/private/qqmlnotifier_p.h>
37#include <QtQml/private/qqmlglobal_p.h>
38#include <QtQml/private/qlazilyallocated_p.h>
39#include <QtQml/qqml.h>
40#include <QtQml/qqmlcontext.h>
42#include <QtCore/qlist.h>
43#include <QtCore/qdebug.h>
44#include <QtCore/qelapsedtimer.h>
45#include <QtCore/qpointer.h>
47#include <QtGui/private/qlayoutpolicy_p.h>
77 bool calcHeight(
QQuickItem *changed =
nullptr);
87 bool wChanged = calcWidth(changed);
88 bool hChanged = calcHeight(changed);
89 if (wChanged || hChanged)
104#if QT_CONFIG(quick_shadereffect)
111 Q_PROPERTY(
QRectF sourceRect READ sourceRect WRITE setSourceRect NOTIFY sourceRectChanged FINAL)
112 Q_PROPERTY(
bool mipmap READ mipmap WRITE setMipmap NOTIFY mipmapChanged FINAL)
113 Q_PROPERTY(
bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged FINAL)
114 Q_PROPERTY(
bool live READ live WRITE setLive NOTIFY liveChanged REVISION(6, 5) FINAL)
126 ~QQuickItemLayer()
override;
129 void componentComplete();
131 bool enabled()
const {
return m_enabled; }
134 bool mipmap()
const {
return m_mipmap; }
135 void setMipmap(
bool mipmap);
137 bool smooth()
const {
return m_smooth; }
138 void setSmooth(
bool s);
140 bool live()
const {
return m_live; }
141 void setLive(
bool live);
149 QRectF sourceRect()
const {
return m_sourceRect; }
150 void setSourceRect(
const QRectF &sourceRect);
164 int samples()
const {
return m_samples; }
165 void setSamples(
int count);
170 void itemOpacityChanged(
QQuickItem *)
override;
172 void itemSiblingOrderChanged(
QQuickItem *)
override;
173 void itemVisibilityChanged(
QQuickItem *)
override;
176 void updateGeometry();
177 void updateOpacity();
181 void enabledChanged(
bool enabled);
183 void mipmapChanged(
bool mipmap);
187 void smoothChanged(
bool smooth);
188 void liveChanged(
bool live);
190 void sourceRectChanged(
const QRectF &sourceRect);
192 void samplesChanged(
int count);
200 void activateEffect();
201 void deactivateEffect();
208 bool m_componentComplete;
237 QQmlListProperty<QObject>
data();
238 QQmlListProperty<QObject> resources();
239 QQmlListProperty<QQuickItem> children();
240 QQmlListProperty<QQuickItem> visibleChildren();
242 QQmlListProperty<QQuickState>
states();
243 QQmlListProperty<QQuickTransition> transitions();
246 void setState(
const QString &);
256#if QT_CONFIG(quick_shadereffect)
257 QQuickItemLayer *
layer()
const;
261 bool hasPointerHandlers()
const;
262 bool hasEnabledHoverHandlers()
const;
267 static void data_append(QQmlListProperty<QObject> *,
QObject *);
268 static qsizetype data_count(QQmlListProperty<QObject> *);
270 static void data_clear(QQmlListProperty<QObject> *);
271 static void data_removeLast(QQmlListProperty<QObject> *);
275 static void resources_append(QQmlListProperty<QObject> *,
QObject *);
276 static qsizetype resources_count(QQmlListProperty<QObject> *);
277 static void resources_clear(QQmlListProperty<QObject> *);
278 static void resources_removeLast(QQmlListProperty<QObject> *);
281 static void children_append(QQmlListProperty<QQuickItem> *,
QQuickItem *);
282 static qsizetype children_count(QQmlListProperty<QQuickItem> *);
284 static void children_clear(QQmlListProperty<QQuickItem> *);
285 static void children_removeLast(QQmlListProperty<QQuickItem> *);
288 static qsizetype visibleChildren_count(QQmlListProperty<QQuickItem> *prop);
292 static qsizetype transform_count(QQmlListProperty<QQuickTransform> *
list);
295 static void transform_clear(QQmlListProperty<QQuickTransform> *
list);
297 void _q_resourceObjectDeleted(
QObject *);
309 ImplicitWidth = 0x100,
310 ImplicitHeight = 0x200,
313 AllChanges = 0xFFFFFFFF
340#ifndef QT_NO_DEBUG_STREAM
347 template <
typename Fn,
typename ...Args>
350 if (changeListeners.isEmpty())
356 if constexpr (std::is_member_function_pointer_v<Fn>)
357 (change.listener->*function)(
args...);
378#if QT_CONFIG(quick_shadereffect)
379 mutable QQuickItemLayer *
layer;
420 LeftMouseButtonAccepted = 0x2
426 virtual
void registerAsContainmentMask(
QQuickItem * ,
bool ) { }
431 inline Qt::MouseButtons acceptedMouseButtons()
const;
502 TransformOrigin = 0x00000001,
503 Transform = 0x00000002,
504 BasicTransform = 0x00000004,
505 Position = 0x00000008,
509 Content = 0x00000040,
511 OpacityValue = 0x00000100,
512 ChildrenChanged = 0x00000200,
513 ChildrenStackingChanged = 0x00000400,
514 ParentChanged = 0x00000800,
519 EffectReference = 0x00008000,
520 Visible = 0x00010000,
521 HideReference = 0x00020000,
522 Antialiasing = 0x00040000,
526 TransformUpdateMask = TransformOrigin | Transform | BasicTransform | Position |
528 ComplexTransformUpdateMask = Transform |
Window,
529 ContentUpdateMask = Size | Content | Smooth |
Window | Antialiasing,
530 ChildrenUpdateMask = ChildrenChanged | ChildrenStackingChanged | EffectReference |
Window
536 void addToDirtyList();
537 void removeFromDirtyList();
541 void setCulled(
bool);
552 QList<QQuickItem *> paintOrderChildItems()
const;
555 void siblingOrderChanged();
571 void itemToParentTransform(
QTransform *)
const;
597 bool widthValid()
const {
return widthValidFlag || (
width.hasBinding() && !QQmlPropertyBinding::isUndefined(
width.binding()) ); }
598 bool heightValid()
const {
return heightValidFlag || (
height.hasBinding() && !QQmlPropertyBinding::isUndefined(
height.binding()) ); }
604 inline qreal z()
const {
return extra.isAllocated()?extra->z:0; }
605 inline qreal scale()
const {
return extra.isAllocated()?extra->scale:1; }
606 inline qreal rotation()
const {
return extra.isAllocated()?extra->rotation:0; }
607 inline qreal opacity()
const {
return extra.isAllocated()?extra->opacity:1; }
609 void setAccessible();
611 virtual qreal getImplicitWidth()
const;
612 virtual qreal getImplicitHeight()
const;
613 virtual void implicitWidthChanged();
614 virtual void implicitHeightChanged();
616#if QT_CONFIG(accessibility)
617 QAccessible::Role effectiveAccessibleRole()
const;
619 virtual QAccessible::Role accessibleRole()
const;
623 void setImplicitAntialiasing(
bool antialiasing);
625 void resolveLayoutMirror();
626 void setImplicitLayoutMirror(
bool mirror,
bool inherit);
627 void setLayoutMirror(
bool mirror);
629 return effectiveLayoutMirror;
637 QPointF computeTransformOrigin()
const;
638 virtual bool transformChanged(
QQuickItem *transformedItem);
654 void deliverShortcutOverrideEvent(
QKeyEvent *);
656 void deliverPointerEvent(
QEvent *);
659 virtual bool handlePointerEvent(
QPointerEvent *,
bool avoidGrabbers =
false);
661 virtual void setVisible(
bool visible);
663 bool isTransparentForPositioner()
const;
664 void setTransparentForPositioner(
bool trans);
666 bool calcEffectiveVisible()
const;
667 bool setEffectiveVisibleRecur(
bool);
668 bool calcEffectiveEnable()
const;
669 void setEffectiveEnableRecur(
QQuickItem *scope,
bool);
673 inline QSGNode *childContainerNode();
694 void refFromEffectItem(
bool hide);
695 void recursiveRefFromEffectItem(
int refs);
696 void derefFromEffectItem(
bool unhide);
700 void enableSubtreeChangeNotificationsForParentHierachy();
704 void setHasCursorInChild(
bool hasCursor);
705 void setHasHoverInChild(
bool hasHover);
712 virtual void dumpItemTree(
int indent)
const;
715 void setSizePolicy(
const QLayoutPolicy::Policy &horizontalPolicy,
const QLayoutPolicy::Policy &verticalPolicy);
740 virtual void componentComplete();
757 QPointer<QQuickItem>
up;
805 Priority priority()
const;
822 void setFocusNavigation(
QQuickItem *currentItem,
const char *
dir,
869 Qt::EnterKeyType
type() const;
879 Qt::EnterKeyType keyType;
931 Priority priority()
const;
936 return QQmlListProperty<QQuickItem>(
this, &(
d->targets));
939 void componentComplete()
override;
1000 bool isConnected(
const char *signalName)
const;
1006 (extra.isAllocated() ? extra->acceptedMouseButtons : Qt::MouseButtons{}));
1025 if (
child->z() != 0. || sortedChildItems != &childItems) {
1026 if (sortedChildItems != &childItems)
1027 delete sortedChildItems;
1028 sortedChildItems =
nullptr;
1040 if (!itemNodeInstance) {
1041 itemNodeInstance = createTransformNode();
1043#ifdef QSG_RUNTIME_DESCRIPTION
1048 return itemNodeInstance;
1055 else if (clipNode())
1057 else if (opacityNode())
1058 return opacityNode();
The QCursor class provides a mouse cursor with an arbitrary shape.
The QEventPoint class provides information about a point in a QPointerEvent.
Type
This enum type defines the valid event types in Qt.
The QKeyEvent class describes a key event.
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
static QObjectPrivate * get(QObject *o)
QObject * parent() const
Returns a pointer to the parent object.
\inmodule QtCore\reentrant
A base class for pointer events.
The QQmlComponent class encapsulates a QML component definition.
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
~QQuickContents() override
QQuickContents(QQuickItem *item)
void calcGeometry(QQuickItem *changed=nullptr)
void itemChildRemoved(QQuickItem *, QQuickItem *) override
void itemChildAdded(QQuickItem *, QQuickItem *) override
void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &) override
void itemDestroyed(QQuickItem *item) override
QQuickItem ** prevDirtyItem
quint32 replayingPressEvent
Q_OBJECT_COMPAT_PROPERTY(QQuickItemPrivate, qreal, y, &QQuickItemPrivate::setY, &QQuickItemPrivate::yChanged)
virtual void updatePolish()
void notifyChangeListeners(QQuickItemPrivate::ChangeTypes changeTypes, Fn &&function, Args &&...args)
Q_OBJECT_COMPAT_PROPERTY(QQuickItemPrivate, qreal, width, &QQuickItemPrivate::setWidth, &QQuickItemPrivate::widthChanged)
QSGOpacityNode * opacityNode() const
quint32 subtreeCursorEnabled
QQuickDefaultClipNode * clipNode() const
quint32 maybeHasSubsceneDeliveryAgent
QSGRenderContext * sceneGraphRenderContext() const
void setHeight(qreal height)
quint32 effectiveLayoutMirror
QSGTransformNode * itemNodeInstance
quint32 subtreeHoverEnabled
QPointer< QQuickItem > subFocusItem
QSGContext * sceneGraphContext() const
quint32 inheritMirrorFromItem
Q_OBJECT_COMPAT_PROPERTY(QQuickItemPrivate, qreal, x, &QQuickItemPrivate::setX, &QQuickItemPrivate::xChanged)
quint32 antialiasingValid
QList< QQuickItem * > * sortedChildItems
virtual void mirrorChange()
QQuickStateGroup * _stateGroup
QVector< QQuickItemPrivate::ChangeListener > changeListeners
quint32 notifiedActiveFocus
QSGNode * childContainerNode()
QQuickItem * nextDirtyItem
quint32 filtersChildMouseEvents
quint32 inheritMirrorFromParent
quint32 subtreeTransformChangedEnabled
QList< QQuickTransform * > transforms
Qt::MouseButtons acceptedMouseButtons() const
static const QQuickItemPrivate * get(const QQuickItem *item)
QQuickItem::TransformOrigin origin() const
quint32 componentComplete
void markSortedChildrenDirty(QQuickItem *child)
quint32 inheritedLayoutMirror
QSGTransformNode * itemNode()
QSGRootNode * rootNode() const
void setWidth(qreal width)
quint32 implicitAntialiasing
Q_OBJECT_COMPAT_PROPERTY(QQuickItemPrivate, qreal, height, &QQuickItemPrivate::setHeight, &QQuickItemPrivate::heightChanged)
static QQuickItemPrivate * get(QQuickItem *item)
QList< QQuickItem * > childItems
void emitChildrenRectChanged(const QRectF &rect)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
TransformOrigin
\variable QQuickItem::ItemChangeData::realValue The numeric value that has changed: \l {QQuickItem::o...
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
QQuickKeyNavigationAttachedPrivate()
QPointer< QQuickItem > down
QPointer< QQuickItem > up
QPointer< QQuickItem > backtab
QPointer< QQuickItem > left
QPointer< QQuickItem > tab
QPointer< QQuickItem > right
QList< QQuickItem * > targets
QQuickKeyEvent theKeyEvent
QQuickKeysAttachedPrivate()
void digit0Pressed(QQuickKeyEvent *event)
void digit1Pressed(QQuickKeyEvent *event)
void digit5Pressed(QQuickKeyEvent *event)
void digit9Pressed(QQuickKeyEvent *event)
void digit6Pressed(QQuickKeyEvent *event)
void volumeDownPressed(QQuickKeyEvent *event)
void tabPressed(QQuickKeyEvent *event)
void cancelPressed(QQuickKeyEvent *event)
void deletePressed(QQuickKeyEvent *event)
void hangupPressed(QQuickKeyEvent *event)
void enterPressed(QQuickKeyEvent *event)
void escapePressed(QQuickKeyEvent *event)
void callPressed(QQuickKeyEvent *event)
void upPressed(QQuickKeyEvent *event)
QQmlListProperty< QQuickItem > forwardTo()
void yesPressed(QQuickKeyEvent *event)
void context2Pressed(QQuickKeyEvent *event)
void backPressed(QQuickKeyEvent *event)
void menuPressed(QQuickKeyEvent *event)
void setEnabled(bool enabled)
void flipPressed(QQuickKeyEvent *event)
void rightPressed(QQuickKeyEvent *event)
void asteriskPressed(QQuickKeyEvent *event)
void digit2Pressed(QQuickKeyEvent *event)
void numberSignPressed(QQuickKeyEvent *event)
void leftPressed(QQuickKeyEvent *event)
void noPressed(QQuickKeyEvent *event)
void volumeUpPressed(QQuickKeyEvent *event)
void context3Pressed(QQuickKeyEvent *event)
void returnPressed(QQuickKeyEvent *event)
void released(QQuickKeyEvent *event)
void pressed(QQuickKeyEvent *event)
void spacePressed(QQuickKeyEvent *event)
void shortcutOverride(QQuickKeyEvent *event)
void selectPressed(QQuickKeyEvent *event)
void digit3Pressed(QQuickKeyEvent *event)
void backtabPressed(QQuickKeyEvent *event)
void digit4Pressed(QQuickKeyEvent *event)
void context1Pressed(QQuickKeyEvent *event)
void digit7Pressed(QQuickKeyEvent *event)
void downPressed(QQuickKeyEvent *event)
void context4Pressed(QQuickKeyEvent *event)
void digit8Pressed(QQuickKeyEvent *event)
void setChildrenInherit(bool)
void childrenInheritChanged()
static QQuickLayoutMirroringAttached * qmlAttachedProperties(QObject *)
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtCore\reentrant
The QSGContext holds the scene graph entry points for one QML engine.
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
The QSGOpacityNode class is used to change opacity of nodes.
The QSGRootNode is the toplevel root of any scene graph.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QTouchEvent class contains parameters that describe a touch event.
The QVector2D class represents a vector or vertex in 2D space.
[Window class with invokable method]
myinstance setPriority(MyClass::VeryHigh)
employee setName("Richard Schmit")
Combined button and popup list for selecting options.
static const QCssKnownValue properties[NumProperties - 1]
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction function
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
GLint GLint GLint GLint GLint x
[0]
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLsizei GLenum GLenum * types
GLdouble GLdouble GLdouble GLdouble top
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat GLfloat GLfloat h
GLuint GLenum GLenum transform
GLdouble GLdouble GLdouble GLdouble q
static qreal component(const QPointF &point, unsigned int i)
#define QML_UNCREATABLE(REASON)
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QML_ATTACHED(ATTACHED_TYPE)
QQuickAnchors * anchors(QQuickItem *item)
static QQuickItemPrivate::ChangeTypes changeTypes
void qsgnode_set_description(QSGNode *node, const QString &description)
static QT_BEGIN_NAMESPACE QAsn1Element wrap(quint8 type, const QAsn1Element &child)
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
unsigned long long quint64
QGraphicsOpacityEffect * effect
the effect attached to this item
manager post(request, myJson, this, [this](QRestReply &reply) { if(!reply.isSuccess()) { } if(std::optional json=reply.readJson()) { } })
proxy setType(QNetworkProxy::Socks5Proxy)
QQuickItemPrivate::ChangeTypes ChangeTypes
ChangeListener(QQuickItemChangeListener *l=nullptr, ChangeTypes t={ })
QQuickItemChangeListener * listener
bool operator==(const ChangeListener &other) const
ChangeListener(QQuickItemChangeListener *l, QQuickGeometryChange gt)
QQuickGeometryChange gTypes