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// Qt-Security score:significant
4
5#ifndef QQMLSCRIPTSTRING_H
6#define QQMLSCRIPTSTRING_H
7
8#include <QtQml/qtqmlglobal.h>
9#include <QtQml/qqml.h>
10#include <QtCore/qstring.h>
11#include <QtCore/qshareddata.h>
12#include <QtCore/qmetatype.h>
13
15
16
17class QObject;
18class QQmlContext;
19class QQmlScriptStringPrivate;
20class QQmlObjectCreator;
21namespace QV4 {
22 struct QObjectWrapper;
23}
24class Q_QML_EXPORT QQmlScriptString
25{
26 Q_GADGET
27public:
28 QQmlScriptString();
29 QQmlScriptString(const QQmlScriptString &);
30 ~QQmlScriptString();
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);
47 QSharedDataPointer<QQmlScriptStringPrivate> d;
48
49 friend class QQmlObjectCreator;
50 friend class QQmlScriptStringPrivate;
51 friend class QQmlExpression;
52 friend class QQmlBinding;
53 friend class QQmlPropertyBinding;
54 friend struct QV4::QObjectWrapper;
55};
56
57QT_END_NAMESPACE
58
59Q_DECLARE_METATYPE(QQmlScriptString)
60
61#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:24