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 QQUICKSTATEOPERATIONS_H
5#define QQUICKSTATEOPERATIONS_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
18#include "qquickstate_p.h"
19#include <qqmlscriptstring.h>
20
21QT_BEGIN_NAMESPACE
22
23class QQuickStateChangeScriptPrivate;
24class Q_QUICK_PRIVATE_EXPORT QQuickStateChangeScript : public QQuickStateOperation, public QQuickStateActionEvent
25{
26 Q_OBJECT
27 Q_DECLARE_PRIVATE(QQuickStateChangeScript)
28
29 Q_PROPERTY(QQmlScriptString script READ script WRITE setScript FINAL)
30 Q_PROPERTY(QString name READ name WRITE setName FINAL)
31 QML_NAMED_ELEMENT(StateChangeScript)
32 QML_ADDED_IN_VERSION(2, 0)
33
34public:
35 QQuickStateChangeScript(QObject *parent=nullptr);
36
37 ActionList actions() override;
38
39 EventType type() const override;
40
41 QQmlScriptString script() const;
42 void setScript(const QQmlScriptString &);
43
44 QString name() const;
45 void setName(const QString &);
46
47 void execute() override;
48};
49
50
51QT_END_NAMESPACE
52
53QML_DECLARE_TYPE(QQuickStateChangeScript)
54
55#endif // QQUICKSTATEOPERATIONS_H
56

source code of qtdeclarative/src/quick/util/qquickstatechangescript_p.h