Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
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 39 of file qquickbehavior.cpp.
UntypedProxyProperty::UntypedProxyProperty | ( | QUntypedBindable | bindable, |
QQuickBehaviorPrivate * | behavior ) |
Definition at line 152 of file qquickbehavior.cpp.
|
inlinestatic |
Definition at line 67 of file qquickbehavior.cpp.
References d.
|
inlinestatic |
Definition at line 73 of file qquickbehavior.cpp.
References d, QPropertyBindingPrivate::get(), type(), and QUntypedPropertyBinding::valueMetaType().
Referenced by QQuickBehavior::setTarget().
QUntypedBindable UntypedProxyProperty::getBindable | ( | ) |
Definition at line 127 of file qquickbehavior.cpp.
|
inlinestatic |
Definition at line 46 of file qquickbehavior.cpp.
References QMetaType::construct(), d, and QtPrivate::QBindableInterface::MetaTypeAccessorFlag.
|
inlinestatic |
Definition at line 89 of file qquickbehavior.cpp.
References d, and QtPrivate::QBindableInterface::makeBinding.
|
inlinestatic |
Definition at line 96 of file qquickbehavior.cpp.
References d, and QtPrivate::QBindableInterface::setObserver.
|
inlinestatic |
Definition at line 60 of file qquickbehavior.cpp.
References QMetaType::construct(), d, type(), and value().
|
inline |
Definition at line 107 of file qquickbehavior.cpp.
References QVariant::metaType().
Referenced by bindingSetter(), and setter().
|
inline |
Definition at line 108 of file qquickbehavior.cpp.
Referenced by setter().