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
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{
26public:
30
31 QQmlScriptString &operator=(const QQmlScriptString &);
32
33 bool operator==(const QQmlScriptString &) const;
34 bool operator!=(const QQmlScriptString &) const;
35
36 bool isEmpty() const;
37
38 bool isUndefinedLiteral() const;
39 bool isNullLiteral() const;
40 QString stringLiteral() const;
41 qreal numberLiteral(bool *ok) const;
42 bool booleanLiteral(bool *ok) const;
43
44private:
45 QQmlScriptString(const QString &script, QQmlContext *context, QObject *scope);
46 QSharedDataPointer<QQmlScriptStringPrivate> d;
47
48 friend class QQmlObjectCreator;
50 friend class QQmlExpression;
51 friend class QQmlBinding;
52 friend class QQmlPropertyBinding;
53 friend struct QV4::QObjectWrapper;
54};
55
57
59
60#endif // QQMLSCRIPTSTRING_H
61
\inmodule QtCore
Definition qobject.h:103
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.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
static void * context
constexpr bool operator!=(const timespec &t1, const timespec &t2)
#define Q_DECLARE_METATYPE(TYPE)
Definition qmetatype.h:1525
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
Definition qrandom.cpp:1220
#define Q_GADGET
double qreal
Definition qtypes.h:187