Interface for all Plugins which provide scriptable Functions.
More...
#include <OpenFlipper/BasePlugin/ScriptInterface.hh>
|
|
virtual void | scriptInfo (QString _functionWithParameters) |
| Emit this signal if a scriptable function is executed. More...
|
|
|
virtual void | getScriptingEngine (QScriptEngine *&_engine) |
|
|
virtual void | getDescription (QString _function, QString &_description, QStringList &_parameters, QStringList &_descriptions) |
|
virtual void | getAvailableFunctions (QStringList &_functions) |
|
Interface for all Plugins which provide scriptable Functions.
Detailed description
Definition at line 67 of file ScriptInterface.hh.
virtual void ScriptInterface::executeFileScript |
( |
QString |
_filename | ) |
|
|
inlinevirtual |
Emit this signal to execute a script from a file
- Parameters
-
_filename | Filename of the script to execute |
Definition at line 89 of file ScriptInterface.hh.
virtual void ScriptInterface::executeScript |
( |
QString |
_script | ) |
|
|
inlinevirtualsignal |
Emit this signal to execute a script
- Parameters
-
_script | The script to execute |
Definition at line 84 of file ScriptInterface.hh.
virtual void ScriptInterface::getAvailableFunctions |
( |
QStringList & |
_functions | ) |
|
|
inlinevirtualsignal |
With this signal you can get a list of all available scripting functions
- Parameters
-
_functions | All available functions |
Definition at line 103 of file ScriptInterface.hh.
virtual void ScriptInterface::getDescription |
( |
QString |
_function, |
|
|
QString & |
_description, |
|
|
QStringList & |
_parameters, |
|
|
QStringList & |
_descriptions |
|
) |
| |
|
inlinevirtual |
With this signal you can get descriptions about a given function if available
- Parameters
-
_function | name of the function (e.g. plugin.function) |
_description | a description for the function |
_parameters | list of names for the parameters |
_descriptions | list of descriptions for the parameters (_descriptions[i] corresponds to _parameters[i]) |
Definition at line 112 of file ScriptInterface.hh.
virtual void ScriptInterface::getScriptingEngine |
( |
QScriptEngine *& |
_engine | ) |
|
|
inlinevirtualsignal |
Emit this signal to get a reference to the core scripting engine
- Parameters
-
_engine | The scripting Engine |
Definition at line 155 of file ScriptInterface.hh.
virtual void ScriptInterface::scriptInfo |
( |
QString |
_functionWithParameters | ) |
|
|
inlinevirtualsignal |
Emit this signal if a scriptable function is executed.
e.g. selectAllVertices( ObjectId )
If you execute this function, you can append your functions to the script execution history in OpenFlipper. In this history OpenFlipper records operations that are scriptable. Later this list can be executed again and therefore reruns the recorded operations.
The following example code shows a function called translate in a plugin, that gets an ObjectId as a parameter. The plugin which emits this function will automatically be added in the history ( e.g.
move.translate( ObjectId ,
Vector(1 , 0 , 0 ) )
)
emit
scriptInfo(
"translate( ObjectId , Vector(1 , 0 , 0 ) )" );
- Parameters
-
_functionWithParameters | The called function with all parameters |
Definition at line 140 of file ScriptInterface.hh.
virtual void ScriptInterface::slotExecuteFileScript |
( |
QString |
_filename | ) |
|
|
inlineprivatevirtual |
Slot for a scripting plugin. Gets the Script as a filename, opens and executes it.
Definition at line 184 of file ScriptInterface.hh.
virtual void ScriptInterface::slotExecuteScript |
( |
QString |
_script | ) |
|
|
inlineprivatevirtual |
Slot for a scripting plugin. Gets the Script as QString and executes it.
- Parameters
-
_script | Script to execute as a QString |
Definition at line 179 of file ScriptInterface.hh.
virtual void ScriptInterface::slotScriptInfo |
( |
QString |
_pluginName, |
|
|
QString |
_functionWithParameters |
|
) |
| |
|
inlineprivatevirtualslot |
Slot for a scripting plugin. Gets the Script and executes it.
- Parameters
-
_pluginName | Name of the plugin that executed a scriptable function |
_functionWithParameters | Name with parameters (values!) of the function to call. |
Definition at line 172 of file ScriptInterface.hh.
The documentation for this class was generated from the following file: