well, that becomes rather simple, now doesn't it?
svn path=/trunk/KDE/kdelibs/; revision=1058582
This commit is contained in:
parent
68e65235bc
commit
8f4880f66b
@ -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
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user