buld
svn path=/trunk/KDE/kdelibs/; revision=1119246
This commit is contained in:
parent
a0c104c19a
commit
cbd94fc434
@ -22,7 +22,7 @@
|
|||||||
* - cleanup debug messages
|
* - cleanup debug messages
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "engine.h"
|
#include "animationscriptengine_p.h"
|
||||||
|
|
||||||
namespace Plasma
|
namespace Plasma
|
||||||
{
|
{
|
||||||
|
@ -33,8 +33,8 @@ namespace Plasma
|
|||||||
namespace AnimationScriptEngine
|
namespace AnimationScriptEngine
|
||||||
{
|
{
|
||||||
|
|
||||||
static QScriptEngine* globalEngine();
|
QScriptEngine* globalEngine();
|
||||||
static QScriptValue animation(const QString &anim);
|
QScriptValue animation(const QString &anim);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "javascriptanimation_p.h"
|
#include "javascriptanimation_p.h"
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include "animationscriptengine.h"
|
#include "animationscriptengine_p.h"
|
||||||
/* TODO:
|
/* TODO:
|
||||||
* - support passing more parameters to the js animation object
|
* - support passing more parameters to the js animation object
|
||||||
* - support more properties: angle, direction, etc
|
* - support more properties: angle, direction, etc
|
||||||
@ -52,9 +52,9 @@ void JavascriptAnimation::updateState(QAbstractAnimation::State newState, QAbstr
|
|||||||
//Define the class and create an instance
|
//Define the class and create an instance
|
||||||
if (!m_instance) {
|
if (!m_instance) {
|
||||||
m_instance = new QScriptValue;
|
m_instance = new QScriptValue;
|
||||||
*m_instance = AnimationEngine::animation(m_name).construct(QScriptValueList()
|
QScriptValueList args;
|
||||||
<< engine->newQObject(targetWidget())
|
args << engine->newQObject(targetWidget()) << duration();
|
||||||
<< duration());
|
*m_instance = AnimationScriptEngine::animation(m_name).construct(args);
|
||||||
qDebug( )<< "trying for" << m_name << m_instance->isFunction();
|
qDebug( )<< "trying for" << m_name << m_instance->isFunction();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,4 +98,4 @@ void JavascriptAnimation::updateCurrentTime(int currentTime)
|
|||||||
|
|
||||||
} //namespace Plasma
|
} //namespace Plasma
|
||||||
|
|
||||||
#include <../jsanim_p.moc>
|
#include <javascriptanimation_p.moc>
|
||||||
|
Loading…
Reference in New Issue
Block a user