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
22
QT_BEGIN_NAMESPACE
23
24
class
Q_QML_EXPORT
QQmlPropertyToPropertyBinding
25
:
public
QQmlAbstractBinding
,
public
QQmlNotifierEndpoint
26
{
27
public
:
28
QQmlPropertyToPropertyBinding
(
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
37
private
:
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
60
void
QQmlPropertyGuard_callback
(
QQmlNotifierEndpoint
*e,
void
**);
61
62
QT_END_NAMESPACE
63
64
#endif
QObject
\inmodule QtCore
Definition
qobject.h:103
QPropertyObserver
Definition
qproperty.h:259
QQmlAbstractBinding
Definition
qqmlabstractbinding_p.h:29
QQmlAbstractBinding::Kind
Kind
Definition
qqmlabstractbinding_p.h:34
QQmlEngine
The QQmlEngine class provides an environment for instantiating QML components.
Definition
qqmlengine.h:57
QQmlNotifierEndpoint
Definition
qqmlnotifier_p.h:46
QQmlPropertyData::DontRemoveBinding
@ DontRemoveBinding
Definition
qqmlpropertydata_p.h:30
QQmlPropertyToPropertyBinding
Definition
qqmlpropertytopropertybinding_p.h:26
QUntypedPropertyData
Definition
qpropertyprivate.h:122
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
flags
GLbitfield flags
Definition
qopengles2ext.h:1026
QQmlPropertyGuard_callback
void QQmlPropertyGuard_callback(QQmlNotifierEndpoint *e, void **)
Definition
qqmlpropertytopropertybinding.cpp:117
engine
QJSEngine engine
[0]
Definition
src_script_qjsvalue.cpp:14
QMetaObject
\inmodule QtCore
Definition
qobjectdefs.h:234
qtdeclarative
src
qml
qml
qqmlpropertytopropertybinding_p.h
Generated by
1.10.0