From cd443a3ff904921ce1a23f6fb23df825f7b8e045 Mon Sep 17 00:00:00 2001 From: Igor Trindade Oliveira Date: Tue, 20 Oct 2009 15:53:53 +0000 Subject: [PATCH] add properties for animations svn path=/trunk/KDE/kdelibs/; revision=1038078 --- animations/abstractanimation.cpp | 30 ++++++++++++++++++++++++++ animations/abstractanimation.h | 36 ++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/animations/abstractanimation.cpp b/animations/abstractanimation.cpp index 87cb3905e..c9dbadfb9 100644 --- a/animations/abstractanimation.cpp +++ b/animations/abstractanimation.cpp @@ -56,6 +56,36 @@ QEasingCurve::Type AbstractAnimation::easingCurveType() const return d->easingCurve; } +void AbstractAnimation::setAnimationDirection(AnimationDirection animationDirection) +{ + d->animDirection = animationDirection; +} + +AnimationDirection AbstractAnimation::animationDirection() const +{ + return d->animDirection; +} + +void AbstractAnimation::setAnimationDistance(qreal animationDistance) +{ + d->animDistance = animationDistance; +} + +qreal AbstractAnimation::animationDistance() const +{ + return d->animDistance; +} + +void AbstractAnimation::setAnimationVisible(bool animationVisible) +{ + d->animVisible = animationVisible; +} + +bool AbstractAnimation::animationVisible() const +{ + return d->animVisible; +} + AnimationPrivate* AbstractAnimation::getAnimationPrivate() { return d; diff --git a/animations/abstractanimation.h b/animations/abstractanimation.h index 83f18d81d..dc6f7b15e 100644 --- a/animations/abstractanimation.h +++ b/animations/abstractanimation.h @@ -47,6 +47,9 @@ class PLASMA_EXPORT AbstractAnimation : public QObject Q_OBJECT Q_PROPERTY(QEasingCurve::Type easingCurveType READ easingCurveType WRITE setEasingCurveType) + Q_PROPERTY(AnimationDirection animationDirection READ animationDirection WRITE setAnimationDirection) + Q_PROPERTY(qreal animationDistance READ animationDistance WRITE setAnimationDistance) + Q_PROPERTY(bool animationVisible READ animationVisible WRITE setAnimationVisible) public: @@ -75,6 +78,39 @@ public: */ QEasingCurve::Type easingCurveType() const; + /** + * Set the animation direction + * @arg animationDirection animation direction + */ + void setAnimationDirection(AnimationDirection animationDirection); + + /** + * Get the animation direction + */ + AnimationDirection animationDirection() const; + + /** + * Set the animation distance + * @animationDistance animation distance + */ + void setAnimationDistance(qreal animationDistance); + + /** + * Get the animation distance + */ + qreal animationDistance() const; + + /** + * set the animation visibility + * @arg animationVisible animation visibility + */ + void setAnimationVisible(bool animationVisible); + + /** + * get the animation visibility + */ + bool animationVisible() const; + public slots: /**