Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquickitemanimation_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 QQUICKITEMANIMATION_H
5#define QQUICKITEMANIMATION_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 "qquickitem.h"
19
20#include <QtQuick/private/qquickanimation_p.h>
21
23
25class Q_QUICK_PRIVATE_EXPORT QQuickParentAnimation : public QQuickAnimationGroup
26{
28 Q_DECLARE_PRIVATE(QQuickParentAnimation)
29
30 Q_PROPERTY(QQuickItem *target READ target WRITE setTargetObject NOTIFY targetChanged FINAL)
31 Q_PROPERTY(QQuickItem *newParent READ newParent WRITE setNewParent NOTIFY newParentChanged FINAL)
32 Q_PROPERTY(QQuickItem *via READ via WRITE setVia NOTIFY viaChanged FINAL)
33 QML_NAMED_ELEMENT(ParentAnimation)
35
36public:
38
39 QQuickItem *target() const;
40 void setTargetObject(QQuickItem *);
41
42 QQuickItem *newParent() const;
43 void setNewParent(QQuickItem *);
44
45 QQuickItem *via() const;
46 void setVia(QQuickItem *);
47
51 void viaChanged();
52
53protected:
55 QQmlProperties &modified,
57 QObject *defaultTarget = nullptr) override;
58};
59
61class Q_QUICK_PRIVATE_EXPORT QQuickAnchorAnimation : public QQuickAbstractAnimation
62{
64 Q_DECLARE_PRIVATE(QQuickAnchorAnimation)
65 Q_PROPERTY(QQmlListProperty<QQuickItem> targets READ targets FINAL)
66 Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged FINAL)
67 Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged FINAL)
68 QML_NAMED_ELEMENT(AnchorAnimation)
70
71public:
73
75
76 int duration() const;
77 void setDuration(int);
78
79 QEasingCurve easing() const;
80 void setEasing(const QEasingCurve &);
81
83 void durationChanged(int);
85
86protected:
88 QQmlProperties &modified,
90 QObject *defaultTarget = nullptr) override;
91};
92
93#if QT_CONFIG(quick_path)
94
95class QQuickItem;
96class QQuickPath;
97class QQuickPathAnimationPrivate;
98class Q_QUICK_PRIVATE_EXPORT QQuickPathAnimation : public QQuickAbstractAnimation
99{
101 Q_DISABLE_COPY_MOVE(QQuickPathAnimation)
102 Q_DECLARE_PRIVATE(QQuickPathAnimation)
103
104 Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged FINAL)
105 Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged FINAL)
106 Q_PROPERTY(QQuickPath *path READ path WRITE setPath NOTIFY pathChanged FINAL)
107 Q_PROPERTY(QQuickItem *target READ target WRITE setTargetObject NOTIFY targetChanged FINAL)
108 Q_PROPERTY(Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
109 Q_PROPERTY(QPointF anchorPoint READ anchorPoint WRITE setAnchorPoint NOTIFY anchorPointChanged FINAL)
110 Q_PROPERTY(int orientationEntryDuration READ orientationEntryDuration WRITE setOrientationEntryDuration NOTIFY orientationEntryDurationChanged FINAL)
111 Q_PROPERTY(int orientationExitDuration READ orientationExitDuration WRITE setOrientationExitDuration NOTIFY orientationExitDurationChanged FINAL)
112 Q_PROPERTY(qreal endRotation READ endRotation WRITE setEndRotation NOTIFY endRotationChanged FINAL)
113 QML_NAMED_ELEMENT(PathAnimation)
115
116public:
117 QQuickPathAnimation(QObject *parent=nullptr);
118 virtual ~QQuickPathAnimation();
119
120 enum Orientation {
121 Fixed,
122 RightFirst,
123 LeftFirst,
124 BottomFirst,
125 TopFirst
126 };
127 Q_ENUM(Orientation)
128
129 int duration() const;
130 void setDuration(int);
131
132 QEasingCurve easing() const;
133 void setEasing(const QEasingCurve &);
134
135 QQuickPath *path() const;
136 void setPath(QQuickPath *);
137
138 QQuickItem *target() const;
139 void setTargetObject(QQuickItem *);
140
141 Orientation orientation() const;
142 void setOrientation(Orientation orientation);
143
144 QPointF anchorPoint() const;
145 void setAnchorPoint(const QPointF &point);
146
147 int orientationEntryDuration() const;
148 void setOrientationEntryDuration(int);
149
150 int orientationExitDuration() const;
151 void setOrientationExitDuration(int);
152
153 qreal endRotation() const;
154 void setEndRotation(qreal);
155
156protected:
158 QQmlProperties &modified,
159 TransitionDirection direction,
160 QObject *defaultTarget = nullptr) override;
162 void durationChanged(int);
163 void easingChanged(const QEasingCurve &);
164 void pathChanged();
165 void targetChanged();
166 void orientationChanged(Orientation);
167 void anchorPointChanged(const QPointF &);
168 void orientationEntryDurationChanged(qreal);
169 void orientationExitDurationChanged(qreal);
170 void endRotationChanged(qreal);
171};
172
173#endif
174
176
179#if QT_CONFIG(quick_path)
180QML_DECLARE_TYPE(QQuickPathAnimation)
181#endif
182
183#endif // QQUICKITEMANIMATION_H
\inmodule QtCore
\inmodule QtCore
Definition qobject.h:90
\inmodule QtCore\reentrant
Definition qpoint.h:214
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
Definition qqmllist.h:24
virtual QAbstractAnimationJob * transition(QQuickStateActions &actions, QQmlProperties &modified, TransitionDirection direction, QObject *defaultTarget=nullptr)
void easingChanged(const QEasingCurve &)
QQmlListProperty< QQuickItem > targets()
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
direction
Combined button and popup list for selecting options.
Orientation
Definition qnamespace.h:97
GLenum target
GLsizei const GLchar *const * path
#define QML_DECLARE_TYPE(TYPE)
Definition qqml.h:19
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
double qreal
Definition qtypes.h:92
QEasingCurve easing(QEasingCurve::InOutQuad)
[typedef]
animation setDuration(1000)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent