support more directions
svn path=/trunk/KDE/kdelibs/; revision=1041173
This commit is contained in:
parent
28bab1f99d
commit
151b9d92bb
@ -42,7 +42,7 @@ QAbstractAnimation* SlideAnimation::render(QObject* parent)
|
||||
qreal newX = x;
|
||||
qreal newY = y;
|
||||
|
||||
kDebug()<<direction( );
|
||||
kDebug()<<direction();
|
||||
switch (direction()) {
|
||||
case MoveUp:
|
||||
newY -= distance();
|
||||
@ -61,12 +61,29 @@ QAbstractAnimation* SlideAnimation::render(QObject* parent)
|
||||
break;
|
||||
|
||||
case MoveUpRight:
|
||||
case MoveDownRight:
|
||||
case MoveDownLeft:
|
||||
case MoveUpLeft:
|
||||
/* TODO: support compound directions */
|
||||
kDebug() << "Compound directions (UpRight, DownRight, DownLeft, UpLeft) are not supported";
|
||||
newX += distance();
|
||||
newY -= distance();
|
||||
break;
|
||||
|
||||
case MoveDownRight:
|
||||
newX += distance();
|
||||
newY += distance();
|
||||
break;
|
||||
|
||||
case MoveDownLeft:
|
||||
newX -= distance();
|
||||
newY += distance();
|
||||
break;
|
||||
|
||||
|
||||
case MoveUpLeft:
|
||||
newX -= distance();
|
||||
newY -= distance();
|
||||
break;
|
||||
|
||||
default:
|
||||
kDebug()<<"Compound direction is not supported";
|
||||
return 0;
|
||||
}
|
||||
|
||||
//Recreate only if needed
|
||||
|
Loading…
Reference in New Issue
Block a user