![]() |
Qt 6.x
The Qt SDK
|
The UntypedProxyProperty class is a property used in Behavior to handle bindable properties. More...
Public Member Functions | |
UntypedProxyProperty (QUntypedBindable bindable, QQuickBehaviorPrivate *behavior) | |
QUntypedBindable | getBindable () |
QMetaType | type () const |
QVariant | value () const |
Static Public Member Functions | |
static void | getter (const QUntypedPropertyData *d, void *value) |
static void | setter (QUntypedPropertyData *d, const void *value) |
static QUntypedPropertyBinding | bindingGetter (const QUntypedPropertyData *d) |
static QUntypedPropertyBinding | bindingSetter (QUntypedPropertyData *d, const QUntypedPropertyBinding &binding) |
static QUntypedPropertyBinding | makeBinding (const QUntypedPropertyData *d, const QPropertyBindingSourceLocation &location) |
static void | setObserver (const QUntypedPropertyData *d, QPropertyObserver *observer) |
The UntypedProxyProperty class is a property used in Behavior to handle bindable properties.
Whenever a bindable property with a Behavior gets a request for its bindable interface, we instead return the bindable interface of the UntypedProxyProperty. This causes all reads and writes to be intercepted to use m_storage
instead; moreover, any installed binding will also use m_storage
as the property data for the binding.
The BehaviorPrivate acts as an observer, listening to changes of the proxy property. If those occur, QQuickBehavior::write is called with the new value, which will then adjust the actual property (playing animations if necessary).
Definition at line 38 of file qquickbehavior.cpp.
UntypedProxyProperty::UntypedProxyProperty | ( | QUntypedBindable | bindable, |
QQuickBehaviorPrivate * | behavior | ||
) |
Definition at line 151 of file qquickbehavior.cpp.
References QPropertyObserver::setSource().
|
inlinestatic |
Definition at line 66 of file qquickbehavior.cpp.
References d.
|
inlinestatic |
Definition at line 72 of file qquickbehavior.cpp.
References d, QPropertyBindingPrivate::get(), QPropertyBindingPrivate::scheduleNotify(), type(), and QUntypedPropertyBinding::valueMetaType().
Referenced by QQuickBehavior::setTarget().
QUntypedBindable UntypedProxyProperty::getBindable | ( | ) |
Definition at line 126 of file qquickbehavior.cpp.
|
inlinestatic |
Definition at line 45 of file qquickbehavior.cpp.
References QMetaType::construct(), d, and QtPrivate::QBindableInterface::MetaTypeAccessorFlag.
|
inlinestatic |
Definition at line 88 of file qquickbehavior.cpp.
References d, and QtPrivate::QBindableInterface::makeBinding.
|
inlinestatic |
Definition at line 95 of file qquickbehavior.cpp.
References d, and QtPrivate::QBindableInterface::setObserver.
|
inlinestatic |
Definition at line 59 of file qquickbehavior.cpp.
References QMetaType::construct(), d, type(), and value().
|
inline |
Definition at line 106 of file qquickbehavior.cpp.
References QVariant::metaType().
Referenced by bindingSetter(), and setter().
|
inline |
Definition at line 107 of file qquickbehavior.cpp.
Referenced by setter().