Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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;
18class QQmlScriptStringPrivate;
19class QQmlObjectCreator;
20namespace QV4 {
21 struct QObjectWrapper;
22}
23class Q_QML_EXPORT QQmlScriptString
24{
25 Q_GADGET
26public:
27 QQmlScriptString();
28 QQmlScriptString(const QQmlScriptString &);
29 ~QQmlScriptString();
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;
49 friend class QQmlScriptStringPrivate;
50 friend class QQmlExpression;
51 friend class QQmlBinding;
52 friend class QQmlPropertyBinding;
53 friend struct QV4::QObjectWrapper;
54};
55
56QT_END_NAMESPACE
57
58Q_DECLARE_METATYPE(QQmlScriptString)
59
60#endif // QQMLSCRIPTSTRING_H
Q_ALWAYS_INLINE bool write(const QV4::Value &result, bool isUndefined, QQmlPropertyData::WriteFlags flags) override final
Q_ALWAYS_INLINE bool write(void *result, QMetaType type, bool isUndefined, QQmlPropertyData::WriteFlags flags) override final
Q_ALWAYS_INLINE bool doStore(T value, const QQmlPropertyData *pd, QQmlPropertyData::WriteFlags flags) const
QObjectPointerBinding(QMetaType propertyType)
Q_ALWAYS_INLINE bool write(const QV4::Value &result, bool isUndefined, QQmlPropertyData::WriteFlags flags) override final
Q_ALWAYS_INLINE bool write(void *result, QMetaType type, bool isUndefined, QQmlPropertyData::WriteFlags flags) override final
The QQmlScriptString class encapsulates a script and its context.
QString bindingValue() const override
QQmlSourceLocation sourceLocation() const override final
QQmlTranslationBindingFromBinding(const QQmlRefPointer< QV4::ExecutableCompilationUnit > &compilationUnit, const QV4::CompiledData::Binding *binding)
QQmlSourceLocation sourceLocation() const override final
QQmlTranslationBindingFromTranslationInfo(const QQmlRefPointer< QV4::ExecutableCompilationUnit > &compilationUnit, const QQmlTranslation &translationData, quint16 line, quint16 column)
virtual QString bindingValue() const override
QQmlTranslationBinding(const QQmlRefPointer< QV4::ExecutableCompilationUnit > &compilationUnit)
void doUpdate(const DeleteWatcher &watcher, QQmlPropertyData::WriteFlags flags, QV4::Scope &scope) override final
static void onLanguageChange(QPropertyObserver *observer, QUntypedPropertyData *)
virtual QString bindingValue() const =0
bool hasDependencies() const override final
Combined button and popup list for selecting options.
Definition qjsvalue.h:23