API REVIEW: *Slide* -> *Slide*Movement

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800796
This commit is contained in:
Davide Bettio 2008-04-24 21:06:08 +00:00
parent d6995254db
commit eba58a193d
5 changed files with 18 additions and 18 deletions

View File

@ -62,8 +62,8 @@ int Animator::animationDuration(Plasma::Phase::Animation) const
int Animator::movementAnimationDuration(Plasma::Phase::Movement movement) const
{
switch (movement) {
case Phase::FastSlideIn:
case Phase::FastSlideOut:
case Phase::FastSlideInMovement:
case Phase::FastSlideOutMovement:
return 100;
break;
default:

View File

@ -215,14 +215,14 @@ void DesktopToolbox::showToolbox()
if (!tool->isEnabled()) {
if (tool->isVisible()) {
const int height = static_cast<int>(tool->boundingRect().height());
phase->moveItem(tool, Plasma::Phase::SlideOut, QPoint(size() * 2, -height));
phase->moveItem(tool, Plasma::Phase::SlideOutMovement, QPoint(size() * 2, -height));
}
continue;
}
//kDebug() << "let's show and move" << tool << tool->boundingRect();
tool->show();
phase->moveItem(tool, Plasma::Phase::SlideIn, QPoint(x, y));
phase->moveItem(tool, Plasma::Phase::SlideInMovement, QPoint(x, y));
//x += 0;
y += static_cast<int>(tool->boundingRect().height()) + 5;
}
@ -271,7 +271,7 @@ void DesktopToolbox::hideToolbox()
}
const int height = static_cast<int>(tool->boundingRect().height());
phase->moveItem(tool, Plasma::Phase::SlideOut, QPoint(x, y-height));
phase->moveItem(tool, Plasma::Phase::SlideOutMovement, QPoint(x, y-height));
}
if (d->animId) {

View File

@ -240,14 +240,14 @@ void PanelToolbox::showToolbox()
if (!tool->isEnabled()) {
if (tool->isVisible()) {
const int height = static_cast<int>(tool->boundingRect().height());
phase->moveItem(tool, Plasma::Phase::SlideOut, QPoint(size() * 2, -height));
phase->moveItem(tool, Plasma::Phase::SlideOutMovement, QPoint(size() * 2, -height));
}
continue;
}
//kDebug() << "let's show and move" << tool << tool->boundingRect();
tool->show();
phase->moveItem(tool, Plasma::Phase::SlideIn, QPoint(x, y));
phase->moveItem(tool, Plasma::Phase::SlideInMovement, QPoint(x, y));
//x += 0;
y += static_cast<int>(tool->boundingRect().height()) + 5;
}
@ -296,7 +296,7 @@ void PanelToolbox::hideToolbox()
}
const int height = static_cast<int>(tool->boundingRect().height());
phase->moveItem(tool, Plasma::Phase::SlideOut, QPoint(x, y-height));
phase->moveItem(tool, Plasma::Phase::SlideOutMovement, QPoint(x, y-height));
}
if (d->animId) {

View File

@ -148,14 +148,14 @@ class Phase::Private
void performMovement(qreal amount, const MovementState* state)
{
switch (state->movement) {
case Phase::SlideIn:
case Phase::FastSlideIn:
//kDebug() << "performMovement, SlideIn";
case Phase::SlideInMovement:
case Phase::FastSlideInMovement:
//kDebug() << "performMovement, SlideInMovement";
animator->itemSlideIn(amount, state->item, state->start, state->destination);
break;
case Phase::SlideOut:
case Phase::FastSlideOut:
//kDebug() << "performMovement, SlideOut";
case Phase::SlideOutMovement:
case Phase::FastSlideOutMovement:
//kDebug() << "performMovement, SlideOutMovement";
animator->itemSlideOut(amount, state->item, state->start, state->destination);
break;
}

View File

@ -66,10 +66,10 @@ public:
enum Movement
{
SlideIn = 0,
SlideOut,
FastSlideIn,
FastSlideOut
SlideInMovement = 0,
SlideOutMovement,
FastSlideInMovement,
FastSlideOutMovement
};
typedef int AnimId;