Qt 6.x
The Qt SDK
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
48 {
50 }
51
52private:
53 QQmlGuard<QQuickTransition> m_transition;
55 friend class QQuickTransition;
56};
57
58class Q_QUICK_PRIVATE_EXPORT QQuickTransition : public QObject
59{
61 Q_DECLARE_PRIVATE(QQuickTransition)
62
63 Q_PROPERTY(QString from READ fromState WRITE setFromState NOTIFY fromChanged FINAL)
64 Q_PROPERTY(QString to READ toState WRITE setToState NOTIFY toChanged FINAL)
65 Q_PROPERTY(bool reversible READ reversible WRITE setReversible NOTIFY reversibleChanged FINAL)
66 Q_PROPERTY(bool running READ running NOTIFY runningChanged FINAL)
67 Q_PROPERTY(QQmlListProperty<QQuickAbstractAnimation> animations READ animations FINAL)
68 Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged FINAL)
69 Q_CLASSINFO("DefaultProperty", "animations")
70 Q_CLASSINFO("DeferredPropertyNames", "animations")
71 QML_NAMED_ELEMENT(Transition)
73
74public:
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
97 QObject *defaultTarget);
98
99 void setReversed(bool r);
100
103 void toChanged();
107};
108
110
112
113#endif // QQUICKTRANSITION_H
void removeAnimationChangeListener(QAnimationJobChangeListener *listener, QAbstractAnimationJob::ChangeTypes)
\inmodule QtCore
Definition qobject.h:90
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
Definition qqmllist.h:24
void animationStateChanged(QAbstractAnimationJob *, QAbstractAnimationJob::State, QAbstractAnimationJob::State) override
QQmlListProperty< QQuickAbstractAnimation > animations()
void reversibleChanged()
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
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_DECLARE_TYPE(TYPE)
Definition qqml.h:19
#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
#define enabled
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent