one more go at this method name; i don't think it will be in the public API anyways

svn path=/trunk/KDE/kdelibs/; revision=1036265
This commit is contained in:
Aaron J. Seigo 2009-10-16 21:27:35 +00:00
parent 84b8265322
commit a1d93d4118
6 changed files with 9 additions and 12 deletions

View File

@ -58,7 +58,7 @@ public:
* Take an AbstractAnimation and turn it into a
* QAbstractAnimation.
*/
virtual QAbstractAnimation* asQAnimation(QObject* parent) = 0;
virtual QAbstractAnimation* toQAbstractAnimation(QObject* parent) = 0;
public slots:

View File

@ -66,13 +66,13 @@ void Animation::setDuration(int duration)
void Animation::start()
{
QAbstractAnimation* anim = asQAnimation(d->m_parent);
QAbstractAnimation* anim = toQAbstractAnimation(d->m_parent);
if (anim) {
anim->start(QAbstractAnimation::DeleteWhenStopped);
}
}
QAbstractAnimation* Animation::asQAnimation(QObject* parent)
QAbstractAnimation* Animation::toQAbstractAnimation(QObject* parent)
{
//check if .setObject() was done
if (!getAnimatedObject()) {

View File

@ -60,7 +60,7 @@ public:
* NULL on error. This function just does some boilerplate checking and then
* calls render().
*/
QAbstractAnimation* asQAnimation(QObject* parent = 0);
QAbstractAnimation* toQAbstractAnimation(QObject* parent = 0);
protected:

View File

@ -64,7 +64,7 @@ void AnimationGroup::remove(int id)
void AnimationGroup::start()
{
QAbstractAnimation* anim = asQAnimation(m_parent);
QAbstractAnimation* anim = toQAbstractAnimation(m_parent);
if (anim){
/* FIXME: why to create and delete all the animations
* every single time it runs?
@ -73,7 +73,7 @@ void AnimationGroup::start()
}
}
QAnimationGroup* AnimationGroup::asQAnimation(QObject* parent)
QAnimationGroup* AnimationGroup::toQAbstractAnimation(QObject* parent)
{
//if supplied, use parent given in args.
QObject* correctParent;
@ -93,7 +93,7 @@ QAnimationGroup* AnimationGroup::asQAnimation(QObject* parent)
QListIterator<AbstractAnimation*> it(anims);
while (it.hasNext()) {
//add with group as owner
g->addAnimation(it.next()->asQAnimation(g));
g->addAnimation(it.next()->toQAbstractAnimation(g));
}
return g;

View File

@ -92,7 +92,7 @@ public:
* specifically, a QSerialAnimation or QParallelAnimation depending on
* the value of m_parallel at the time of invocation. Returns NULL on error.
*/
QAnimationGroup* asQAnimation(QObject* parent = 0);
QAnimationGroup* toQAbstractAnimation(QObject* parent = 0);
private:

View File

@ -31,14 +31,11 @@ class PLASMA_EXPORT PulseAnimation : public Animation
public:
PulseAnimation();
virtual ~PulseAnimation();
~PulseAnimation();
void updateGeometry(QRectF updated, qreal zCoordinate = 0, qreal scale = 1.5);
void setCopy(QGraphicsWidget *copy);
public Q_SLOTS:
void start();
void resetPulser();