Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquickattachedpropertypropagator.cpp File Reference
#include "qquickattachedpropertypropagator.h"
#include <QtCore/qpointer.h>
#include <QtQuick/qquickwindow.h>
#include <QtQuick/private/qquickitem_p.h>
#include <QtQuick/private/qquickitemchangelistener_p.h>
#include <QtQuickTemplates2/private/qquickpopup_p.h>
#include "moc_qquickattachedpropertypropagator.cpp"
+ Include dependency graph for qquickattachedpropertypropagator.cpp:

Go to the source code of this file.

Classes

class  QQuickAttachedPropertyPropagatorPrivate
 

Functions

static QQuickAttachedPropertyPropagatorattachedObject (const QMetaObject *type, QObject *object, bool create=false)
 
static QQuickAttachedPropertyPropagatorfindAttachedParent (const QMetaObject *ourAttachedType, QObject *objectWeAreAttachedTo)
 
static QList< QQuickAttachedPropertyPropagator * > findAttachedChildren (const QMetaObject *type, QObject *object)
 
static QQuickItemfindAttachedItem (QObject *parent)
 

Function Documentation

◆ attachedObject()

static QQuickAttachedPropertyPropagator * attachedObject ( const QMetaObject type,
QObject object,
bool  create = false 
)
static

Definition at line 52 of file qquickattachedpropertypropagator.cpp.

References create(), qmlAttachedPropertiesFunction(), and qmlAttachedPropertiesObject().

Referenced by QQuickSwipeDelegatePrivate::attachedObjectsSetPressed(), QQuickSwipeDelegate::childMouseEventFilter(), findAttachedChildren(), findAttachedParent(), QQuickAttachedPropertyPropagatorPrivate::get(), QQuickTableViewPrivate::getAttachedObject(), QQuickSelectionRectanglePrivate::getAttachedObject(), QQuickListViewPrivate::getAttachedObject(), QQuickAttachedPropertyPropagatorPrivate::itemWindowChanged(), and QQuickSwipeDelegate::mouseUngrabEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findAttachedChildren()

static QList< QQuickAttachedPropertyPropagator * > findAttachedChildren ( const QMetaObject type,
QObject object 
)
static

Definition at line 129 of file qquickattachedpropertypropagator.cpp.

References attachedObject(), child, QGraphicsItem::childItems(), findAttachedChildren(), item, qobject_cast< QQuickItem * >(), and window().

Referenced by findAttachedChildren(), and QQuickAttachedPropertyPropagator::initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findAttachedItem()

static QQuickItem * findAttachedItem ( QObject parent)
static

Definition at line 174 of file qquickattachedpropertypropagator.cpp.

References item, parent, and qobject_cast< QQuickItem * >().

Referenced by QQuickAttachedPropertyPropagatorPrivate::attachTo(), and QQuickAttachedPropertyPropagatorPrivate::detachFrom().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findAttachedParent()

static QQuickAttachedPropertyPropagator * findAttachedParent ( const QMetaObject ourAttachedType,
QObject objectWeAreAttachedTo 
)
static

Tries to find a QQuickAttachedPropertyPropagator whose type is ourAttachedType and is attached to an ancestor of objectWeAreAttachedTo.

QQuickAttachedPropertyPropagator needs to know who its parent attached object is in order to inherit attached property values from it. This is called when an instance of QQuickAttachedPropertyPropagator is created, and whenever {objectWeAreAttachedTo}'s parent changes, for example.

Definition at line 71 of file qquickattachedpropertypropagator.cpp.

References attachedObject(), QMetaObject::className(), engine, QVariant::fromValue(), item, parent, QGraphicsItem::parentItem(), QObject::property(), qmlEngine(), qobject_cast< QQuickItem * >(), QObject::setProperty(), QVariant::value(), window(), QGraphicsItem::window(), and QQuickItem::window().

Referenced by QQuickAttachedPropertyPropagator::initialize(), QQuickAttachedPropertyPropagatorPrivate::itemParentChanged(), and QQuickAttachedPropertyPropagatorPrivate::itemWindowChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: