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
qquickitemanimation_p_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 QQUICKANIMATION_P_H
5#define QQUICKANIMATION_P_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
20#if QT_CONFIG(quick_path)
21#include <private/qquickpath_p.h>
22#endif
23#include <private/qquickanimation_p_p.h>
24
26
40
52
53#if QT_CONFIG(quick_path)
54
55class QQuickPathAnimationUpdater : public QQuickBulkValueUpdater
56{
57public:
58 QQuickPathAnimationUpdater() : path(nullptr), pathLength(0), target(nullptr), reverse(false),
59 fromIsSourced(false), fromIsDefined(false), toIsDefined(false),
60 toX(0), toY(0), currentV(0), orientation(QQuickPathAnimation::Fixed),
61 entryInterval(0), exitInterval(0) {}
62 ~QQuickPathAnimationUpdater() {}
63
64 void setValue(qreal v) override;
65
67
68 QPainterPath painterPath;
69 QQuickCachedBezier prevBez;
70 qreal pathLength;
71 QList<QQuickPath::AttributePoint> attributePoints;
72
74 bool reverse;
75 bool fromIsSourced;
76 bool fromIsDefined;
77 bool toIsDefined;
78 qreal toX;
79 qreal toY;
80 qreal currentV;
81 QQmlNullableValue<qreal> interruptStart;
82 //TODO: bundle below into common struct
83 QQuickPathAnimation::Orientation orientation;
84 QPointF anchorPoint;
85 qreal entryInterval;
86 qreal exitInterval;
87 QQmlNullableValue<qreal> endRotation;
88 QQmlNullableValue<qreal> startRotation;
89};
90
91class QQuickPathAnimationPrivate;
92class QQuickPathAnimationAnimator : public QQuickBulkValueAnimator
93{
94public:
95 QQuickPathAnimationAnimator(QQuickPathAnimationPrivate * = nullptr);
96 ~QQuickPathAnimationAnimator();
97
98 void clearTemplate() { animationTemplate = nullptr; }
99
100 QQuickPathAnimationUpdater *pathUpdater() const { return static_cast<QQuickPathAnimationUpdater*>(getAnimValue()); }
101private:
102 QQuickPathAnimationPrivate *animationTemplate;
103};
104
105class QQuickPathAnimationPrivate : public QQuickAbstractAnimationPrivate
106{
107 Q_DECLARE_PUBLIC(QQuickPathAnimation)
108public:
109 QQuickPathAnimationPrivate() : path(nullptr), target(nullptr),
110 orientation(QQuickPathAnimation::Fixed), entryDuration(0), exitDuration(0), duration(250) {}
111
114 QQuickPathAnimation::Orientation orientation;
115 QPointF anchorPoint;
116 qreal entryDuration;
117 qreal exitDuration;
118 QQmlNullableValue<qreal> endRotation;
119 int duration;
120 QEasingCurve easingCurve;
121 QHash<QQuickItem*, QQuickPathAnimationAnimator* > activeAnimations;
122};
123
124#endif
125
127
128#endif // QQUICKANIMATION_P_H
\inmodule QtCore
\inmodule QtCore
Definition qmetatype.h:341
\inmodule QtGui
\inmodule QtCore\reentrant
Definition qpoint.h:217
QVariantAnimation::Interpolator interpolator
virtual void setValue(qreal value)=0
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
TransformOrigin
\variable QQuickItem::ItemChangeData::realValue The numeric value that has changed: \l {QQuickItem::o...
Definition qquickitem.h:171
QPointF computeTransformOrigin(QQuickItem::TransformOrigin origin, qreal width, qreal height) const
QVariant(* Interpolator)(const void *from, const void *to, qreal progress)
Combined button and popup list for selecting options.
GLsizei const GLfloat * v
[13]
GLint GLsizei GLsizei height
GLint GLsizei width
GLenum target
GLsizei const GLchar *const * path
double qreal
Definition qtypes.h:187
QObject::connect nullptr