well, that becomes rather simple, now doesn't it?

svn path=/trunk/KDE/kdelibs/; revision=1058582
This commit is contained in:
Aaron J. Seigo 2009-12-04 18:51:02 +00:00
parent 68e65235bc
commit 8f4880f66b
2 changed files with 2 additions and 23 deletions

View File

@ -29,25 +29,8 @@ PauseAnimation::PauseAnimation(QObject *parent)
{
}
void PauseAnimation::setWidgetToAnimate(QGraphicsWidget *widget)
void PauseAnimation::updateCurrentTime(int)
{
Animation::setWidgetToAnimate(widget);
if (animation.data()) {
delete animation.data();
animation.clear();
}
}
QAbstractAnimation* PauseAnimation::render(QObject* parent)
{
//Recreate only if needed
QPauseAnimation *anim = animation.data();
if (!anim) {
anim = new QPauseAnimation(duration(), parent);
animation = anim;
}
return anim;
}
} //namespace Plasma

View File

@ -41,13 +41,9 @@ class PauseAnimation : public Animation
public:
PauseAnimation(QObject *parent = 0);
void setWidgetToAnimate(QGraphicsWidget *widget);
protected:
virtual QAbstractAnimation* render(QObject* parent = 0);
private:
QWeakPointer<QPauseAnimation> animation;
void updateCurrentTime(int msecs);
};
}