![]() |
Qt 6.x
The Qt SDK
|
The QQmlPropertyValueInterceptor class is inherited by property interceptors such as Behavior. More...
#include <qqmlpropertyvalueinterceptor_p.h>
Public Member Functions | |
QQmlPropertyValueInterceptor () | |
Constructs a QQmlPropertyValueInterceptor. | |
virtual | ~QQmlPropertyValueInterceptor () |
virtual void | setTarget (const QQmlProperty &property)=0 |
Set the target property for the value interceptor. | |
virtual void | write (const QVariant &value)=0 |
This method will be called when a new value is assigned to the property being intercepted. | |
virtual bool | bindable (QUntypedBindable *bindable, QUntypedBindable target) |
Friends | |
class | QQmlInterceptorMetaObject |
The QQmlPropertyValueInterceptor class is inherited by property interceptors such as Behavior.
This class intercepts property writes, allowing for custom handling. For example, Behavior uses this interception to provide a default animation for all changes to a property's value.
Definition at line 26 of file qqmlpropertyvalueinterceptor_p.h.
QQmlPropertyValueInterceptor::QQmlPropertyValueInterceptor | ( | ) |
Constructs a QQmlPropertyValueInterceptor.
Definition at line 20 of file qqmlpropertyvalueinterceptor.cpp.
|
virtual |
Definition at line 24 of file qqmlpropertyvalueinterceptor.cpp.
|
virtual |
Called when a BindableProperty metacall gets intercepted. The default implementation does nothing and simply returns false. A subclass which can properly intercept the metacall should return true after doing its work. bindable is the pointer to the QUntypedBindable passed through the metacall target is the QUntypedBindable of the intercepted property
Reimplemented in QQuickBehavior.
Definition at line 36 of file qqmlpropertyvalueinterceptor.cpp.
References bindable(), and Q_UNUSED.
Referenced by bindable().
|
pure virtual |
Set the target property for the value interceptor.
This method will be called by the QML engine when assigning a value interceptor.
Implemented in QQuickBoundaryRule, QQuickBehavior, and QQuickImageSelector.
Referenced by QQmlCppOnAssignmentHelper::set().
This method will be called when a new value is assigned to the property being intercepted.
Implemented in QQuickBoundaryRule, QQuickBehavior, and QQuickImageSelector.
|
friend |
Definition at line 36 of file qqmlpropertyvalueinterceptor_p.h.