adapt to new Phase API

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=679872
This commit is contained in:
Aaron J. Seigo 2007-06-25 06:02:33 +00:00
parent 45ee70aa26
commit 49f9cd42f8
2 changed files with 5 additions and 4 deletions

View File

@ -194,7 +194,7 @@ Applet* Corona::addPlasmoid(const QString& name, const QStringList& args)
d->applets << applet;
connect(applet, SIGNAL(destroyed(QObject*)),
this, SLOT(appletDestroyed(QObject*)));
Phase::self()->animate(applet, Phase::Appear);
Phase::self()->animateItem(applet, Phase::Appear);
} else {
kDebug() << "Plasmoid " << name << " could not be loaded." << endl;
}
@ -207,7 +207,7 @@ void Corona::addKaramba(const KUrl& path)
QGraphicsItemGroup* karamba = KarambaManager::loadKaramba(path, this);
if (karamba) {
addItem(karamba);
Phase::self()->animate(karamba, Phase::Appear);
Phase::self()->animateItem(karamba, Phase::Appear);
} else {
kDebug() << "Karamba " << path << " could not be loaded." << endl;
}

View File

@ -345,6 +345,7 @@ void Icon::mousePressEvent(QGraphicsSceneMouseEvent *event)
void Icon::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
kDebug() << "Icon::mouseReleaseEvent" <<endl;
bool inside = boundingRect().contains(event->pos());
bool wasClicked = d->state == Private::PressedState && inside;
@ -424,7 +425,7 @@ void Icon::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Phase::self()->stopElementAnimation(d->button1AnimId);
}
d->button1AnimId = Phase::self()->startElementAnimation(this, Phase::ElementAppear);
d->button1AnimId = Phase::self()->animateElement(this, Phase::ElementAppear);
Phase::self()->setAnimationPixmap(d->button1AnimId, buttonPixmap());
QGraphicsItem::hoverEnterEvent(event);
}
@ -438,7 +439,7 @@ void Icon::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Phase::self()->stopElementAnimation(d->button1AnimId);
}
d->button1AnimId = Phase::self()->startElementAnimation(this, Phase::ElementDisappear);
d->button1AnimId = Phase::self()->animateElement(this, Phase::ElementDisappear);
Phase::self()->setAnimationPixmap(d->button1AnimId, buttonPixmap());
d->state = Private::NoState;