bool display::setParams(ParameterList & params) { bool ret = _data->setParams(params); if(engine() && engine()->globalObject().property("setParams").isFunction()) { QScriptValue paramArg = ParameterListtoScriptValue(engine(), params); QScriptValue tmp = engine()->globalObject().property("setParams").call(QScriptValue(), QScriptValueList() << paramArg); ret = ret && tmp.toBool(); params.clear(); ParameterListfromScriptValue(paramArg, params); } return ret; }
enum SetResponse XMainWindow::postSet() { loadScriptEngine(); enum SetResponse returnValue = NoError; if(_private->_engine && _private->_engine->globalObject().property("set").isFunction()) { QScriptValueList args; args << ParameterListtoScriptValue(_private->_engine, _lastSetParams); QScriptValue tmp = _private->_engine->globalObject().property("set").call(QScriptValue(), args); SetResponsefromScriptValue(tmp, returnValue); } return returnValue; }
enum SetResponse ScriptablePrivate::callSet(const ParameterList & params) { loadScriptEngine(); enum SetResponse returnValue = NoError; if(_engine && _engine->globalObject().property("set").isFunction()) { QScriptValueList args; args << ParameterListtoScriptValue(_engine, params); QScriptValue tmp = _engine->globalObject().property("set").call(QScriptValue(), args); SetResponsefromScriptValue(tmp, returnValue); } return returnValue; }
enum SetResponse ScriptablePrivate::callSet(const ParameterList & params) { loadScriptEngine(); enum SetResponse returnValue = NoError; if (_engine) { QScriptValue tmp = _engine->globalObject() .property("set") .call(QScriptValue(), QScriptValueList() << ParameterListtoScriptValue(_engine, params)); returnValue = (enum SetResponse)tmp.toInt32(); } return returnValue; }