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
qquicktransition_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 QQUICKTRANSITION_H
5#define QQUICKTRANSITION_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 <private/qabstractanimationjob_p.h>
20#include <private/qqmlguard_p.h>
21#include <qqml.h>
22
23#include <QtCore/qobject.h>
24
26
31
33{
34public:
37
38 void start();
39 void stop();
40 void complete();
41
42 bool isRunning() const;
43
44protected:
46
51
52private:
53 QQmlGuard<QQuickTransition> m_transition;
55 friend class QQuickTransition;
56};
57
58class Q_QUICK_EXPORT QQuickTransition : public QObject
59{
61 Q_DECLARE_PRIVATE(QQuickTransition)
62
63 Q_PROPERTY(QString from READ fromState WRITE setFromState NOTIFY fromChanged)
64 Q_PROPERTY(QString to READ toState WRITE setToState NOTIFY toChanged)
65 Q_PROPERTY(bool reversible READ reversible WRITE setReversible NOTIFY reversibleChanged)
66 Q_PROPERTY(bool running READ running NOTIFY runningChanged)
68 Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
69 Q_CLASSINFO("DefaultProperty", "animations")
70 Q_CLASSINFO("DeferredPropertyNames", "animations")
71 QML_NAMED_ELEMENT(Transition)
73
74public:
75 QQuickTransition(QObject *parent=nullptr);
77
78 QString fromState() const;
79 void setFromState(const QString &);
80
81 QString toState() const;
82 void setToState(const QString &);
83
84 bool reversible() const;
85 void setReversible(bool);
86
87 bool enabled() const;
88 void setEnabled(bool enabled);
89
90 bool running() const;
91
93
94 QQuickTransitionInstance *prepare(QQuickStateOperation::ActionList &actions,
95 QList<QQmlProperty> &after,
97 QObject *defaultTarget);
98
99 void setReversed(bool r);
100
102 void fromChanged();
103 void toChanged();
104 void reversibleChanged();
105 void enabledChanged();
106 void runningChanged();
107};
108
110
111#endif // QQUICKTRANSITION_H
void removeAnimationChangeListener(QAnimationJobChangeListener *listener, QAbstractAnimationJob::ChangeTypes)
Definition qlist.h:75
\inmodule QtCore
Definition qobject.h:103
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
Definition qqmllist.h:24
The QQmlProperty class abstracts accessing properties on objects created from QML.
QQuickTransitionInstance(QQuickTransition *transition, QAbstractAnimationJob *anim)
void animationStateChanged(QAbstractAnimationJob *, QAbstractAnimationJob::State, QAbstractAnimationJob::State) override
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
static Q_CONSTINIT QBasicAtomicInt running
GLboolean r
[2]
GLuint GLuint end
GLenum GLenum GLsizei const GLuint GLboolean enabled
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_CLASSINFO(name, value)
#define Q_SIGNALS