use the easing curve in all of our animations

svn path=/trunk/KDE/kdelibs/; revision=1112612
This commit is contained in:
Aaron J. Seigo 2010-04-08 17:07:33 +00:00
parent 2ab49f0057
commit 892d8ae1c0
21 changed files with 134 additions and 57 deletions

View File

@ -50,6 +50,7 @@ set(plasma_LIB_SRCS
abstracttoolbox.cpp abstracttoolbox.cpp
animator.cpp animator.cpp
animations/animation.cpp animations/animation.cpp
animations/easinganimation.cpp
animations/fade.cpp animations/fade.cpp
animations/grow.cpp animations/grow.cpp
animations/slide.cpp animations/slide.cpp

View File

@ -0,0 +1,39 @@
/*
* Copyright 2010 Aaron Seigo <aseigo@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "easinganimation_p.h"
#include <kdebug.h>
namespace Plasma
{
EasingAnimation::EasingAnimation(QObject *parent)
: Animation(parent)
{
}
void EasingAnimation::updateCurrentTime(int currentTime)
{
updateEffectiveTime(easingCurve().valueForProgress(currentTime / qreal(qMax(1, duration()))) * duration());
}
} // namespace Plasma
#include "easinganimation_p.moc"

View File

@ -0,0 +1,46 @@
/*
* Copyright 2010 Aaron Seigo <aseigo@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef PLASMA_EASINGANIMATION_H
#define PLASMA_EASINGANIMATION_H
#include "animation.h"
namespace Plasma
{
class EasingAnimation : public Animation
{
Q_OBJECT
public:
explicit EasingAnimation(QObject *parent = 0);
protected:
virtual void updateEffectiveTime(int currentTime) = 0;
private:
void updateCurrentTime(int currentTime);
};
} // namespace Plasma
#endif // PLASMA_EASINGANIMATION_H

View File

@ -27,7 +27,7 @@ namespace Plasma
{ {
FadeAnimation::FadeAnimation(QObject *parent) FadeAnimation::FadeAnimation(QObject *parent)
: Animation(parent), : EasingAnimation(parent),
m_startOpacity(0), m_startOpacity(0),
m_targetOpacity(1) m_targetOpacity(1)
{ {
@ -71,7 +71,7 @@ void FadeAnimation::updateState(QAbstractAnimation::State newState, QAbstractAni
} }
} }
void FadeAnimation::updateCurrentTime(int currentTime) void FadeAnimation::updateEffectiveTime(int currentTime)
{ {
QGraphicsWidget *w = targetWidget(); QGraphicsWidget *w = targetWidget();
if (w) { if (w) {
@ -80,8 +80,6 @@ void FadeAnimation::updateCurrentTime(int currentTime)
Animation::easingCurve().valueForProgress(delta); Animation::easingCurve().valueForProgress(delta);
w->setOpacity(m_startOpacity - delta); w->setOpacity(m_startOpacity - delta);
} }
Animation::updateCurrentTime(currentTime);
} }
} //namespace Plasma } //namespace Plasma

View File

@ -24,7 +24,7 @@
#ifndef PLASMA_ANIMATIONS_FADE_P_H #ifndef PLASMA_ANIMATIONS_FADE_P_H
#define PLASMA_ANIMATIONS_FADE_P_H #define PLASMA_ANIMATIONS_FADE_P_H
#include <plasma/animations/animation.h> #include <plasma/animations/easinganimation_p.h>
#include <plasma/plasma_export.h> #include <plasma/plasma_export.h>
namespace Plasma namespace Plasma
@ -38,7 +38,7 @@ namespace Plasma
* value to a target value. The range is 0 (full translucent) to 1 (full * value to a target value. The range is 0 (full translucent) to 1 (full
* opaque). * opaque).
*/ */
class FadeAnimation : public Animation class FadeAnimation : public EasingAnimation
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(qreal startOpacity READ startOpacity WRITE setStartOpacity) Q_PROPERTY(qreal startOpacity READ startOpacity WRITE setStartOpacity)
@ -85,7 +85,7 @@ public:
protected: protected:
void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
void updateCurrentTime(int currentTime); void updateEffectiveTime(int currentTime);
private: private:
/** Initial opacity */ /** Initial opacity */

View File

@ -27,7 +27,7 @@ namespace Plasma
{ {
GeometryAnimation::GeometryAnimation(QObject *parent) GeometryAnimation::GeometryAnimation(QObject *parent)
: Animation(parent), : EasingAnimation(parent),
m_startGeometry(-1, -1, -1, -1) m_startGeometry(-1, -1, -1, -1)
{ {
} }
@ -74,7 +74,7 @@ void GeometryAnimation::updateState(QAbstractAnimation::State newState, QAbstrac
} }
} }
void GeometryAnimation::updateCurrentTime(int currentTime) void GeometryAnimation::updateEffectiveTime(int currentTime)
{ {
QGraphicsWidget *w = targetWidget(); QGraphicsWidget *w = targetWidget();
if (w) { if (w) {
@ -89,8 +89,6 @@ void GeometryAnimation::updateCurrentTime(int currentTime)
w->setGeometry(newGeo); w->setGeometry(newGeo);
} }
Animation::updateCurrentTime(currentTime);
} }
} //namespace Plasma } //namespace Plasma

