framesPerSecond is more obvious
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=679782
This commit is contained in:
parent
a45a0c2e5f
commit
8c8012c1ce
@ -33,13 +33,13 @@ Animator::~Animator()
|
||||
{
|
||||
}
|
||||
|
||||
int Animator::frameCount(Plasma::Phase::Animation animation)
|
||||
int Animator::framesPerSecond(Plasma::Phase::Animation animation)
|
||||
{
|
||||
Q_UNUSED(animation)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Animator::elementFrameCount(Plasma::Phase::ElementAnimation animation)
|
||||
int Animator::framesPerSecond(Plasma::Phase::ElementAnimation animation)
|
||||
{
|
||||
Q_UNUSED(animation)
|
||||
return 0;
|
||||
|
@ -41,8 +41,8 @@ public:
|
||||
explicit Animator(QObject *parent = 0, const QStringList& list = QStringList());
|
||||
~Animator();
|
||||
|
||||
virtual int frameCount(Plasma::Phase::Animation);
|
||||
virtual int elementFrameCount(Plasma::Phase::ElementAnimation);
|
||||
virtual int framesPerSecond(Plasma::Phase::Animation);
|
||||
virtual int framesPerSecond(Plasma::Phase::ElementAnimation);
|
||||
|
||||
virtual QPixmap elementAppear(qreal frame, const QPixmap& pixmap);
|
||||
virtual QPixmap elementDisappear(qreal frame, const QPixmap& pixmap);
|
||||
|
@ -133,7 +133,7 @@ void Phase::animate(QGraphicsItem* item, Animation animation)
|
||||
|
||||
//TODO: allow the animator to define this?
|
||||
QTimeLine::CurveShape curveShape = QTimeLine::EaseInOutCurve;
|
||||
int frames = d->animator->frameCount(animation);
|
||||
int frames = d->animator->framesPerSecond(animation);
|
||||
|
||||
if (frames < 1) {
|
||||
return;
|
||||
@ -260,7 +260,7 @@ Phase::AnimId Phase::startElementAnimation(QGraphicsItem *item, ElementAnimation
|
||||
state.item = item;
|
||||
state.animation = animation;
|
||||
//TODO: variance in times based on the value of animation
|
||||
state.frames = d->animator->elementFrameCount(animation) / 3;
|
||||
state.frames = d->animator->framesPerSecond(animation) / 3;
|
||||
state.currentFrame = 0;
|
||||
state.id = ++d->animId;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user