65 for (
int i = 0 ; i < (int)
plugins().size(); ++i ) {
66 if (
plugins()[i].rpcName == _pluginName ) {
79 for (
int i = 0 ; i < (int)
plugins().size(); ++i ) {
80 if (
plugins()[i].rpcName == _pluginName ) {
91 _exists =
plugins()[plugin].rpcFunctions.contains(_functionName);
94 void Core::slotCall( QString _pluginName , QString _functionName ,
bool& _success ) {
98 for (
int i = 0 ; i < (int)
plugins().size(); ++i ) {
99 if (
plugins()[i].rpcName == _pluginName ) {
105 if ( plugin == -1 ) {
107 emit
log(
LOGERR, tr(
"Unable to call function from Plugin : ") + _pluginName + tr(
" ( Plugin not Found! )"));
111 if ( !
plugins()[plugin].rpcFunctions.contains(_functionName) ) {
113 emit
log(
LOGERR, tr(
"Unable to call function from Plugin : ") + _pluginName);
114 emit
log(
LOGERR, tr(
"Function ") + _functionName + tr(
" not found!"));
122 QString exception = result.toString();
123 emit
log(
LOGERR , tr(
"RPC failed with : ") + exception );
137 QString exception = result.toString();
138 emit
log(
LOGERR , tr(
"RPC failed with : ") + exception );
150 slotCall(
"var tmpValue=" + _expression +
";", ok);
153 _result = QVariant();
158 QScriptValue val =
scriptEngine_.globalObject().property(
"tmpValue");
163 _result = val.toVariant();
void slotFunctionExists(QString _pluginName, QString _functionName, bool &_exists)
Check if a function exists.
void log(Logtype _type, QString _message)
Logg with OUT,WARN or ERR as type.
void slotCall(QString _pluginName, QString _functionName, bool &_success)
void slotGetValue(QString _expression, QVariant &_result)
QScriptEngine scriptEngine_
Core scripting engine.
void slotPluginExists(QString _pluginName, bool &_exists)
Check if a plugin exists.
std::vector< PluginInfo > & plugins()
Index of Plugins toolbox widget.