Moved sideAngle to be a static const member

svn path=/trunk/KDE/kdelibs/; revision=1083081
This commit is contained in:
Bruno de Oliveira Abinader 2010-01-31 15:54:14 +00:00
parent cc2a593588
commit 6086b03de5
2 changed files with 6 additions and 4 deletions

View File

@ -24,11 +24,11 @@
#include "stackedlayout.h"
#include "plasma.h"
const int sideAngle = 90;
namespace Plasma
{
const int RotationStackedAnimation::s_sideAngle = 90;
RotationStackedAnimation::RotationStackedAnimation(QObject *parent)
: Animation(parent)
{
@ -183,13 +183,13 @@ void RotationStackedAnimation::updateCurrentTime(int currentTime)
if (currentTime <= duration()/2) {
layout->setCurrentWidgetIndex(0);
delta = easingCurve().valueForProgress((currentTime*2) / qreal(duration()));
delta *= sideAngle;
delta *= s_sideAngle;
m_frontRotation->setAngle(delta);
} else {
layout->setCurrentWidgetIndex(1);
delta = 1 - easingCurve().valueForProgress(((currentTime*2) - duration()) / qreal(duration()));
delta = -delta;
delta *= sideAngle;
delta *= s_sideAngle;
m_backRotation->setAngle(delta);
}
}

View File

@ -118,6 +118,8 @@ private:
QGraphicsRotation *m_backRotation;
/** Front Widget Rotation transform object */
QGraphicsRotation *m_frontRotation;
static const int s_sideAngle;
};
} // Plasma