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
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
4#ifndef QQUICKPROPERTYCHANGES_H
5#define QQUICKPROPERTYCHANGES_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
19#include <private/qqmlcustomparser_p.h>
20
22
24class Q_QUICK_EXPORT QQuickPropertyChanges : public QQuickStateOperation
25{
27 Q_DECLARE_PRIVATE(QQuickPropertyChanges)
28 Q_PROPERTY(QObject *target READ object WRITE setObject NOTIFY objectChanged)
29 Q_PROPERTY(bool restoreEntryValues READ restoreEntryValues WRITE setRestoreEntryValues
30 NOTIFY restoreEntryValuesChanged)
31 Q_PROPERTY(bool explicit READ isExplicit WRITE setIsExplicit NOTIFY isExplicitChanged)
32 QML_NAMED_ELEMENT(PropertyChanges)
35 Q_CLASSINFO("ImmediatePropertyNames", "target,restoreEntryValues,explicit,objectName")
36
37public:
40
41 QObject *object() const;
42 void setObject(QObject *);
43
44 bool restoreEntryValues() const;
45 void setRestoreEntryValues(bool);
46
47 bool isExplicit() const;
48 void setIsExplicit(bool);
49
50 ActionList actions() override;
51
52 bool containsProperty(const QString &name) const;
53 bool containsValue(const QString &name) const;
54 bool containsExpression(const QString &name) const;
55 void changeValue(const QString &name, const QVariant &value);
56 void changeExpression(const QString &name, const QString &expression);
57 void removeProperty(const QString &name);
58 QVariant value(const QString &name) const;
59 QString expression(const QString &name) const;
60
61 void detachFromState();
62 void attachToState();
63
64 QVariant property(const QString &name) const;
65
67 void objectChanged();
68 void restoreEntryValuesChanged();
69 void isExplicitChanged();
70};
71
73{
74public:
76 : QQmlCustomParser(AcceptsAttachedProperties) {}
77
78 void verifyList(const QQmlRefPointer<QV4::ExecutableCompilationUnit> &compilationUnit, const QV4::CompiledData::Binding *binding);
79
80 void verifyBindings(const QQmlRefPointer<QV4::ExecutableCompilationUnit> &compilationUnit, const QList<const QV4::CompiledData::Binding *> &props) override;
81 void applyBindings(QObject *obj, const QQmlRefPointer<QV4::ExecutableCompilationUnit> &compilationUnit, const QList<const QV4::CompiledData::Binding *> &bindings) override;
82};
83
84template<>
89
91
92#endif // QQUICKPROPERTYCHANGES_H
\inmodule QtCore
Definition qobject.h:103
The QQmlCustomParser class allows you to add new arbitrary types to QML.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum target
GLenum GLuint GLsizei const GLenum * props
GLuint name
GLhandleARB obj
[2]
#define QML_NAMED_ELEMENT(NAME)
#define QML_CUSTOMPARSER
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
QQmlCustomParser * qmlCreateCustomParser< QQuickPropertyChanges >()
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_CLASSINFO(name, value)
#define Q_SIGNALS
const char property[13]
Definition qwizard.cpp:101
#define explicit