103 QScriptValue
callFunction( QString _plugin, QString _functionName );
114 QScriptValue
callFunction( QString _plugin, QString _functionName , std::vector< QScriptValue > _parameters );
131 template <
typename T0>
134 std::vector< QScriptValue > parameters;
152 parameters.push_back( engine->toScriptValue(_t0) );
163 template <
typename T0,
typename T1>
164 void callFunction( QString _plugin, QString _functionName, T0 _t0 , T1 _t1) {
166 std::vector< QScriptValue > parameters;
167 parameters.push_back( engine->toScriptValue( _t0 ) );
168 parameters.push_back( engine->toScriptValue( _t1 ) );
180 template <
typename T0,
typename T1 ,
typename T2>
181 void callFunction( QString _plugin, QString _functionName, T0 _t0 , T1 _t1 , T2 _t2 ) {
183 std::vector< QScriptValue > parameters;
184 parameters.push_back( engine->toScriptValue(_t0 ) );
185 parameters.push_back( engine->toScriptValue( _t1 ) );
186 parameters.push_back( engine->toScriptValue( _t2 ) );
199 template <
typename T0,
typename T1 ,
typename T2,
typename T3>
200 void callFunction( QString _plugin, QString _functionName, T0 _t0 , T1 _t1 , T2 _t2 , T3 _t3 ) {
202 std::vector< QScriptValue > parameters;
203 parameters.push_back( engine->toScriptValue( _t0 ) );
204 parameters.push_back( engine->toScriptValue( _t1 ) );
205 parameters.push_back( engine->toScriptValue( _t2 ) );
206 parameters.push_back( engine->toScriptValue( _t3 ) );
220 template <
typename T0,
typename T1 ,
typename T2,
typename T3,
typename T4>
221 void callFunction( QString _plugin, QString _functionName, T0 _t0 , T1 _t1 , T2 _t2 , T3 _t3 , T4 _t4) {
223 std::vector< QScriptValue > parameters;
224 parameters.push_back( engine->toScriptValue( _t0 ) );
225 parameters.push_back( engine->toScriptValue( _t1 ) );
226 parameters.push_back( engine->toScriptValue( _t2 ) );
227 parameters.push_back( engine->toScriptValue( _t3 ) );
228 parameters.push_back( engine->toScriptValue( _t4 ) );
243 template <
typename T0,
typename T1 ,
typename T2,
typename T3,
typename T4,
typename T5>
244 void callFunction( QString _plugin, QString _functionName, T0 _t0 , T1 _t1 , T2 _t2 , T3 _t3 , T4 _t4, T5 _t5) {
246 std::vector< QScriptValue > parameters;
247 parameters.push_back( engine->toScriptValue( _t0 ) );
248 parameters.push_back( engine->toScriptValue( _t1 ) );
249 parameters.push_back( engine->toScriptValue( _t2 ) );
250 parameters.push_back( engine->toScriptValue( _t3 ) );
251 parameters.push_back( engine->toScriptValue( _t4 ) );
252 parameters.push_back( engine->toScriptValue( _t5 ) );
272 template <
typename ReturnValue >
274 return qscriptvalue_cast< ReturnValue >(
callFunction(_plugin,_functionName) );
284 template <
typename ReturnValue ,
typename T0>
287 std::vector< QScriptValue > parameters;
288 parameters.push_back( engine->toScriptValue( _t0 ) );
289 return qscriptvalue_cast<ReturnValue>(
callFunction(_plugin,_functionName,parameters) );
300 template <
typename ReturnValue ,
typename T0,
typename T1>
303 std::vector< QScriptValue > parameters;
304 parameters.push_back( engine->toScriptValue( _t0 ) );
305 parameters.push_back( engine->toScriptValue( _t1 ) );
306 return qscriptvalue_cast<ReturnValue>(
callFunction(_plugin,_functionName,parameters) );
318 template <
typename ReturnValue ,
typename T0,
typename T1 ,
typename T2 >
319 ReturnValue
callFunctionValue( QString _plugin, QString _functionName, T0 _t0 , T1 _t1 , T2 _t2 ) {
321 std::vector< QScriptValue > parameters;
322 parameters.push_back( engine->toScriptValue( _t0 ) );
323 parameters.push_back( engine->toScriptValue( _t1 ) );
324 parameters.push_back( engine->toScriptValue( _t2 ) );
325 return qscriptvalue_cast<ReturnValue>(
callFunction(_plugin,_functionName,parameters) );
338 template <
typename ReturnValue ,
typename T0,
typename T1 ,
typename T2,
typename T3>
339 ReturnValue
callFunctionValue( QString _plugin, QString _functionName, T0 _t0 , T1 _t1 , T2 _t2 , T3 _t3 ) {
341 std::vector< QScriptValue > parameters;
342 parameters.push_back( engine->toScriptValue( _t0 ) );
343 parameters.push_back( engine->toScriptValue( _t1 ) );
344 parameters.push_back( engine->toScriptValue( _t2 ) );
345 parameters.push_back( engine->toScriptValue( _t3 ) );
346 return qscriptvalue_cast<ReturnValue>(
callFunction(_plugin,_functionName,parameters) );
360 template <
typename ReturnValue ,
typename T0,
typename T1 ,
typename T2,
typename T3,
typename T4>
361 ReturnValue
callFunctionValue( QString _plugin, QString _functionName, T0 _t0 , T1 _t1 , T2 _t2 , T3 _t3, T4 _t4 ) {
363 std::vector< QScriptValue > parameters;
364 parameters.push_back( engine->toScriptValue( _t0 ) );
365 parameters.push_back( engine->toScriptValue( _t1 ) );
366 parameters.push_back( engine->toScriptValue( _t2 ) );
367 parameters.push_back( engine->toScriptValue( _t3 ) );
368 parameters.push_back( engine->toScriptValue( _t4 ) );
369 return qscriptvalue_cast<ReturnValue>(
callFunction(_plugin,_functionName,parameters) );
384 template <
typename ReturnValue ,
typename T0,
typename T1 ,
typename T2,
typename T3,
typename T4,
typename T5>
385 ReturnValue
callFunctionValue( QString _plugin, QString _functionName, T0 _t0 , T1 _t1 , T2 _t2 , T3 _t3, T4 _t4 , T5 _t5 ) {
387 std::vector< QScriptValue > parameters;
388 parameters.push_back( engine->toScriptValue( _t0 ) );
389 parameters.push_back( engine->toScriptValue( _t1 ) );
390 parameters.push_back( engine->toScriptValue( _t2 ) );
391 parameters.push_back( engine->toScriptValue( _t3 ) );
392 parameters.push_back( engine->toScriptValue( _t4 ) );
393 parameters.push_back( engine->toScriptValue( _t5 ) );
394 return qscriptvalue_cast<ReturnValue>(
callFunction(_plugin,_functionName,parameters) );
ReturnValue callFunctionValue(QString _plugin, QString _functionName)
call a function in another plugin and get a return parameter
QScriptValue callFunction(QString _plugin, QString _functionName, std::vector< QScriptValue > _parameters)
Call a function provided by a plugin getting multiple parameters.
QScriptEngine * getScriptEngine()
get a pointer to OpenFlippers core scripting engine
void setScriptEngine(QScriptEngine *_engine)
DONT USE! (Function to set the internal reference to the script Engine)