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
QQmlAbstractBinding Class Referenceabstract

#include <qqmlabstractbinding_p.h>

+ Inheritance diagram for QQmlAbstractBinding:
+ Collaboration diagram for QQmlAbstractBinding:

Classes

struct  RefCount
 

Public Types

enum  Kind { ValueTypeProxy , QmlBinding , PropertyToPropertyBinding }
 
enum  TargetTag { NoTargetTag = 0x0 , UpdatingBinding = 0x1 , BindingEnabled = 0x2 }
 
enum  NextBindingTag { NoBindingTag = 0x0 , AddedToObject = 0x1 , CanUseAccessor = 0x2 }
 
typedef QExplicitlySharedDataPointer< QQmlAbstractBindingPtr
 

Public Member Functions

virtual ~QQmlAbstractBinding ()
 
virtual QString expression () const
 
virtual Kind kind () const =0
 
QQmlPropertyIndex targetPropertyIndex () const
 
QObjecttargetObject () const
 
void setTarget (const QQmlProperty &)
 
bool setTarget (QObject *, const QQmlPropertyData &, const QQmlPropertyData *valueType)
 
bool setTarget (QObject *, int coreIndex, bool coreIsAlias, int valueTypeIndex)
 
virtual void setEnabled (bool e, QQmlPropertyData::WriteFlags f=QQmlPropertyData::DontRemoveBinding)=0
 
void addToObject ()
 Add this binding to object.
 
void removeFromObject ()
 Remove the binding from the object.
 
QQmlAbstractBindingnextBinding () const
 
bool canUseAccessor () const
 
void setCanUseAccessor (bool canUseAccessor)
 

Static Public Member Functions

static void printBindingLoopError (const QQmlProperty &prop)
 

Public Attributes

RefCount ref
 

Protected Member Functions

 QQmlAbstractBinding ()
 
void setAddedToObject (bool v)
 
bool isAddedToObject () const
 
void setNextBinding (QQmlAbstractBinding *)
 
void getPropertyData (const QQmlPropertyData **propertyData, QQmlPropertyData *valueTypeData) const
 
bool updatingFlag () const
 
void setUpdatingFlag (bool)
 
bool enabledFlag () const
 
void setEnabledFlag (bool)
 
void updateCanUseAccessor ()
 

Protected Attributes

QQmlPropertyIndex m_targetIndex
 
QTaggedPointer< QObject, TargetTags > m_target
 
QTaggedPointer< QQmlAbstractBinding, NextBindingTags > m_nextBinding
 

Friends

class QQmlAnyBinding
 
class QQmlData
 
class QQmlValueTypeProxyBinding
 
class QQmlObjectCreator
 

Detailed Description

Definition at line 28 of file qqmlabstractbinding_p.h.

Member Typedef Documentation

◆ Ptr

Member Enumeration Documentation

◆ Kind

Enumerator
ValueTypeProxy 
QmlBinding 
PropertyToPropertyBinding 

Definition at line 34 of file qqmlabstractbinding_p.h.

◆ NextBindingTag

Enumerator
NoBindingTag 
AddedToObject 
CanUseAccessor 

Definition at line 91 of file qqmlabstractbinding_p.h.

◆ TargetTag

Enumerator
NoTargetTag 
UpdatingBinding 
BindingEnabled 

Definition at line 84 of file qqmlabstractbinding_p.h.

Constructor & Destructor Documentation

◆ QQmlAbstractBinding()

QT_BEGIN_NAMESPACE QQmlAbstractBinding::QQmlAbstractBinding ( )
protected

Definition at line 13 of file qqmlabstractbinding.cpp.

References isAddedToObject(), and Q_ASSERT.

+ Here is the call graph for this function:

◆ ~QQmlAbstractBinding()

QQmlAbstractBinding::~QQmlAbstractBinding ( )
virtual

Definition at line 19 of file qqmlabstractbinding.cpp.

References QTaggedPointer< T, Tag >::data(), QQmlAbstractBinding::RefCount::deref(), isAddedToObject(), m_nextBinding, Q_ASSERT, and ref.

+ Here is the call graph for this function:

Member Function Documentation

◆ addToObject()

void QQmlAbstractBinding::addToObject ( )

Add this binding to object.

This transfers ownership of the binding to the object, marks the object's property as being bound.

However, it does not enable the binding itself or call update() on it.

Definition at line 36 of file qqmlabstractbinding.cpp.

References QQmlPropertyIndex::coreIndex(), QQmlData::get(), isAddedToObject(), nextBinding(), proxy, Q_ASSERT, QQmlValueTypeProxyBinding, setAddedToObject(), setNextBinding(), targetObject(), targetPropertyIndex(), and ValueTypeProxy.

