make the JS anims an easing curve anim

svn path=/trunk/KDE/kdelibs/; revision=1120782
This commit is contained in:
Aaron J. Seigo 2010-04-29 23:40:30 +00:00
parent 6c44a1e8a4
commit c5748b3719
2 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,7 @@ namespace Plasma
{ {
JavascriptAnimation::JavascriptAnimation(const QString &name, QObject *parent) JavascriptAnimation::JavascriptAnimation(const QString &name, QObject *parent)
: Animation(parent), : EasingAnimation(parent),
#ifdef PLASMA_JSANIM_FPS #ifdef PLASMA_JSANIM_FPS
m_fps(0), m_fps(0),
#endif #endif
@ -98,7 +98,7 @@ void JavascriptAnimation::updateState(QAbstractAnimation::State newState, QAbstr
} }
} }
void JavascriptAnimation::updateCurrentTime(int currentTime) void JavascriptAnimation::updateEffectiveTime(int currentTime)
{ {
if (m_method.isFunction()) { if (m_method.isFunction()) {
#ifdef PLASMA_JSANIM_FPS #ifdef PLASMA_JSANIM_FPS

View File

@ -22,9 +22,9 @@
#include <QScriptValue> #include <QScriptValue>
#include "animation.h"
#include "plasma_export.h"
#include "animator.h" #include "animator.h"
#include "easinganimation_p.h"
#include "plasma_export.h"
class QString; class QString;
class QScriptEngine; class QScriptEngine;
@ -34,7 +34,7 @@ class QScriptEngine;
namespace Plasma namespace Plasma
{ {
class JavascriptAnimation: public Animation class JavascriptAnimation: public EasingAnimation
{ {
Q_OBJECT Q_OBJECT
@ -49,7 +49,7 @@ public:
protected: protected:
void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
void updateCurrentTime(int currentTime); void updateEffectiveTime(int currentTime);
private: private:
#ifdef PLASMA_JSANIM_FPS #ifdef PLASMA_JSANIM_FPS