Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
qqmlexpression.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
4
#ifndef QQMLEXPRESSION_H
5
#define QQMLEXPRESSION_H
6
7
#include <QtQml/qqmlerror.h>
8
#include <QtQml/qqmlscriptstring.h>
9
10
#include <QtCore/qobject.h>
11
#include <QtCore/qvariant.h>
12
13
QT_BEGIN_NAMESPACE
14
15
16
class
QString
;
17
class
QQmlEngine
;
18
class
QQmlContext
;
19
class
QQmlExpressionPrivate
;
20
class
QQmlContextData
;
21
class
Q_QML_EXPORT
QQmlExpression
:
public
QObject
22
{
23
Q_OBJECT
24
public
:
25
QQmlExpression
();
26
QQmlExpression
(
QQmlContext
*,
QObject
*,
const
QString
&,
QObject
* =
nullptr
);
27
explicit
QQmlExpression
(
const
QQmlScriptString
&,
QQmlContext
* =
nullptr
,
QObject
* =
nullptr
,
QObject
* =
nullptr
);
28
~QQmlExpression
()
override
;
29
30
QQmlEngine
*
engine
()
const
;
31
QQmlContext
*
context
()
const
;
32
33
QString
expression()
const
;
34
void
setExpression(
const
QString
&);
35
36
bool
notifyOnValueChanged()
const
;
37
void
setNotifyOnValueChanged(
bool
);
38
39
QString
sourceFile()
const
;
40
int
lineNumber()
const
;
41
int
columnNumber()
const
;
42
void
setSourceLocation(
const
QString
&
fileName
,
int
line
,
int
column
= 0);
43
44
QObject
*scopeObject()
const
;
45
46
bool
hasError()
const
;
47
void
clearError();
48
QQmlError
error
()
const
;
49
50
QVariant
evaluate
(
bool
*valueIsUndefined =
nullptr
);
51
52
Q_SIGNALS
:
53
void
valueChanged
();
54
55
private
:
56
QQmlExpression
(
QQmlExpressionPrivate
&dd,
QObject
*
parent
);
57
58
Q_DISABLE_COPY(
QQmlExpression
)
59
Q_DECLARE_PRIVATE(
QQmlExpression
)
60
friend class QQmlDebugger;
61
friend class
QQmlContext
;
62
};
63
64
QT_END_NAMESPACE
65
66
#endif
// QQMLEXPRESSION_H
67
QObject
\inmodule QtCore
Definition
qobject.h:90
QQmlContextData
Definition
qqmlcontextdata_p.h:34
QQmlContext
The QQmlContext class defines a context within a QML engine.
Definition
qqmlcontext.h:25
QQmlEngine
The QQmlEngine class provides an environment for instantiating QML components.
Definition
qqmlengine.h:57
QQmlError
The QQmlError class encapsulates a QML error.
Definition
qqmlerror.h:18
QQmlExpressionPrivate
Definition
qqmlexpression_p.h:30
QQmlExpression
The QQmlExpression class evaluates JavaScript in a QML context.
Definition
qqmlexpression.h:22
QQmlExpression::valueChanged
void valueChanged()
Emitted each time the expression value changes from the last time it was evaluated.
QQmlScriptString
The QQmlScriptString class encapsulates a script and its context.
Definition
qqmlscriptstring.h:24
QString
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition
qstring.h:127
QVariant
\inmodule QtCore
Definition
qvariant.h:64
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
context
static void * context
Definition
qandroidaudiosource.cpp:42
error
DBusConnection const char DBusError * error
Definition
qdbus_symbols_p.h:157
column
GLenum GLenum GLsizei void GLsizei void * column
Definition
qopenglext.h:2747
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:117
Q_SIGNALS
#define Q_SIGNALS
Definition
qtmetamacros.h:45
line
QString line
Definition
src_corelib_io_qtextstream.cpp:16
fileName
fileName
[0]
Definition
src_gui_dialogs_qfiledialog.cpp:5
evaluate
engine evaluate("var myObject = new MyObject()")
[8]
engine
QJSEngine engine
[0]
Definition
src_script_qjsvalue.cpp:14
parent
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent
Definition
uiaclientinterfaces_p.h:209
qtdeclarative
src
qml
qml
qqmlexpression.h
Generated by
1.9.7