+ Here is the call graph for this function:

◆ canUseAccessor()

bool QQmlAbstractBinding::canUseAccessor ( ) const
inline

Definition at line 70 of file qqmlabstractbinding_p.h.

Referenced by QQmlBinding::update(), and QQmlPropertyToPropertyBinding::update().

+ Here is the caller graph for this function:

◆ enabledFlag()

bool QQmlAbstractBinding::enabledFlag ( ) const
inlineprotected

Definition at line 163 of file qqmlabstractbinding_p.h.

References BindingEnabled, m_target, and QTaggedPointer< T, Tag >::tag().

Referenced by QQmlPropertyToPropertyBinding::setEnabled(), QQmlBinding::setEnabled(), QQmlBinding::update(), and QQmlPropertyToPropertyBinding::update().

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

◆ expression()

QString QQmlAbstractBinding::expression ( ) const
virtual

Reimplemented in QQmlBinding.

Definition at line 282 of file qqmlabstractbinding.cpp.

◆ getPropertyData()

void QQmlAbstractBinding::getPropertyData ( const QQmlPropertyData ** propertyData,
QQmlPropertyData * valueTypeData ) const
protected

◆ isAddedToObject()

bool QQmlAbstractBinding::isAddedToObject ( ) const
inlineprotected

Definition at line 134 of file qqmlabstractbinding_p.h.

References AddedToObject, m_nextBinding, and QTaggedPointer< T, Tag >::tag().

Referenced by QQmlAbstractBinding(), ~QQmlAbstractBinding(), addToObject(), QQmlBinding::doUpdate(), QQmlTranslationBinding::doUpdate(), and removeFromObject().

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

◆ kind()

virtual Kind QQmlAbstractBinding::kind ( ) const
pure virtual

◆ nextBinding()

QQmlAbstractBinding * QQmlAbstractBinding::nextBinding ( ) const
inline

Definition at line 139 of file qqmlabstractbinding_p.h.

References QTaggedPointer< T, Tag >::data(), and m_nextBinding.

Referenced by QQmlValueTypeProxyBinding::~QQmlValueTypeProxyBinding(), addToObject(), QQmlValueTypeProxyBinding::binding(), QQmlData::destroyed(), QQmlData::flushPendingBinding(), QQmlValueTypeProxyBinding::removeBindings(), removeFromObject(), and removeOldBinding().

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

◆ printBindingLoopError()

void QQmlAbstractBinding::printBindingLoopError ( const QQmlProperty & prop)
static

Definition at line 158 of file qqmlabstractbinding.cpp.

References QString::arg(), QQmlProperty::name, QQmlProperty::object, and qmlWarning().

Referenced by QQmlBinding::update(), and QQmlPropertyToPropertyBinding::update().

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

◆ removeFromObject()

void QQmlAbstractBinding::removeFromObject ( )

Remove the binding from the object.

Definition at line 92 of file qqmlabstractbinding.cpp.

References QQmlPropertyIndex::coreIndex(), QQmlData::get(), isAddedToObject(), next, nextBinding(), Q_ASSERT, setAddedToObject(), setNextBinding(), targetObject(), targetPropertyIndex(), and ValueTypeProxy.

Referenced by QQmlObjectCreator::finalize().

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

◆ setAddedToObject()

void QQmlAbstractBinding::setAddedToObject ( bool v)
inlineprotected

Definition at line 129 of file qqmlabstractbinding_p.h.

Referenced by QQmlValueTypeProxyBinding::~QQmlValueTypeProxyBinding(), addToObject(), QQmlData::destroyed(), QQmlValueTypeProxyBinding::removeBindings(), and removeFromObject().

+ Here is the caller graph for this function:

◆ setCanUseAccessor()

void QQmlAbstractBinding::setCanUseAccessor ( bool canUseAccessor)
inline

Definition at line 72 of file qqmlabstractbinding_p.h.

Referenced by updateCanUseAccessor().

+ Here is the caller graph for this function:

◆ setEnabled()

virtual void QQmlAbstractBinding::setEnabled ( bool e,
QQmlPropertyData::WriteFlags f = QQmlPropertyData::DontRemoveBinding )
pure virtual

Implemented in QQmlPropertyToPropertyBinding, QQmlBinding, and QQmlValueTypeProxyBinding.

Referenced by QQmlData::flushPendingBinding(), and QQmlValueTypeProxyBinding::setEnabled().

+ Here is the caller graph for this function:

◆ setEnabledFlag()

void QQmlAbstractBinding::setEnabledFlag ( bool v)
inlineprotected

Definition at line 168 of file qqmlabstractbinding_p.h.

