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:
parent
bd94befc48
commit
1bdc28c19e
@ -48,6 +48,7 @@ class PLASMA_EXPORT Animation : public QAbstractAnimation
|
|||||||
|
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_ENUMS(Reference)
|
Q_ENUMS(Reference)
|
||||||
|
Q_ENUMS(Direction)
|
||||||
Q_PROPERTY(int duration READ duration WRITE setDuration)
|
Q_PROPERTY(int duration READ duration WRITE setDuration)
|
||||||
Q_PROPERTY(QEasingCurve::Type easingCurveType READ easingCurveType WRITE setEasingCurveType)
|
Q_PROPERTY(QEasingCurve::Type easingCurveType READ easingCurveType WRITE setEasingCurveType)
|
||||||
Q_PROPERTY(QGraphicsWidget *targetWidget READ targetWidget WRITE setTargetWidget)
|
Q_PROPERTY(QGraphicsWidget *targetWidget READ targetWidget WRITE setTargetWidget)
|
||||||
@ -70,6 +71,21 @@ public:
|
|||||||
Right
|
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.
|
* Default constructor.
|
||||||
*
|
*
|
||||||
|
@ -42,7 +42,7 @@ RotationStackedAnimation::~RotationStackedAnimation()
|
|||||||
|
|
||||||
void RotationStackedAnimation::setMovementDirection(const qint8 &direction)
|
void RotationStackedAnimation::setMovementDirection(const qint8 &direction)
|
||||||
{
|
{
|
||||||
animDirection = static_cast<Plasma::AnimationDirection>(direction);
|
animDirection = static_cast<Direction>(direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
qint8 RotationStackedAnimation::movementDirection() const
|
qint8 RotationStackedAnimation::movementDirection() const
|
||||||
|
@ -104,7 +104,7 @@ private:
|
|||||||
/**
|
/**
|
||||||
* Animation direction: where the animation will move.
|
* Animation direction: where the animation will move.
|
||||||
*/
|
*/
|
||||||
Plasma::AnimationDirection animDirection;
|
Direction animDirection;
|
||||||
/** Initial rotation angle from front widget */
|
/** Initial rotation angle from front widget */
|
||||||
int frontStartAngle;
|
int frontStartAngle;
|
||||||
/** End value of the rotation angle of the front widget */
|
/** End value of the rotation angle of the front widget */
|
||||||
|
@ -40,7 +40,7 @@ SlideAnimation::~SlideAnimation()
|
|||||||
}
|
}
|
||||||
|
|
||||||
SlideAnimation::SlideAnimation(QObject *parent,
|
SlideAnimation::SlideAnimation(QObject *parent,
|
||||||
AnimationDirection direction,
|
Direction direction,
|
||||||
qreal distance) : Animation(parent)
|
qreal distance) : Animation(parent)
|
||||||
{
|
{
|
||||||
setMovementDirection(direction);
|
setMovementDirection(direction);
|
||||||
@ -50,7 +50,7 @@ SlideAnimation::SlideAnimation(QObject *parent,
|
|||||||
|
|
||||||
void SlideAnimation::setMovementDirection(const qint8 &direction)
|
void SlideAnimation::setMovementDirection(const qint8 &direction)
|
||||||
{
|
{
|
||||||
m_animDirection = static_cast<Plasma::AnimationDirection>(direction);
|
m_animDirection = static_cast<Direction>(direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
qint8 SlideAnimation::movementDirection() const
|
qint8 SlideAnimation::movementDirection() const
|
||||||
|
@ -47,7 +47,7 @@ class SlideAnimation : public Animation
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
SlideAnimation(QObject *parent = 0,
|
SlideAnimation(QObject *parent = 0,
|
||||||
AnimationDirection direction = MoveUp, qreal distance = 0);
|
Direction direction = MoveUp, qreal distance = 0);
|
||||||
~SlideAnimation();
|
~SlideAnimation();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -80,7 +80,7 @@ private:
|
|||||||
/**
|
/**
|
||||||
* Animation direction: where the animation will move.
|
* Animation direction: where the animation will move.
|
||||||
*/
|
*/
|
||||||
Plasma::AnimationDirection m_animDirection;
|
Direction m_animDirection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Animation distance: displacement factor for animations where
|
* Animation distance: displacement factor for animations where
|
||||||
|
14
plasma.h
14
plasma.h
@ -107,20 +107,6 @@ enum ZoomDirection {
|
|||||||
ZoomOut = 1 /**< Zoom out one step */
|
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
|
* The Location enumeration describes where on screen an element, such as an
|
||||||
* Applet or its managing container, is positioned on the screen.
|
* Applet or its managing container, is positioned on the screen.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user