From a1d93d4118f7fa617973b920b4f84f75a51077d0 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 16 Oct 2009 21:27:35 +0000 Subject: [PATCH] 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 --- animations/abstractanimation.h | 2 +- animations/animation.cpp | 4 ++-- animations/animation.h | 2 +- animations/animationgroup.cpp | 6 +++--- animations/animationgroup.h | 2 +- animations/pulser.h | 5 +---- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/animations/abstractanimation.h b/animations/abstractanimation.h index 2eac4ae96..09f547c58 100644 --- a/animations/abstractanimation.h +++ b/animations/abstractanimation.h @@ -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: diff --git a/animations/animation.cpp b/animations/animation.cpp index b3e580c83..32573d31c 100644 --- a/animations/animation.cpp +++ b/animations/animation.cpp @@ -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()) { diff --git a/animations/animation.h b/animations/animation.h index b80a08249..3fe67da77 100644 --- a/animations/animation.h +++ b/animations/animation.h @@ -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: diff --git a/animations/animationgroup.cpp b/animations/animationgroup.cpp index a180fb46f..b32491e27 100644 --- a/animations/animationgroup.cpp +++ b/animations/animationgroup.cpp @@ -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 it(anims); while (it.hasNext()) { //add with group as owner - g->addAnimation(it.next()->asQAnimation(g)); + g->addAnimation(it.next()->toQAbstractAnimation(g)); } return g; diff --git a/animations/animationgroup.h b/animations/animationgroup.h index f4b704a67..f5247364f 100644 --- a/animations/animationgroup.h +++ b/animations/animationgroup.h @@ -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: diff --git a/animations/pulser.h b/animations/pulser.h index d15a56743..6b35ccafc 100644 --- a/animations/pulser.h +++ b/animations/pulser.h @@ -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();