View File

@ -24,7 +24,7 @@
#ifndef PLASMA_ANIMATIONS_GEOMETRY_P_H #ifndef PLASMA_ANIMATIONS_GEOMETRY_P_H
#define PLASMA_ANIMATIONS_GEOMETRY_P_H #define PLASMA_ANIMATIONS_GEOMETRY_P_H
#include <plasma/animations/animation.h> #include <plasma/animations/easinganimation_p.h>
#include <plasma/plasma_export.h> #include <plasma/plasma_export.h>
namespace Plasma namespace Plasma
@ -36,7 +36,7 @@ namespace Plasma
* Use this class when you want to change the geometry of an QGraphicsWidget * Use this class when you want to change the geometry of an QGraphicsWidget
* in an animated way (you should at least set the target geometry). * in an animated way (you should at least set the target geometry).
*/ */
class GeometryAnimation : public Animation class GeometryAnimation : public EasingAnimation
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QRectF startGeometry READ startGeometry WRITE setStartGeometry) Q_PROPERTY(QRectF startGeometry READ startGeometry WRITE setStartGeometry)
@ -83,7 +83,7 @@ public:
protected: protected:
void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
void updateCurrentTime(int currentTime); void updateEffectiveTime(int currentTime);
private: private:
/** Initial geometry */ /** Initial geometry */

View File

