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>.
Loading...
Searching...
No Matches
QQmlPropertyValueInterceptor Class Referenceabstract

The QQmlPropertyValueInterceptor class is inherited by property interceptors such as Behavior. More...

#include <qqmlpropertyvalueinterceptor_p.h>

+ Inheritance diagram for QQmlPropertyValueInterceptor:
+ Collaboration diagram for QQmlPropertyValueInterceptor:

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ QQmlPropertyValueInterceptor()

QQmlPropertyValueInterceptor::QQmlPropertyValueInterceptor ( )

Constructs a QQmlPropertyValueInterceptor.

Definition at line 20 of file qqmlpropertyvalueinterceptor.cpp.

◆ ~QQmlPropertyValueInterceptor()

QQmlPropertyValueInterceptor::~QQmlPropertyValueInterceptor ( )
virtual

Definition at line 24 of file qqmlpropertyvalueinterceptor.cpp.

Member Function Documentation

◆ bindable()

bool QQmlPropertyValueInterceptor::bindable ( QUntypedBindable * bindable,
QUntypedBindable target )
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().

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

◆ setTarget()

void QQmlPropertyValueInterceptor::setTarget ( const QQmlProperty & property)
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.

◆ write()

void QQmlPropertyValueInterceptor::write ( const QVariant & value)
pure virtual

This method will be called when a new value is assigned to the property being intercepted.

Implemented in QQuickBoundaryRule, QQuickBehavior, and QQuickImageSelector.

Friends And Related Symbol Documentation

◆ QQmlInterceptorMetaObject

friend class QQmlInterceptorMetaObject
friend

Definition at line 36 of file qqmlpropertyvalueinterceptor_p.h.


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