diff --git a/animations/animation.cpp b/animations/animation.cpp index d3af59030..f2a071cad 100644 --- a/animations/animation.cpp +++ b/animations/animation.cpp @@ -33,9 +33,7 @@ namespace Plasma AnimationPrivate::AnimationPrivate() - : dirtyFlag(false), - easingCurve(QEasingCurve::Linear), - forwards(QAbstractAnimation::Forward), + : easingCurve(QEasingCurve::Linear), duration(250) { } @@ -81,41 +79,9 @@ QEasingCurve::Type Animation::easingCurveType() const return d->easingCurve; } -QAbstractAnimation::Direction Animation::direction() const -{ - return d->forwards; -} - -void Animation::updateDirection(QAbstractAnimation::Direction direction) -{ - d->forwards = direction; -} - void Animation::updateCurrentTime(int currentTime) { - /** - * XXX: not sure if is a bug in my code or Qt, but 'start()' is not being - * called when the animation is inside of an animatin group. - * The solution for while is to explicitly call it in 'updateCurrentTime' - * and use this flag for control. - */ - if (!d->dirtyFlag) { - d->dirtyFlag = true; - start(); - } - - if (d->forwards == QAbstractAnimation::Forward) { - if (currentTime == duration()) { - d->dirtyFlag = false; - emit finished(); - } - } else if (d->forwards == QAbstractAnimation::Backward) { - if (currentTime == 0) { - d->dirtyFlag = false; - emit finished(); - } - } - + Q_UNUSED(currentTime) } } //namespace Plasma diff --git a/animations/animation.h b/animations/animation.h index 82e643c0b..b9fa75f60 100644 --- a/animations/animation.h +++ b/animations/animation.h @@ -50,9 +50,6 @@ class PLASMA_EXPORT Animation : public QAbstractAnimation Q_PROPERTY(QGraphicsWidget *widgetToAnimate READ widgetToAnimate WRITE setWidgetToAnimate) public: - - QAbstractAnimation::Direction direction() const; - /** * Get the animation duration. * @return duration in ms. @@ -97,16 +94,6 @@ public: */ bool isVisible() const; -public Q_SLOTS: - /** - * Each individual class must override this function to place their main - * functionality. This function must take the values from the constructor, - * do the appropriate calculations, and return a corresponding - * QPropertyAnimation initialized with the given parent. - */ - virtual QAbstractAnimation* render(QObject* parent = 0) = 0; - - protected: /** @@ -115,8 +102,6 @@ protected: */ virtual void setDuration(int duration = 250); - void updateDirection(QAbstractAnimation::Direction direction); - void updateCurrentTime(int currentTime); private: