diff --git a/animations/abstractanimation.cpp b/animations/abstractanimation.cpp index 0658a2ece..f2f81c22a 100644 --- a/animations/abstractanimation.cpp +++ b/animations/abstractanimation.cpp @@ -22,24 +22,33 @@ namespace Plasma { -AbstractAnimation::AbstractAnimation() +class AnimationPrivate +{ +public: + /** + * Object the animation(s) should act upon. + */ + QGraphicsWidget* m_object; +}; + +AbstractAnimation::AbstractAnimation(): d(new AnimationPrivate) { } AbstractAnimation::~AbstractAnimation() { - + delete d; } void AbstractAnimation::setWidget(QGraphicsWidget* receiver) { - m_object = receiver; + d->m_object = receiver; } QGraphicsWidget* AbstractAnimation::getAnimatedObject() { - return m_object; + return d->m_object; } } //namespace Plasma diff --git a/animations/abstractanimation.h b/animations/abstractanimation.h index 09f547c58..38df47566 100644 --- a/animations/abstractanimation.h +++ b/animations/abstractanimation.h @@ -35,6 +35,8 @@ namespace Plasma { +class AnimationPrivate; + /** * Abstract base class for AnimationGroup and Animation. */ @@ -73,11 +75,7 @@ protected: private: - /** - * Object the animation(s) should act upon. - */ - QGraphicsWidget* m_object; - + AnimationPrivate *d; }; } //namespace Plasma