Moved sideAngle to be a static const member
svn path=/trunk/KDE/kdelibs/; revision=1083081
This commit is contained in:
parent
cc2a593588
commit
6086b03de5
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -118,6 +118,8 @@ private:
|
||||
QGraphicsRotation *m_backRotation;
|
||||
/** Front Widget Rotation transform object */
|
||||
QGraphicsRotation *m_frontRotation;
|
||||
|
||||
static const int s_sideAngle;
|
||||
};
|
||||
} // Plasma
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user