Clean ups.

svn path=/trunk/KDE/kdelibs/; revision=1036798
This commit is contained in:
Adenilson Cavalcanti Da Silva 2009-10-17 19:47:36 +00:00
parent 032640b8ab
commit 00e5a53873

View File

@ -30,18 +30,12 @@ SlideAnimation::SlideAnimation(AnimationDirection direction, qreal distance)
{ {
AnimationPrivate *obj = getAnimationPrivate(); AnimationPrivate *obj = getAnimationPrivate();
obj->animDirection = direction; obj->animDirection = direction;
//: m_direction(direction),
obj->animDistance = distance; obj->animDistance = distance;
//m_distance(distance),
obj->animVisible = true; obj->animVisible = true;
//m_end_visibility(true)
} }
QAbstractAnimation* SlideAnimation::render(QObject* parent) QAbstractAnimation* SlideAnimation::render(QObject* parent)
{ {
//get current geometry values
QGraphicsWidget *m_object = getAnimatedObject(); QGraphicsWidget *m_object = getAnimatedObject();
qreal x = m_object->x(); qreal x = m_object->x();
qreal y = m_object->y(); qreal y = m_object->y();
@ -50,7 +44,6 @@ QAbstractAnimation* SlideAnimation::render(QObject* parent)
qreal newY = y; qreal newY = y;
AnimationPrivate *obj = getAnimationPrivate(); AnimationPrivate *obj = getAnimationPrivate();
//compute new geometry values
switch (obj->animDirection) { switch (obj->animDirection) {
case MoveUp: case MoveUp:
@ -79,7 +72,6 @@ UpLeft) are not supported\n";
break; break;
} }
//create animation
QPropertyAnimation* anim = new QPropertyAnimation(m_object, "pos", parent); QPropertyAnimation* anim = new QPropertyAnimation(m_object, "pos", parent);
anim->setEndValue(QPointF(newX, newY)); anim->setEndValue(QPointF(newX, newY));
anim->setDuration(getDuration()); anim->setDuration(getDuration());