From 196172bc191019c64148e86f27c01be43752051d Mon Sep 17 00:00:00 2001 From: Igor Trindade Oliveira Date: Mon, 11 Jan 2010 17:53:35 +0000 Subject: [PATCH] add custom animation in animator factory svn path=/trunk/KDE/kdelibs/; revision=1073140 --- animations/customanimation_p.h | 2 +- animator.cpp | 6 ++++++ animator.h | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/animations/customanimation_p.h b/animations/customanimation_p.h index 3ceb07c7f..f3292b967 100644 --- a/animations/customanimation_p.h +++ b/animations/customanimation_p.h @@ -38,7 +38,7 @@ class CustomAnimation : public Animation Q_PROPERTY(QVariant endValue READ endValue WRITE setEndValue) public: - CustomAnimation(QObject *parent); + CustomAnimation(QObject *parent = 0); QString callback() const; void setCallback(const QString &method); diff --git a/animator.cpp b/animator.cpp index f2f5ef608..ea0c38741 100644 --- a/animator.cpp +++ b/animator.cpp @@ -29,6 +29,8 @@ #include "animations/rotationstacked_p.h" #include "animations/geometry_p.h" #include "animations/zoom_p.h" +#include "animations/woobly_p.h" +#include "animations/customanimation_p.h" namespace Plasma { @@ -70,6 +72,10 @@ Plasma::Animation* Animator::create(Animator::Animation type, QObject *parent) result = new Plasma::ZoomAnimation(parent); break; + case CustomAnimation: + result = new Plasma::CustomAnimation(parent); + break; + default: kDebug() << "Unsupported animation type."; } diff --git a/animator.h b/animator.h index ca9fd922d..15ae0e8a3 100644 --- a/animator.h +++ b/animator.h @@ -65,7 +65,8 @@ public: RotationStackedAnimation, /*<< for flipping one object with another */ SlideAnimation, /*<< Move the position of animated object */ GeometryAnimation, /*<< Geometry animation*/ - ZoomAnimation /*<