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
qquicksmoothedanimation_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 QQUICKSMOOTHEDANIMATION2_P_H
5#define QQUICKSMOOTHEDANIMATION2_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#include "qquickanimation_p.h"
20
21#include "qquickanimation_p_p.h"
22
23#include <private/qobject_p.h>
24#include <QBasicTimer>
25
29{
31public:
34public Q_SLOTS:
35 void stopAnimation();
36private:
37 QSmoothedAnimation *m_animation;
38};
39
42{
43 Q_DISABLE_COPY(QSmoothedAnimation)
44public:
46
51
54
57
59
60 int duration() const override;
61 void restart();
62 void init();
63
64 void prepareForRestart();
65 void clearTemplate() { animationTemplate = nullptr; }
66
67protected:
68 void updateCurrentTime(int) override;
70 void debugAnimation(QDebug d) const override;
71
72private:
73 qreal easeFollow(qreal);
74 qreal initialValue;
75
76 bool invert;
77
78 int finalDuration;
79
80 // Parameters for use in updateCurrentTime()
81 qreal a; // Acceleration
82 qreal d; // Deceleration
83 qreal tf; // Total time
84 qreal tp; // Time at which peak velocity occurs
85 qreal td; // Time at which deceleration begins
86 qreal vp; // Velocity at tp
87 qreal sp; // Displacement at tp
88 qreal sd; // Displacement at td
89 qreal vi; // "Normalized" initialvelocity
90 qreal s; // Total s
91
92 int lastTime;
93 bool skipUpdate;
94
95 bool recalc();
96 void delayedStop();
97 QSmoothedAnimationTimer *delayedStopTimer;
98 QQuickSmoothedAnimationPrivate *animationTemplate;
99};
100
112
114
115#endif // QQUICKSMOOTHEDANIMATION2_P_H
virtual void debugAnimation(QDebug d) const
virtual void updateState(QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState)
virtual void updateCurrentTime(int)
\inmodule QtCore
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
The QQmlProperty class abstracts accessing properties on objects created from QML.
QHash< QQmlProperty, QSmoothedAnimation * > activeAnimations
QSmoothedAnimationTimer(QSmoothedAnimation *animation, QObject *parent=nullptr)
QQuickSmoothedAnimation::ReversingMode reversingMode
\inmodule QtCore
Definition qtimer.h:20
Combined button and popup list for selecting options.
GLboolean GLboolean GLboolean GLboolean a
[7]
GLdouble s
[6]
Definition qopenglext.h:235
GLboolean invert
Definition qopenglext.h:226
#define sp
#define Q_AUTOTEST_EXPORT
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
#define Q_OBJECT
#define Q_SLOTS
double qreal
Definition qtypes.h:187
QPropertyAnimation animation
[0]