AnimationDirection should be Animation::Direction ... glad i caught this before 4.4.0 was rolled!

svn path=/trunk/KDE/kdelibs/; revision=1073436
This commit is contained in:
Aaron J. Seigo 2010-01-12 09:54:42 +00:00
parent bd94befc48
commit 1bdc28c19e
6 changed files with 22 additions and 20 deletions

View File

@ -48,6 +48,7 @@ class PLASMA_EXPORT Animation : public QAbstractAnimation
Q_OBJECT
Q_ENUMS(Reference)
Q_ENUMS(Direction)
Q_PROPERTY(int duration READ duration WRITE setDuration)
Q_PROPERTY(QEasingCurve::Type easingCurveType READ easingCurveType WRITE setEasingCurveType)
Q_PROPERTY(QGraphicsWidget *targetWidget READ targetWidget WRITE setTargetWidget)
@ -70,6 +71,21 @@ public:
Right
};
/**
* The movement direction of an animation.
*/
enum Direction {
MoveUp = 0, /**< Move up */
MoveUpRight, /**< Move up and right */
MoveRight, /**< Move right */
MoveDownRight, /**< Move down and right */
MoveDown, /**< Move down */
MoveDownLeft, /**< Move down and left */
MoveLeft, /**< Move left */
MoveUpLeft /**< Move up and left */
};
/**
* Default constructor.
*

View File

@ -42,7 +42,7 @@ RotationStackedAnimation::~RotationStackedAnimation()
void RotationStackedAnimation::setMovementDirection(const qint8 &direction)
{
animDirection = static_cast<Plasma::AnimationDirection>(direction);
animDirection = static_cast<Direction>(direction);
}
qint8 RotationStackedAnimation::movementDirection() const

View File

@ -104,7 +104,7 @@ private:
/**
* Animation direction: where the animation will move.
*/
Plasma::AnimationDirection animDirection;
Direction animDirection;
/** Initial rotation angle from front widget */
int frontStartAngle;
/** End value of the rotation angle of the front widget */

View File

@ -40,7 +40,7 @@ SlideAnimation::~SlideAnimation()
}
SlideAnimation::SlideAnimation(QObject *parent,
AnimationDirection direction,
Direction direction,
qreal distance) : Animation(parent)
{
setMovementDirection(direction);
@ -50,7 +50,7 @@ SlideAnimation::SlideAnimation(QObject *parent,
void SlideAnimation::setMovementDirection(const qint8 &direction)
{
m_animDirection = static_cast<Plasma::AnimationDirection>(direction);
m_animDirection = static_cast<Direction>(direction);
}
qint8 SlideAnimation::movementDirection() const

View File

@ -47,7 +47,7 @@ class SlideAnimation : public Animation
public:
SlideAnimation(QObject *parent = 0,
AnimationDirection direction = MoveUp, qreal distance = 0);
Direction direction = MoveUp, qreal distance = 0);
~SlideAnimation();
/**
@ -80,7 +80,7 @@ private:
/**
* Animation direction: where the animation will move.
*/
Plasma::AnimationDirection m_animDirection;
Direction m_animDirection;
/**
* Animation distance: displacement factor for animations where

View File

@ -107,20 +107,6 @@ enum ZoomDirection {
ZoomOut = 1 /**< Zoom out one step */
};
/**
* The movement direction of an animation.
*/
enum AnimationDirection {
MoveUp = 0, /**< Move up */
MoveUpRight, /**< Move up and right */
MoveRight, /**< Move right */
MoveDownRight, /**< Move down and right */
MoveDown, /**< Move down */
MoveDownLeft, /**< Move down and left */
MoveLeft, /**< Move left */
MoveUpLeft /**< Move up and left */
};
/**
* The Location enumeration describes where on screen an element, such as an
* Applet or its managing container, is positioned on the screen.