@ -26,7 +26,7 @@ namespace Plasma
{ {
GrowAnimation::GrowAnimation(QObject *parent, qreal factor) GrowAnimation::GrowAnimation(QObject *parent, qreal factor)
: Animation(parent), m_animFactor(factor) : EasingAnimation(parent), m_animFactor(factor)
{ {
} }
@ -40,7 +40,7 @@ qreal GrowAnimation::factor() const
return m_animFactor; return m_animFactor;
} }
void GrowAnimation::updateCurrentTime(int currentTime) void GrowAnimation::updateEffectiveTime(int currentTime)
{ {
QGraphicsWidget *w = targetWidget(); QGraphicsWidget *w = targetWidget();
if (w && state() == QAbstractAnimation::Running) { if (w && state() == QAbstractAnimation::Running) {

View File

@ -24,7 +24,7 @@
#ifndef PLASMA_ANIMATIONS_GROW_P_H #ifndef PLASMA_ANIMATIONS_GROW_P_H
#define PLASMA_ANIMATIONS_GROW_P_H #define PLASMA_ANIMATIONS_GROW_P_H
#include <plasma/animations/animation.h> #include <plasma/animations/easinganimation_p.h>
#include <plasma/plasma_export.h> #include <plasma/plasma_export.h>
namespace Plasma namespace Plasma
@ -39,7 +39,7 @@ namespace Plasma
* (it does the animation by changing the objects geometry). Also see * (it does the animation by changing the objects geometry). Also see
* \ref ZoomAnimation. * \ref ZoomAnimation.
*/ */
class GrowAnimation : public Animation class GrowAnimation : public EasingAnimation
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(qreal factor READ factor WRITE setFactor) Q_PROPERTY(qreal factor READ factor WRITE setFactor)
@ -72,7 +72,7 @@ public:
void setFactor(const qreal factor); void setFactor(const qreal factor);
protected: protected:
void updateCurrentTime(int currentTime); void updateEffectiveTime(int currentTime);
void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
private: private:

View File

@ -31,7 +31,7 @@ namespace Plasma
{ {
PixmapTransition::PixmapTransition(QObject *parent) PixmapTransition::PixmapTransition(QObject *parent)
: Animation(parent) : EasingAnimation(parent)
{ {
} }
@ -48,7 +48,7 @@ void PixmapTransition::setStartPixmap(const QPixmap &pixmap)
m_startPixmap = pixmap; m_startPixmap = pixmap;
//this will center the pixmaps if needed //this will center the pixmaps if needed
updateCurrentTime(0); updateEffectiveTime(0);
} }
QPixmap PixmapTransition::startPixmap() const QPixmap PixmapTransition::startPixmap() const
@ -64,7 +64,7 @@ void PixmapTransition::setTargetPixmap(const QPixmap &pixmap)
m_targetPixmap = pixmap; m_targetPixmap = pixmap;
updateCurrentTime(0); updateEffectiveTime(0);
} }
QPixmap PixmapTransition::targetPixmap() const QPixmap PixmapTransition::targetPixmap() const
@ -128,7 +128,7 @@ void PixmapTransition::updateState(QAbstractAnimation::State newState, QAbstract
w->update(); w->update();
} }
void PixmapTransition::updateCurrentTime(int currentTime) void PixmapTransition::updateEffectiveTime(int currentTime)
{ {
QGraphicsWidget *w = targetWidget(); QGraphicsWidget *w = targetWidget();
if (w) { if (w) {
@ -161,7 +161,6 @@ void PixmapTransition::updateCurrentTime(int currentTime)
} }
} }
Animation::updateCurrentTime(currentTime);
if (w) { if (w) {
w->update(); w->update();
} }

View File

@ -25,7 +25,7 @@
#ifndef PLASMA_ANIMATIONS_PIXMAPTRANSITION_P_H #ifndef PLASMA_ANIMATIONS_PIXMAPTRANSITION_P_H
#define PLASMA_ANIMATIONS_PIXMAPTRANSITION_P_H #define PLASMA_ANIMATIONS_PIXMAPTRANSITION_P_H
#include <plasma/animations/animation.h> #include <plasma/animations/easinganimation_p.h>
#include <plasma/plasma_export.h> #include <plasma/plasma_export.h>
namespace Plasma namespace Plasma
@ -37,7 +37,7 @@ namespace Plasma
* *
* Effect that paints a transition between two pixmaps * Effect that paints a transition between two pixmaps
*/ */
class PixmapTransition : public Animation class PixmapTransition : public EasingAnimation
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QPixmap startPixmap READ startPixmap WRITE setStartPixmap) Q_PROPERTY(QPixmap startPixmap READ startPixmap WRITE setStartPixmap)
@ -76,7 +76,7 @@ public:
protected: protected:
void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
void updateCurrentTime(int currentTime); void updateEffectiveTime(int currentTime);
private: private:
QPixmap m_startPixmap; QPixmap m_startPixmap;

View File

