Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qqmlboundsignal_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 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
// Qt-Security score:significant
4
5
#
ifndef
QQMLBOUNDSIGNAL_P_H
6
#
define
QQMLBOUNDSIGNAL_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtCore
/
qmetaobject
.
h
>
20
21
#
include
<
private
/
qqmljavascriptexpression_p
.
h
>
22
#
include
<
private
/
qqmlnotifier_p
.
h
>
23
#
include
<
private
/
qqmlrefcount_p
.
h
>
24
#
include
<
private
/
qtqmlglobal_p
.
h
>
25
26
QT_BEGIN_NAMESPACE
27
28
class
Q_QML_EXPORT QQmlBoundSignalExpression final
29
:
public
QQmlJavaScriptExpression,
30
public
QQmlRefCounted<QQmlBoundSignalExpression>
31
{
32
friend
class
QQmlRefCounted<QQmlBoundSignalExpression>;
33
public
:
34
QQmlBoundSignalExpression(
35
const
QObject *target,
int
index,
const
QQmlRefPointer<QQmlContextData> &ctxt, QObject *scope,
36
const
QString &expression,
const
QString &fileName, quint16 line, quint16 column,
37
const
QString &handlerName = QString(),
const
QString ¶meterString = QString());
38
39
QQmlBoundSignalExpression(
40
const
QObject *target,
int
index,
const
QQmlRefPointer<QQmlContextData> &ctxt,
41
QObject *scopeObject, QV4::Function *function, QV4::ExecutionContext *scope =
nullptr
);
42
43
// inherited from QQmlJavaScriptExpression.
44
QString expressionIdentifier()
const
override;
45
void
expressionChanged() override;
46
47
// evaluation of a bound signal expression doesn't return any value
48
void
evaluate(
void
**a);
49
50
bool
mustCaptureBindableProperty()
const
final {
return
true
;}
51
52
QString expression()
const
;
53
const
QObject *target()
const
{
return
m_target; }
54
55
private
:
56
~QQmlBoundSignalExpression() override;
57
58
void
init(
const
QQmlRefPointer<QQmlContextData> &ctxt, QObject *scope);
59
60
bool
expressionFunctionValid()
const
{
return
function() !=
nullptr
; }
61
62
int
m_index;
63
const
QObject *m_target;
64
};
65
66
namespace
QQmlPreview
{
class
BindingPatchContext
; }
67
68
class
Q_QML_EXPORT
QQmlBoundSignal
:
public
QQmlNotifierEndpoint
69
{
70
public
:
71
QQmlBoundSignal(QObject *target,
int
signal, QObject *owner, QQmlEngine *engine);
72
~QQmlBoundSignal();
73
74
void
removeFromObject();
75
76
QQmlBoundSignalExpression *expression()
const
;
77
void
takeExpression(QQmlBoundSignalExpression *);
78
79
void
setEnabled(
bool
enabled);
80
81
private
:
82
friend
void
QQmlBoundSignal_callback(QQmlNotifierEndpoint *,
void
**);
83
friend
class
QQmlPropertyPrivate;
84
friend
class
QQmlData;
85
friend
class
QQmlEngineDebugService;
86
friend
class
QQmlPreview::BindingPatchContext;
87
88
void
addToObject(QObject *owner);
89
90
QQmlBoundSignal **m_prevSignal;
91
QQmlBoundSignal *m_nextSignal;
92
93
bool
m_enabled;
94
95
QQmlRefPointer<QQmlBoundSignalExpression> m_expression;
96
};
97
98
class
QQmlPropertyObserver
:
public
QPropertyObserver
99
{
100
public
:
101
QQmlPropertyObserver
(QQmlBoundSignalExpression *expr);
102
103
private
:
104
QQmlRefPointer<QQmlBoundSignalExpression> expression;
105
};
106
107
QT_END_NAMESPACE
108
109
#
endif
// QQMLBOUNDSIGNAL_P_H
QQmlBoundSignal
\inmodule QtQml
Definition
qqmlboundsignal_p.h:69
QQmlEngine
The QQmlEngine class provides an environment for instantiating QML components.
Definition
qqmlengine.h:58
QQmlPreview::BindingPatchContext
Definition
qqmlpreviewbindingpatchcontext_p.h:52
QQmlPropertyObserver
Definition
qqmlboundsignal_p.h:99
QQmlPropertyObserver::QQmlPropertyObserver
QQmlPropertyObserver(QQmlBoundSignalExpression *expr)
Definition
qqmlboundsignal.cpp:331
QQmlPreview
Definition
qqmlboundsignal_p.h:66
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QQmlBoundSignal_callback
void QQmlBoundSignal_callback(QQmlNotifierEndpoint *e, void **a)
Definition
qqmlboundsignal.cpp:301
qtdeclarative
src
qml
qml
qqmlboundsignal_p.h
Generated on
for Qt by
1.18.0