svn path=/trunk/KDE/kdelibs/; revision=1119246
This commit is contained in:
Aaron J. Seigo 2010-04-26 21:00:21 +00:00
parent a0c104c19a
commit cbd94fc434
3 changed files with 8 additions and 8 deletions

View File

@ -22,7 +22,7 @@
* - cleanup debug messages
*/
#include "engine.h"
#include "animationscriptengine_p.h"
namespace Plasma
{

View File

@ -33,8 +33,8 @@ namespace Plasma
namespace AnimationScriptEngine
{
static QScriptEngine* globalEngine();
static QScriptValue animation(const QString &anim);
QScriptEngine* globalEngine();
QScriptValue animation(const QString &anim);
}

View File

@ -20,7 +20,7 @@
#include "javascriptanimation_p.h"
#include <QDebug>
#include "animationscriptengine.h"
#include "animationscriptengine_p.h"
/* TODO:
* - support passing more parameters to the js animation object
* - support more properties: angle, direction, etc
@ -52,9 +52,9 @@ void JavascriptAnimation::updateState(QAbstractAnimation::State newState, QAbstr
//Define the class and create an instance
if (!m_instance) {
m_instance = new QScriptValue;
*m_instance = AnimationEngine::animation(m_name).construct(QScriptValueList()
<< engine->newQObject(targetWidget())
<< duration());
QScriptValueList args;
args << engine->newQObject(targetWidget()) << duration();
*m_instance = AnimationScriptEngine::animation(m_name).construct(args);
qDebug( )<< "trying for" << m_name << m_instance->isFunction();
}
@ -98,4 +98,4 @@ void JavascriptAnimation::updateCurrentTime(int currentTime)
} //namespace Plasma
#include <../jsanim_p.moc>
#include <javascriptanimation_p.moc>