From 2360b4b2109446de972e94933899d02dacb2ceb1 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sun, 10 Jun 2007 06:25:26 +0000 Subject: [PATCH] * actually start the timeline (durr!) * open up the possiblity to change the CurveShape depending on the effect svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=673396 --- phase.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phase.cpp b/phase.cpp index a30842411..0400d273f 100644 --- a/phase.cpp +++ b/phase.cpp @@ -102,6 +102,7 @@ void Phase::animate(QGraphicsItem* item, Animation animation) } int frames = 0; + QTimeLine::CurveShape curveShape = QTimeLine::EaseInOutCurve; switch (animation) { case Appear: frames = d->animator->appearFrames(); @@ -123,6 +124,7 @@ void Phase::animate(QGraphicsItem* item, Animation animation) QTimeLine* timeLine = new QTimeLine(333, this); timeLine->setFrameRange(0, frames / 3.0); + timeLine->setCurveShape(curveShape); AnimationState state; state.item = item; @@ -131,6 +133,7 @@ void Phase::animate(QGraphicsItem* item, Animation animation) d->theAnimated[item] = timeLine; connect(timeLine, SIGNAL(frameChanged(int)), this, SLOT(advanceFrame(int))); connect(timeLine, SIGNAL(finished()), this, SLOT(animationComplete())); + timeLine->start(); } void Phase::advanceFrame(int frame) @@ -138,12 +141,14 @@ void Phase::advanceFrame(int frame) QTimeLine* timeLine = dynamic_cast(sender()); if (!timeLine) { + kDebug() << "Phase::advanceFrame found no timeLine!" << endl; return; } QMap::iterator it = d->animations.find(timeLine); if (it == d->animations.end()) { + kDebug() << "Phase::advanceFrame found no entry in animations!" << endl; return; }