FramesPerSecond -> FPS.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800816
This commit is contained in:
parent
ced9f04d55
commit
84aa9fb8b0
@ -36,19 +36,19 @@ Animator::~Animator()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int Animator::animationFramesPerSecond(Plasma::Phase::Animation animation) const
|
int Animator::animationFPS(Plasma::Phase::Animation animation) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(animation)
|
Q_UNUSED(animation)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Animator::movementAnimationFramesPerSecond(Plasma::Phase::Movement movement) const
|
int Animator::movementAnimationFPS(Plasma::Phase::Movement movement) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(movement)
|
Q_UNUSED(movement)
|
||||||
return 20;
|
return 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Animator::elementAnimationFramesPerSecond(Plasma::Phase::ElementAnimation animation) const
|
int Animator::elementAnimationFPS(Plasma::Phase::ElementAnimation animation) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(animation)
|
Q_UNUSED(animation)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -44,9 +44,9 @@ public:
|
|||||||
~Animator();
|
~Animator();
|
||||||
|
|
||||||
// Parameter definitions
|
// Parameter definitions
|
||||||
virtual int animationFramesPerSecond(Plasma::Phase::Animation) const;
|
virtual int animationFPS(Plasma::Phase::Animation) const;
|
||||||
virtual int movementAnimationFramesPerSecond(Plasma::Phase::Movement) const;
|
virtual int movementAnimationFPS(Plasma::Phase::Movement) const;
|
||||||
virtual int elementAnimationFramesPerSecond(Plasma::Phase::ElementAnimation) const;
|
virtual int elementAnimationFPS(Plasma::Phase::ElementAnimation) const;
|
||||||
virtual int animationDuration(Plasma::Phase::Animation) const;
|
virtual int animationDuration(Plasma::Phase::Animation) const;
|
||||||
virtual int movementAnimationDuration(Plasma::Phase::Movement) const;
|
virtual int movementAnimationDuration(Plasma::Phase::Movement) const;
|
||||||
virtual int elementAnimationDuration(Plasma::Phase::ElementAnimation) const;
|
virtual int elementAnimationDuration(Plasma::Phase::ElementAnimation) const;
|
||||||
|
@ -263,7 +263,7 @@ void Phase::animateItem(QGraphicsItem* item, Animation animation)
|
|||||||
d->animatedItems.erase(it);
|
d->animatedItems.erase(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
int frames = d->animator->animationFramesPerSecond(animation);
|
int frames = d->animator->animationFPS(animation);
|
||||||
|
|
||||||
if (frames < 1) {
|
if (frames < 1) {
|
||||||
// evidently this animator doesn't have an implementation
|
// evidently this animator doesn't have an implementation
|
||||||
@ -307,7 +307,7 @@ void Phase::moveItem(QGraphicsItem* item, Movement movement, const QPoint &desti
|
|||||||
d->movingItems.erase(it);
|
d->movingItems.erase(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
int frames = d->animator->movementAnimationFramesPerSecond(movement);
|
int frames = d->animator->movementAnimationFPS(movement);
|
||||||
if (frames <= 1) {
|
if (frames <= 1) {
|
||||||
// evidently this animator doesn't have an implementation
|
// evidently this animator doesn't have an implementation
|
||||||
// for this Animation
|
// for this Animation
|
||||||
@ -397,7 +397,7 @@ int Phase::animateElement(QGraphicsItem *item, ElementAnimation animation)
|
|||||||
state->curve = d->animator->elementAnimationCurve(animation);
|
state->curve = d->animator->elementAnimationCurve(animation);
|
||||||
state->animation = animation;
|
state->animation = animation;
|
||||||
//TODO: variance in times based on the value of animation
|
//TODO: variance in times based on the value of animation
|
||||||
state->frames = d->animator->elementAnimationFramesPerSecond(animation) / 5;
|
state->frames = d->animator->elementAnimationFPS(animation) / 5;
|
||||||
state->currentFrame = 0;
|
state->currentFrame = 0;
|
||||||
state->interval = d->animator->elementAnimationDuration(animation) / state->frames;
|
state->interval = d->animator->elementAnimationDuration(animation) / state->frames;
|
||||||
state->interval = (state->interval / MIN_TICK_RATE) * MIN_TICK_RATE;
|
state->interval = (state->interval / MIN_TICK_RATE) * MIN_TICK_RATE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user