Qt
6.x
The Qt SDK
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
18
#include "
qquicksmoothedanimation_p.h
"
19
#include "
qquickanimation_p.h
"
20
21
#include "
qquickanimation_p_p.h
"
22
23
#include <private/qobject_p.h>
24
#include <QBasicTimer>
25
26
QT_BEGIN_NAMESPACE
27
class
QSmoothedAnimation
;
28
class
QSmoothedAnimationTimer
:
public
QTimer
29
{
30
Q_OBJECT
31
public
:
32
explicit
QSmoothedAnimationTimer
(
QSmoothedAnimation
*
animation
,
QObject
*
parent
=
nullptr
);
33
~QSmoothedAnimationTimer
();
34
public
Q_SLOTS
:
35
void
stopAnimation
();
36
private
:
37
QSmoothedAnimation
*m_animation;
38
};
39
40
class
QQuickSmoothedAnimationPrivate
;
41
class
Q_AUTOTEST_EXPORT
QSmoothedAnimation
:
public
QAbstractAnimationJob
42
{
43
Q_DISABLE_COPY(
QSmoothedAnimation
)
44
public
:
45
QSmoothedAnimation
(
QQuickSmoothedAnimationPrivate
* =
nullptr
);
46
47
~QSmoothedAnimation
();
48
qreal
to
;
49
qreal
velocity
;
50
int
userDuration
;
51
52
int
maximumEasingTime
;
53
QQuickSmoothedAnimation::ReversingMode
reversingMode
;
54
55
qreal
initialVelocity
;
56
qreal
trackVelocity
;
57
58
QQmlProperty
target
;
59
60
int
duration
()
const override
;
61
void
restart();
62
void
init
();
63
64
void
prepareForRestart();
65
void
clearTemplate
() { animationTemplate =
nullptr
; }
66
67
protected
:
68
void
updateCurrentTime
(
int
)
override
;
69
void
updateState
(
QAbstractAnimationJob::State
,
QAbstractAnimationJob::State
)
override
;
70
void
debugAnimation
(
QDebug
d
)
const override
;
71
72
private
:
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
101
class
QQuickSmoothedAnimationPrivate
:
public
QQuickPropertyAnimationPrivate
102
{
103
Q_DECLARE_PUBLIC(
QQuickSmoothedAnimation
)
104
public
:
105
QQuickSmoothedAnimationPrivate
();
106
~QQuickSmoothedAnimationPrivate
();
107
void
updateRunningAnimations
();
108
109
QSmoothedAnimation
*
anim
;
110
QHash<QQmlProperty, QSmoothedAnimation*>
activeAnimations
;
111
};
112
113
QT_END_NAMESPACE
114
115
#endif
// QQUICKSMOOTHEDANIMATION2_P_H
QAbstractAnimationJob
Definition
qabstractanimationjob_p.h:34
QAbstractAnimationJob::State
State
Definition
qabstractanimationjob_p.h:42
QAbstractAnimationJob::debugAnimation
virtual void debugAnimation(QDebug d) const
Definition
qabstractanimationjob.cpp:648
QAbstractAnimationJob::updateState
virtual void updateState(QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState)
Definition
qabstractanimationjob.cpp:568
QAbstractAnimationJob::duration
virtual int duration() const
Definition
qabstractanimationjob_p.h:58
QAbstractAnimationJob::updateCurrentTime
virtual void updateCurrentTime(int)
Definition
qabstractanimationjob_p.h:100
QDebug
\inmodule QtCore
QHash
\inmodule QtCore
Definition
qhash.h:818
QObject
\inmodule QtCore
Definition
qobject.h:90
QObject::parent
QObject * parent() const
Returns a pointer to the parent object.
Definition
qobject.h:311
QQmlProperty
The QQmlProperty class abstracts accessing properties on objects created from QML.
Definition
qqmlproperty.h:23
QQuickPropertyAnimationPrivate
Definition
qquickanimation_p_p.h:238
QQuickSmoothedAnimationPrivate
Definition
qquicksmoothedanimation_p_p.h:102
QQuickSmoothedAnimationPrivate::activeAnimations
QHash< QQmlProperty, QSmoothedAnimation * > activeAnimations
Definition
qquicksmoothedanimation_p_p.h:110
QQuickSmoothedAnimationPrivate::QQuickSmoothedAnimationPrivate
QQuickSmoothedAnimationPrivate()
Definition
qquicksmoothedanimation.cpp:338
QQuickSmoothedAnimationPrivate::anim
QSmoothedAnimation * anim
Definition
qquicksmoothedanimation_p_p.h:109
QQuickSmoothedAnimationPrivate::~QQuickSmoothedAnimationPrivate
~QQuickSmoothedAnimationPrivate()
Definition
qquicksmoothedanimation.cpp:343
QQuickSmoothedAnimationPrivate::updateRunningAnimations
void updateRunningAnimations()
Definition
qquicksmoothedanimation.cpp:352
QQuickSmoothedAnimation
Definition
qquicksmoothedanimation_p.h:28
QQuickSmoothedAnimation::ReversingMode
ReversingMode
Definition
qquicksmoothedanimation_p.h:39
QSmoothedAnimationTimer
Definition
qquicksmoothedanimation_p_p.h:29
QSmoothedAnimationTimer::stopAnimation
void stopAnimation()
Definition
qquicksmoothedanimation.cpp:35
QSmoothedAnimationTimer::~QSmoothedAnimationTimer
~QSmoothedAnimationTimer()
Definition
qquicksmoothedanimation.cpp:31
QSmoothedAnimation
Definition
qquicksmoothedanimation_p_p.h:42
QSmoothedAnimation::initialVelocity
qreal initialVelocity
Definition
qquicksmoothedanimation_p_p.h:55
QSmoothedAnimation::target
QQmlProperty target
Definition
qquicksmoothedanimation_p_p.h:58
QSmoothedAnimation::trackVelocity
qreal trackVelocity
Definition
qquicksmoothedanimation_p_p.h:56
QSmoothedAnimation::clearTemplate
void clearTemplate()
Definition
qquicksmoothedanimation_p_p.h:65
QSmoothedAnimation::to
qreal to
Definition
qquicksmoothedanimation_p_p.h:48
QSmoothedAnimation::reversingMode
QQuickSmoothedAnimation::ReversingMode reversingMode
Definition
qquicksmoothedanimation_p_p.h:53
QSmoothedAnimation::velocity
qreal velocity
Definition
qquicksmoothedanimation_p_p.h:49
QSmoothedAnimation::userDuration
int userDuration
Definition
qquicksmoothedanimation_p_p.h:50
QSmoothedAnimation::maximumEasingTime
int maximumEasingTime
Definition
qquicksmoothedanimation_p_p.h:52
QTimer
\inmodule QtCore
Definition
qtimer.h:20
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
a
GLboolean GLboolean GLboolean GLboolean a
[7]
Definition
qopengles2ext.h:337
s
GLdouble s
[6]
Definition
qopenglext.h:235
invert
GLboolean invert
Definition
qopenglext.h:226
qquickanimation_p.h
qquickanimation_p_p.h
qquicksmoothedanimation_p.h
sp
#define sp
Definition
qt_mips_asm_dsp_p.h:52
Q_AUTOTEST_EXPORT
#define Q_AUTOTEST_EXPORT
Definition
qtconfigmacros.h:55
init
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
Definition
qtextboundaryfinder.cpp:10
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:117
Q_SLOTS
#define Q_SLOTS
Definition
qtmetamacros.h:44
qreal
double qreal
Definition
qtypes.h:92
d
double d
Definition
src_corelib_text_qlocale.cpp:9
animation
QPropertyAnimation animation
[0]
Definition
src_corelib_tools_qeasingcurve.cpp:17
qtdeclarative
src
quick
util
qquicksmoothedanimation_p_p.h
Generated by
1.9.7