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
qquickpropertychanges_p.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 reason:default
4
5#ifndef QQUICKPROPERTYCHANGES_H
6#define QQUICKPROPERTYCHANGES_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
20#include <private/qqmlcustomparser_p.h>
21
23
25class Q_QUICK_EXPORT QQuickPropertyChanges : public QQuickStateOperation
26{
27 Q_OBJECT
28 Q_DECLARE_PRIVATE(QQuickPropertyChanges)
29 Q_PROPERTY(QObject *target READ object WRITE setObject NOTIFY objectChanged)
30 Q_PROPERTY(bool restoreEntryValues READ restoreEntryValues WRITE setRestoreEntryValues
31 NOTIFY restoreEntryValuesChanged)
32 Q_PROPERTY(bool explicit READ isExplicit WRITE setIsExplicit NOTIFY isExplicitChanged)
33 QML_NAMED_ELEMENT(PropertyChanges)
34 QML_ADDED_IN_VERSION(2, 0)
35 QML_CUSTOMPARSER
36 Q_CLASSINFO("ImmediatePropertyNames", "target,restoreEntryValues,explicit,objectName")
37
38public:
39 QQuickPropertyChanges();
40 ~QQuickPropertyChanges();
41
42 QObject *object() const;
43 void setObject(QObject *);
44
45 bool restoreEntryValues() const;
46 void setRestoreEntryValues(bool);
47
48 bool isExplicit() const;
49 void setIsExplicit(bool);
50
51 ActionList actions() override;
52
53 bool containsProperty(const QString &name) const;
54 bool containsValue(const QString &name) const;
55 bool containsExpression(const QString &name) const;
56 void changeValue(const QString &name, const QVariant &value);
57 void changeExpression(const QString &name, const QString &expression);
58 void removeProperty(const QString &name);
59 QVariant value(const QString &name) const;
60 QString expression(const QString &name) const;
61
62 void detachFromState();
63 void attachToState();
64
65 QVariant property(const QString &name) const;
66
67Q_SIGNALS:
68 void objectChanged();
69 void restoreEntryValuesChanged();
70 void isExplicitChanged();
71};
72
74{
75public:
78
79 void verifyList(
80 const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &compilationUnit,
81 const QV4::CompiledData::Binding *binding);
82
83 void verifyBindings(
84 const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &compilationUnit,
85 const QList<const QV4::CompiledData::Binding *> &props) override;
86 void applyBindings(
87 QObject *obj, const QQmlRefPointer<QV4::ExecutableCompilationUnit> &compilationUnit,
88 const QList<const QV4::CompiledData::Binding *> &bindings) override;
89};
90
91template<>
96
97QT_END_NAMESPACE
98
99#endif // QQUICKPROPERTYCHANGES_H
The QQmlProperty class abstracts accessing properties on objects created from QML.
void verifyBindings(const QQmlRefPointer< QV4::CompiledData::CompilationUnit > &compilationUnit, const QList< const QV4::CompiledData::Binding * > &props) override
void verifyList(const QQmlRefPointer< QV4::CompiledData::CompilationUnit > &compilationUnit, const QV4::CompiledData::Binding *binding)
void applyBindings(QObject *obj, const QQmlRefPointer< QV4::ExecutableCompilationUnit > &compilationUnit, const QList< const QV4::CompiledData::Binding * > &bindings) override
ExpressionChange(const QString &_name, const QV4::CompiledData::Binding *_binding, QQmlBinding::Identifier _id, const QString &_expr, const QUrl &_url, int _line, int _column)
QQmlProperty property(const QString &)
QQmlRefPointer< QV4::ExecutableCompilationUnit > compilationUnit
void decodeBinding(const QString &propertyPrefix, const QQmlRefPointer< QV4::ExecutableCompilationUnit > &qmlUnit, const QV4::CompiledData::Binding *binding)
QList< QQuickReplaceSignalHandler * > signalReplacements
QList< ExpressionChange > expressions
QList< const QV4::CompiledData::Binding * > bindings
\qmltype PropertyChanges \inqmlmodule QtQuick
void copyOriginals(QQuickStateActionEvent *other) override
bool mayOverride(QQuickStateActionEvent *other) override
EventType type() const override
QQmlRefPointer< QQmlBoundSignalExpression > rewindExpression
QQmlRefPointer< QQmlBoundSignalExpression > reverseExpression
QQmlRefPointer< QQmlBoundSignalExpression > expression
QQmlCustomParser * qmlCreateCustomParser< QQmlConnections >()