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_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQMLPROPERTYTOPROPERTYBINDINDING_P_H
5#define QQMLPROPERTYTOPROPERTYBINDINDING_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <private/qqmlabstractbinding_p.h>
19#include <private/qqmlnotifier_p.h>
20#include <QtCore/qproperty.h>
21
23
26{
27public:
29 QQmlEngine *engine, QObject *sourceObject, int sourcePropertyIndex,
30 QObject *targetObject, int targetPropertyIndex);
31
32 Kind kind() const final;
33 void setEnabled(bool e, QQmlPropertyData::WriteFlags flags) final;
34
35 void update(QQmlPropertyData::WriteFlags flags = QQmlPropertyData::DontRemoveBinding);
36
37private:
38 static void trigger(QPropertyObserver *, QUntypedPropertyData *);
39
40 void captureProperty(
41 const QMetaObject *sourceMetaObject, int notifyIndex,
42 bool isSourceBindable, bool isTargetBindable);
43
44 struct Observer : QPropertyObserver {
45 static void trigger(QPropertyObserver *observer, QUntypedPropertyData *);
46 Observer(QQmlPropertyToPropertyBinding *binding)
47 : QPropertyObserver(trigger)
48 , binding(binding)
49 {
50 }
51 QQmlPropertyToPropertyBinding *binding = nullptr;
52 };
53
54 std::unique_ptr<Observer> observer;
55 QQmlEngine *m_engine = nullptr;
56 QObject *m_sourceObject = nullptr;
57 int m_sourcePropertyIndex = -1;
58};
59
61
63
64#endif
\inmodule QtCore
Definition qobject.h:103
The QQmlEngine class provides an environment for instantiating QML components.
Definition qqmlengine.h:57
Combined button and popup list for selecting options.
GLbitfield flags
void QQmlPropertyGuard_callback(QQmlNotifierEndpoint *e, void **)
QJSEngine engine
[0]
\inmodule QtCore