Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
qqmlscriptstring.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 QQMLSCRIPTSTRING_H
5#define QQMLSCRIPTSTRING_H
6
7#include <QtQml/qtqmlglobal.h>
8#include <QtQml/qqml.h>
9#include <QtCore/qstring.h>
10#include <QtCore/qshareddata.h>
11#include <QtCore/qmetatype.h>
12
14
15
16class QObject;
17class QQmlContext;
20namespace QV4 {
21 struct QObjectWrapper;
22}
23class Q_QML_EXPORT QQmlScriptString
24{
27public:
31
32 QQmlScriptString &operator=(const QQmlScriptString &);
33
34 bool operator==(const QQmlScriptString &) const;
35 bool operator!=(const QQmlScriptString &) const;
36
37 bool isEmpty() const;
38
39 bool isUndefinedLiteral() const;
40 bool isNullLiteral() const;
41 QString stringLiteral() const;
42 qreal numberLiteral(bool *ok) const;
43 bool booleanLiteral(bool *ok) const;
44
45private:
46 QQmlScriptString(const QString &script, QQmlContext *context, QObject *scope);
48
49 friend class QQmlObjectCreator;
51 friend class QQmlExpression;
52 friend class QQmlBinding;
53 friend class QQmlPropertyBinding;
54 friend struct QV4::QObjectWrapper;
55};
56
58
60
61#endif // QQMLSCRIPTSTRING_H
62
\inmodule QtCore
Definition qobject.h:90
The QQmlContext class defines a context within a QML engine.
Definition qqmlcontext.h:25
The QQmlExpression class evaluates JavaScript in a QML context.
The QQmlScriptString class encapsulates a script and its context.
\inmodule QtCore
Definition qshareddata.h:35
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
Combined button and popup list for selecting options.
\qmltype Particle \inqmlmodule QtQuick.Particles
static void * context
constexpr bool operator!=(const timespec &t1, const timespec &t2)
#define Q_DECLARE_METATYPE(TYPE)
Definition qmetatype.h:1504
#define QML_ANONYMOUS
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
Definition qrandom.cpp:1219
#define Q_GADGET
double qreal
Definition qtypes.h:92