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
UntypedProxyProperty Class Reference

The UntypedProxyProperty class is a property used in Behavior to handle bindable properties. More...

Inheritance diagram for UntypedProxyProperty:
Collaboration diagram for UntypedProxyProperty:

Public Member Functions

 UntypedProxyProperty (QUntypedBindable bindable, QQuickBehaviorPrivate *behavior)
QUntypedBindable getBindable ()
QMetaType type () const
QVariant value () const
 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)
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)

Detailed Description

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).

Warning
The interception mechanism works only via the metaobject system, just like it is the case with non-binadble properties and writes. Bypassing the metaobject system can thus lead to inconsistent results; it is however currently safe, as we do not publically expose the classes, and the code in Quick plays nicely.

Definition at line 40 of file qquickbehavior.cpp.

Constructor & Destructor Documentation

◆ UntypedProxyProperty() [1/2]

UntypedProxyProperty::UntypedProxyProperty ( QUntypedBindable bindable,
QQuickBehaviorPrivate * behavior )

Definition at line 153 of file qquickbehavior.cpp.

References UntypedProxyProperty().

Referenced by UntypedProxyProperty().

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

◆ UntypedProxyProperty() [2/2]

UntypedProxyProperty::UntypedProxyProperty ( QUntypedBindable bindable,
QQuickBehaviorPrivate * behavior )

Member Function Documentation

◆ bindingGetter() [1/2]

QUntypedPropertyBinding UntypedProxyProperty::bindingGetter ( const QUntypedPropertyData * d)
inlinestatic

Definition at line 68 of file qquickbehavior.cpp.

◆ bindingGetter() [2/2]

QUntypedPropertyBinding UntypedProxyProperty::bindingGetter ( const QUntypedPropertyData * d)
inlinestatic

Definition at line 68 of file qquickbehavior.cpp.

◆ bindingSetter() [1/2]

QUntypedPropertyBinding UntypedProxyProperty::bindingSetter ( QUntypedPropertyData * d,
const QUntypedPropertyBinding & binding )
inlinestatic

Definition at line 74 of file qquickbehavior.cpp.

◆ bindingSetter() [2/2]

QUntypedPropertyBinding UntypedProxyProperty::bindingSetter ( QUntypedPropertyData * d,
const QUntypedPropertyBinding & binding )
inlinestatic

Definition at line 74 of file qquickbehavior.cpp.

◆ getBindable() [1/2]

QUntypedBindable UntypedProxyProperty::getBindable ( )

Definition at line 128 of file qquickbehavior.cpp.

References UntypedProxyPropertyBindable::UntypedProxyPropertyBindable().

Here is the call graph for this function:

◆ getBindable() [2/2]

QUntypedBindable UntypedProxyProperty::getBindable ( )

◆ getter() [1/2]

void UntypedProxyProperty::getter ( const QUntypedPropertyData * d,
void * value )
inlinestatic

Definition at line 47 of file qquickbehavior.cpp.

◆ getter() [2/2]

void UntypedProxyProperty::getter ( const QUntypedPropertyData * d,
void * value )
inlinestatic

Definition at line 47 of file qquickbehavior.cpp.

◆ makeBinding() [1/2]

QUntypedPropertyBinding UntypedProxyProperty::makeBinding ( const QUntypedPropertyData * d,
const QPropertyBindingSourceLocation & location )
inlinestatic

Definition at line 90 of file qquickbehavior.cpp.

◆ makeBinding() [2/2]

QUntypedPropertyBinding UntypedProxyProperty::makeBinding ( const QUntypedPropertyData * d,
const QPropertyBindingSourceLocation & location )
inlinestatic

Definition at line 90 of file qquickbehavior.cpp.

◆ setObserver() [1/2]

void UntypedProxyProperty::setObserver ( const QUntypedPropertyData * d,
QPropertyObserver * observer )
inlinestatic

Definition at line 97 of file qquickbehavior.cpp.

◆ setObserver() [2/2]

void UntypedProxyProperty::setObserver ( const QUntypedPropertyData * d,
QPropertyObserver * observer )
inlinestatic

Definition at line 97 of file qquickbehavior.cpp.

◆ setter() [1/2]

void UntypedProxyProperty::setter ( QUntypedPropertyData * d,
const void * value )
inlinestatic

Definition at line 61 of file qquickbehavior.cpp.

◆ setter() [2/2]

void UntypedProxyProperty::setter ( QUntypedPropertyData * d,
const void * value )
inlinestatic

Definition at line 61 of file qquickbehavior.cpp.

◆ type() [1/2]

QMetaType UntypedProxyProperty::type ( ) const
inline

Definition at line 108 of file qquickbehavior.cpp.

◆ type() [2/2]

QMetaType UntypedProxyProperty::type ( ) const
inline

Definition at line 108 of file qquickbehavior.cpp.

◆ value() [1/2]

QVariant UntypedProxyProperty::value ( ) const
inline

Definition at line 109 of file qquickbehavior.cpp.

◆ value() [2/2]

QVariant UntypedProxyProperty::value ( ) const
inline

Definition at line 109 of file qquickbehavior.cpp.


The documentation for this class was generated from the following file: