5#include <private/qqmlvmemetaobject_p.h>
21 QObject *targetObject,
int targetPropertyIndex)
24 , m_sourceObject(sourceObject)
25 , m_sourcePropertyIndex(sourcePropertyIndex)
44void QQmlPropertyToPropertyBinding::captureProperty(
45 const QMetaObject *sourceMetaObject,
int notifyIndex,
46 bool isSourceBindable,
bool isTargetBindable)
48 if (isSourceBindable) {
58 observer = std::make_unique<Observer>(
this);
60 void *argv[] = { &bindable };
63 bindable.
observe(observer.get());
68 if (notifyIndex == -1)
74 connect(m_sourceObject, notifyIndex, m_engine,
true);
104 const QMetaObject *sourceMetaObject = m_sourceObject->metaObject();
122void QQmlPropertyToPropertyBinding::Observer::trigger(
125 static_cast<Observer *
>(observer)->binding->
update();
bool updatingFlag() const
bool canUseAccessor() const
QQmlPropertyIndex targetPropertyIndex() const
@ PropertyToPropertyBinding
void setUpdatingFlag(bool)
static void printBindingLoopError(const QQmlProperty &prop)
QObject * targetObject() const
void updateCanUseAccessor()
void setTarget(const QQmlProperty &)
void setEnabledFlag(bool)
void getPropertyData(const QQmlPropertyData **propertyData, QQmlPropertyData *valueTypeData) const
static bool wasDeleted(const QObject *)
The QQmlEngine class provides an environment for instantiating QML components.
void cancelNotify()
Cancel any notifies that are in progress.
void connect(QObject *source, int sourceSignal, QQmlEngine *engine, bool doNotify=true)
static QQmlProperty restore(QObject *, const QQmlPropertyData &, const QQmlPropertyData *, const QQmlRefPointer< QQmlContextData > &)
bool writeValueProperty(const QVariant &, QQmlPropertyData::WriteFlags)
QQmlPropertyToPropertyBinding(QQmlEngine *engine, QObject *sourceObject, int sourcePropertyIndex, QObject *targetObject, int targetPropertyIndex)
void setEnabled(bool e, QQmlPropertyData::WriteFlags flags) final
void update(QQmlPropertyData::WriteFlags flags=QQmlPropertyData::DontRemoveBinding)
void observe(QPropertyObserver *observer) const
Combined button and popup list for selecting options.
void QQmlPropertyGuard_callback(QQmlNotifierEndpoint *e, void **)