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

#include <qqmlpropertytopropertybinding_p.h>

+ Inheritance diagram for QQmlPropertyToPropertyBinding:
+ Collaboration diagram for QQmlPropertyToPropertyBinding:

Public Member Functions

 QQmlPropertyToPropertyBinding (QQmlEngine *engine, QObject *sourceObject, int sourcePropertyIndex, QObject *targetObject, int targetPropertyIndex)
 
Kind kind () const final
 
void setEnabled (bool e, QQmlPropertyData::WriteFlags flags) final
 
void update (QQmlPropertyData::WriteFlags flags=QQmlPropertyData::DontRemoveBinding)
 
- Public Member Functions inherited from QQmlAbstractBinding
virtual ~QQmlAbstractBinding ()
 
virtual QString expression () const
 
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)
 
void addToObject ()
 Add this binding to object.
 
void removeFromObject ()
 Remove the binding from the object.
 
QQmlAbstractBindingnextBinding () const
 
bool canUseAccessor () const
 
void setCanUseAccessor (bool canUseAccessor)
 
- Public Member Functions inherited from QQmlNotifierEndpoint
 QQmlNotifierEndpoint (Callback callback)
 
 ~QQmlNotifierEndpoint ()
 
bool isConnected () const
 
bool isConnected (QObject *source, int sourceSignal) const
 
bool isConnected (QQmlNotifier *) const
 
void connect (QObject *source, int sourceSignal, QQmlEngine *engine, bool doNotify=true)
 
void connect (QQmlNotifier *)
 
void disconnect ()
 
bool isNotifying () const
 Returns true if a notify is in progress.
 
void startNotifying (qintptr *originalSenderPtr)
 
void stopNotifying (qintptr *originalSenderPtr)
 
void cancelNotify ()
 Cancel any notifies that are in progress.
 
int signalIndex () const
 
qintptr sender () const
 
void setSender (qintptr sender)
 
QObjectsenderAsObject () const
 
QQmlNotifiersenderAsNotifier () const
 

Additional Inherited Members

- Public Types inherited from QQmlAbstractBinding
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 Types inherited from QQmlNotifierEndpoint
enum  Callback {
  None = 0 , QQmlBoundSignal = 1 , QQmlJavaScriptExpressionGuard = 2 , QQmlVMEMetaObjectEndpoint = 3 ,
  QQmlPropertyGuard = 4
}
 
- Static Public Member Functions inherited from QQmlAbstractBinding
static void printBindingLoopError (const QQmlProperty &prop)
 
- Public Attributes inherited from QQmlAbstractBinding
RefCount ref
 
- Protected Member Functions inherited from QQmlAbstractBinding
 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 inherited from QQmlAbstractBinding
QQmlPropertyIndex m_targetIndex
 
QTaggedPointer< QObject, TargetTags > m_target
 
QTaggedPointer< QQmlAbstractBinding, NextBindingTags > m_nextBinding
 

Detailed Description

This class can be used to create a direct binding from a source property to a target property, without going through QQmlJavaScriptExpression and QV4::Function. In particular you don't need a compilation unit or byte code to set this up.

Definition at line 24 of file qqmlpropertytopropertybinding_p.h.

Constructor & Destructor Documentation

◆ QQmlPropertyToPropertyBinding()

QQmlPropertyToPropertyBinding::QQmlPropertyToPropertyBinding ( QQmlEngine * engine,
QObject * sourceObject,
int sourcePropertyIndex,
QObject * targetObject,
int targetPropertyIndex )

Definition at line 19 of file qqmlpropertytopropertybinding.cpp.

References QQmlAbstractBinding::setTarget(), QQmlAbstractBinding::targetObject(), and QQmlAbstractBinding::targetPropertyIndex().

+ Here is the call graph for this function:

Member Function Documentation

◆ kind()

QQmlAbstractBinding::Kind QQmlPropertyToPropertyBinding::kind ( ) const
finalvirtual

◆ setEnabled()

void QQmlPropertyToPropertyBinding::setEnabled ( bool e,
QQmlPropertyData::WriteFlags flags )
finalvirtual

Implements QQmlAbstractBinding.

Definition at line 35 of file qqmlpropertytopropertybinding.cpp.

References QQmlAbstractBinding::enabledFlag(), QQmlAbstractBinding::setEnabledFlag(), update(), and QQmlAbstractBinding::updateCanUseAccessor().

+ Here is the call graph for this function:

◆ update()

void QQmlPropertyToPropertyBinding::update ( QQmlPropertyData::WriteFlags flags = QQmlPropertyData::DontRemoveBinding)

Definition at line 77 of file qqmlpropertytopropertybinding.cpp.

References QQmlPropertyData::BypassInterceptor, QQmlAbstractBinding::canUseAccessor(), d, QQmlAbstractBinding::enabledFlag(), QQmlAbstractBinding::getPropertyData(), QQmlAbstractBinding::printBindingLoopError(), property, Q_ASSERT, Q_UNLIKELY, QQmlPropertyPrivate::restore(), QQmlAbstractBinding::setUpdatingFlag(), QMetaObjectPrivate::signalIndex(), QQmlAbstractBinding::targetObject(), QQmlAbstractBinding::updatingFlag(), QQmlData::wasDeleted(), and QQmlPropertyPrivate::writeValueProperty().

Referenced by setEnabled().

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

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