Beispiel #1
0
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;
}