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
|
} //namespace Plasma
|
||||||
|
@ -41,13 +41,9 @@ class PauseAnimation : public Animation
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
PauseAnimation(QObject *parent = 0);
|
PauseAnimation(QObject *parent = 0);
|
||||||
void setWidgetToAnimate(QGraphicsWidget *widget);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QAbstractAnimation* render(QObject* parent = 0);
|
void updateCurrentTime(int msecs);
|
||||||
|
|
||||||
private:
|
|
||||||
QWeakPointer<QPauseAnimation> animation;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user