@ -31,7 +31,7 @@ namespace Plasma
{ {
PulseAnimation::PulseAnimation(QObject *parent) PulseAnimation::PulseAnimation(QObject *parent)
: Animation(parent), : EasingAnimation(parent),
m_zvalue(0), m_zvalue(0),
m_scale(0), m_scale(0),
m_opacity(0), m_opacity(0),
@ -117,7 +117,7 @@ void PulseAnimation::updateState(QAbstractAnimation::State newState, QAbstractAn
} }
} }
void PulseAnimation::updateCurrentTime(int currentTime) void PulseAnimation::updateEffectiveTime(int currentTime)
{ {
if (m_under.data()) { if (m_under.data()) {
qreal delta = Animation::easingCurve().valueForProgress( currentTime / qreal(duration())); qreal delta = Animation::easingCurve().valueForProgress( currentTime / qreal(duration()));

View File

@ -23,7 +23,7 @@
#ifndef PLASMA_ANIMATIONS_PULSER_P_H #ifndef PLASMA_ANIMATIONS_PULSER_P_H
#define PLASMA_ANIMATIONS_PULSER_P_H #define PLASMA_ANIMATIONS_PULSER_P_H
#include <plasma/animations/animation.h> #include <plasma/animations/easinganimation_p.h>
#include <plasma/plasma_export.h> #include <plasma/plasma_export.h>
namespace Plasma namespace Plasma
@ -38,7 +38,7 @@ class ShadowFake;
* Effect that pulses a shadow copy of any QGraphicsWidget making * Effect that pulses a shadow copy of any QGraphicsWidget making
* it more translucent and bigger along the time until it vanishes. * it more translucent and bigger along the time until it vanishes.
*/ */
class PulseAnimation : public Animation class PulseAnimation : public EasingAnimation
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(qreal targetScale READ targetScale WRITE setTargetScale) Q_PROPERTY(qreal targetScale READ targetScale WRITE setTargetScale)
@ -75,7 +75,7 @@ public:
protected: protected:
void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
void updateCurrentTime(int currentTime); void updateEffectiveTime(int currentTime);
void setCopy(); void setCopy();
private: private:

View File

@ -20,6 +20,7 @@
#include <QGraphicsRotation> #include <QGraphicsRotation>
#include <QEasingCurve> #include <QEasingCurve>
#include <QVector3D>
#include <kdebug.h> #include <kdebug.h>
@ -27,7 +28,7 @@ namespace Plasma
{ {
RotationAnimation::RotationAnimation(QObject *parent, qint8 reference, Qt::Axis axis, qreal angle) RotationAnimation::RotationAnimation(QObject *parent, qint8 reference, Qt::Axis axis, qreal angle)
: Animation(parent) : EasingAnimation(parent)
{ {
setAngle(angle); setAngle(angle);
setAxis(axis); setAxis(axis);
@ -158,7 +159,7 @@ void RotationAnimation::updateState(QAbstractAnimation::State newState, QAbstrac
} }
} }
void RotationAnimation::updateCurrentTime(int currentTime) void RotationAnimation::updateEffectiveTime(int currentTime)
{ {
QGraphicsWidget *w = targetWidget(); QGraphicsWidget *w = targetWidget();
if (w) { if (w) {

View File

@ -23,10 +23,7 @@
#ifndef PLASMA_ROTATION_P_H #ifndef PLASMA_ROTATION_P_H
#define PLASMA_ROTATION_P_H #define PLASMA_ROTATION_P_H
#include <plasma/animations/animation.h> #include <plasma/animations/easinganimation_p.h>
#include <plasma/plasma_export.h>
#include <QVector3D>
class QGraphicsRotation; class QGraphicsRotation;
@ -39,7 +36,7 @@ namespace Plasma {
* axis can be defined using properties). See also * axis can be defined using properties). See also
* \ref StackedRotationAnimation. * \ref StackedRotationAnimation.
*/ */
class RotationAnimation : public Animation class RotationAnimation : public EasingAnimation
{ {
Q_OBJECT Q_OBJECT
@ -101,7 +98,7 @@ public:
protected: protected:
void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
void updateCurrentTime(int currentTime); void updateEffectiveTime(int currentTime);
private: private:
/** Rotation transform object */ /** Rotation transform object */

View File

@ -30,7 +30,7 @@ namespace Plasma
const int RotationStackedAnimation::s_sideAngle = 90; const int RotationStackedAnimation::s_sideAngle = 90;
RotationStackedAnimation::RotationStackedAnimation(QObject *parent) RotationStackedAnimation::RotationStackedAnimation(QObject *parent)
: Animation(parent) : EasingAnimation(parent)
{ {
m_backRotation = new QGraphicsRotation(this); m_backRotation = new QGraphicsRotation(this);
m_frontRotation = new QGraphicsRotation(this); m_frontRotation = new QGraphicsRotation(this);
@ -141,7 +141,7 @@ void RotationStackedAnimation::updateState(QAbstractAnimation::State newState,
} }
} }
void RotationStackedAnimation::updateCurrentTime(int currentTime) void RotationStackedAnimation::updateEffectiveTime(int currentTime)
{ {
if (!targetWidget() || !backWidget()) { if (!targetWidget() || !backWidget()) {
return; return;

View File

@ -22,7 +22,7 @@
#ifndef PLASMA_ROTATIONSTACKED_P_H #ifndef PLASMA_ROTATIONSTACKED_P_H
#define PLASMA_ROTATIONSTACKED_P_H #define PLASMA_ROTATIONSTACKED_P_H
#include <plasma/animations/animation.h> #include <plasma/animations/easinganimation_p.h>
#include <plasma/plasma_export.h> #include <plasma/plasma_export.h>
#include <QGraphicsLayoutItem> #include <QGraphicsLayoutItem>
@ -41,7 +41,7 @@ namespace Plasma {
* Use this class when you want to rotate a widget along an axis (e.g. Y) * Use this class when you want to rotate a widget along an axis (e.g. Y)
* and display a 'hidden' widget behind it. See also \ref RotationAnimation. * and display a 'hidden' widget behind it. See also \ref RotationAnimation.
*/ */
class RotationStackedAnimation : public Animation class RotationStackedAnimation : public EasingAnimation
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(MovementDirection movementDirection READ movementDirection WRITE setMovementDirection) Q_PROPERTY(MovementDirection movementDirection READ movementDirection WRITE setMovementDirection)
@ -97,7 +97,7 @@ public:
protected: protected:
void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
void updateCurrentTime(int currentTime); void updateEffectiveTime(int currentTime);
private: private:
/** /**

View File

@ -51,7 +51,7 @@ SlideAnimation::~SlideAnimation()
SlideAnimation::SlideAnimation(QObject *parent, SlideAnimation::SlideAnimation(QObject *parent,
MovementDirection direction, MovementDirection direction,
qreal distance) : Animation(parent) qreal distance) : EasingAnimation(parent)
{ {
setMovementDirection(direction); setMovementDirection(direction);
setDistance(distance); setDistance(distance);
@ -68,7 +68,7 @@ Animation::MovementDirection SlideAnimation::movementDirection() const
return m_animDirection; return m_animDirection;
} }
void SlideAnimation::updateCurrentTime(int currentTime) void SlideAnimation::updateEffectiveTime(int currentTime)
{ {
QGraphicsWidget *w = targetWidget(); QGraphicsWidget *w = targetWidget();
if (w && state() == QAbstractAnimation::Running) { if (w && state() == QAbstractAnimation::Running) {

View File

@ -24,7 +24,7 @@
#ifndef PLASMA_ANIMATIONS_SLIDE_P_H #ifndef PLASMA_ANIMATIONS_SLIDE_P_H
#define PLASMA_ANIMATIONS_SLIDE_P_H #define PLASMA_ANIMATIONS_SLIDE_P_H
#include "plasma/animations/animation.h" #include "plasma/animations/easinganimation_p.h"
#include "plasma/plasma_export.h" #include "plasma/plasma_export.h"
#include "plasma/plasma.h" #include "plasma/plasma.h"
@ -39,7 +39,7 @@ class SlideAnimationPrivate;
* Effect that moves the object a specific distance in a given direction. The * Effect that moves the object a specific distance in a given direction. The
* object is optionally made invisible at the beginning or at the end. * object is optionally made invisible at the beginning or at the end.
*/ */
class SlideAnimation : public Animation class SlideAnimation : public EasingAnimation
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(qreal distance READ distance WRITE setDistance) Q_PROPERTY(qreal distance READ distance WRITE setDistance)
@ -76,7 +76,7 @@ public:
Animation::MovementDirection movementDirection() const; Animation::MovementDirection movementDirection() const;
protected: protected:
void updateCurrentTime(int currentTime); void updateEffectiveTime(int currentTime);
void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
private: private:

View File

@ -25,7 +25,7 @@ namespace Plasma
{ {
ZoomAnimation::ZoomAnimation(QObject *parent) ZoomAnimation::ZoomAnimation(QObject *parent)
: Animation(parent), : EasingAnimation(parent),
m_zoom(0) m_zoom(0)
{ {
} }
@ -60,7 +60,7 @@ void ZoomAnimation::updateState(QAbstractAnimation::State newState, QAbstractAni
} }
} }
void ZoomAnimation::updateCurrentTime(int currentTime) void ZoomAnimation::updateEffectiveTime(int currentTime)
{ {
QGraphicsWidget *w = targetWidget(); QGraphicsWidget *w = targetWidget();
if (w) { if (w) {
@ -73,8 +73,6 @@ void ZoomAnimation::updateCurrentTime(int currentTime)
w->setScale(delta); w->setScale(delta);
} }
} }
Animation::updateCurrentTime(currentTime);
} }
} //namespace Plasma } //namespace Plasma

View File

@ -24,7 +24,7 @@
#ifndef PLASMA_ANIMATIONS_ZOOM_P_H #ifndef PLASMA_ANIMATIONS_ZOOM_P_H
#define PLASMA_ANIMATIONS_ZOOM_P_H #define PLASMA_ANIMATIONS_ZOOM_P_H
#include <plasma/animations/animation.h> #include <plasma/animations/easinganimation_p.h>
#include <plasma/plasma_export.h> #include <plasma/plasma_export.h>
namespace Plasma namespace Plasma
@ -35,7 +35,7 @@ namespace Plasma
* @short Zoom Animation * @short Zoom Animation
* *
*/ */
class ZoomAnimation : public Animation class ZoomAnimation : public EasingAnimation
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(qreal zoom READ zoom WRITE setZoom) Q_PROPERTY(qreal zoom READ zoom WRITE setZoom)
@ -49,7 +49,7 @@ public:
protected: protected:
void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
void updateCurrentTime(int currentTime); void updateEffectiveTime(int currentTime);
private: private:
qreal m_zoom; qreal m_zoom;