References BindingEnabled, m_target, QTaggedPointer< T, Tag >::setTag(), and QTaggedPointer< T, Tag >::tag().

Referenced by QQmlPropertyToPropertyBinding::setEnabled(), and QQmlBinding::setEnabled().

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

◆ setNextBinding()

void QQmlAbstractBinding::setNextBinding ( QQmlAbstractBinding * b)
inlineprotected

Definition at line 144 of file qqmlabstractbinding_p.h.

References QTaggedPointer< T, Tag >::data(), QQmlAbstractBinding::RefCount::deref(), m_nextBinding, QQmlAbstractBinding::RefCount::ref(), and ref.

Referenced by addToObject(), QQmlValueTypeProxyBinding::removeBindings(), and removeFromObject().

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

◆ setTarget() [1/3]

void QQmlAbstractBinding::setTarget ( const QQmlProperty & prop)

Definition at line 197 of file qqmlabstractbinding.cpp.

References QQmlPropertyPrivate::get(), QQmlProperty::object, and setTarget().

Referenced by QQmlPropertyToPropertyBinding::QQmlPropertyToPropertyBinding(), QQmlCppBinding::createBindingForNonBindable(), QQmlCppBinding::createTranslationBindingForNonBindable(), QV4::QObjectWrapper::setProperty(), setTarget(), setTarget(), and QV4::QQmlValueTypeWrapper::virtualPut().

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

◆ setTarget() [2/3]

bool QQmlAbstractBinding::setTarget ( QObject * object,
const QQmlPropertyData & core,
const QQmlPropertyData * valueType )

Definition at line 203 of file qqmlabstractbinding.cpp.

References QQmlPropertyData::coreIndex(), QQmlPropertyData::isAlias(), and setTarget().

+ Here is the call graph for this function:

◆ setTarget() [3/3]

bool QQmlAbstractBinding::setTarget ( QObject * object,
int coreIndex,
bool coreIsAlias,
int valueTypeIndex )

◆ setUpdatingFlag()

void QQmlAbstractBinding::setUpdatingFlag ( bool v)
inlineprotected

Definition at line 158 of file qqmlabstractbinding_p.h.

References m_target, QTaggedPointer< T, Tag >::setTag(), QTaggedPointer< T, Tag >::tag(), and UpdatingBinding.

Referenced by QQmlBinding::update(), and QQmlPropertyToPropertyBinding::update().

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

◆ targetObject()

◆ targetPropertyIndex()

QQmlPropertyIndex QQmlAbstractBinding::targetPropertyIndex ( ) const
inline

Definition at line 51 of file qqmlabstractbinding_p.h.

Referenced by QQmlPropertyToPropertyBinding::QQmlPropertyToPropertyBinding(), addToObject(), QQmlValueTypeProxyBinding::binding(), QQmlValueTypeProxyBinding::removeBindings(), and removeFromObject().

+ Here is the caller graph for this function:

◆ updateCanUseAccessor()

void QQmlAbstractBinding::updateCanUseAccessor ( )
protected

Definition at line 188 of file qqmlabstractbinding.cpp.

References QQmlInterceptorMetaObject::get(), QQmlPropertyIndex::isValid(), m_targetIndex, setCanUseAccessor(), and targetObject().

Referenced by QQmlPropertyToPropertyBinding::setEnabled(), and QQmlBinding::setEnabled().

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

◆ updatingFlag()

bool QQmlAbstractBinding::updatingFlag ( ) const
inlineprotected

Definition at line 153 of file qqmlabstractbinding_p.h.

References m_target, QTaggedPointer< T, Tag >::tag(), and UpdatingBinding.

Referenced by QQmlBinding::update(), and QQmlPropertyToPropertyBinding::update().

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

Friends And Related Symbol Documentation

◆ QQmlAnyBinding

friend class QQmlAnyBinding
friend

Definition at line 30 of file qqmlabstractbinding_p.h.

◆ QQmlData

friend class QQmlData
friend

Definition at line 99 of file qqmlabstractbinding_p.h.

◆ QQmlObjectCreator

friend class QQmlObjectCreator
friend

Definition at line 101 of file qqmlabstractbinding_p.h.

◆ QQmlValueTypeProxyBinding

friend class QQmlValueTypeProxyBinding
friend

Definition at line 100 of file qqmlabstractbinding_p.h.

Referenced by addToObject().

Member Data Documentation

◆ m_nextBinding

QTaggedPointer<QQmlAbstractBinding, NextBindingTags> QQmlAbstractBinding::m_nextBinding
protected

◆ m_target

◆ m_targetIndex

QQmlPropertyIndex QQmlAbstractBinding::m_targetIndex
protected

◆ ref


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