parley
Script Class Reference
This class represents the activated script and is used by the ScriptManager to activate/deactivate scripts. More...
#include <script.h>

Public Member Functions | |
| Script (QString file) | |
| ~Script () | |
| void | activate () |
| void | addObject (QString name, QObject *object) |
| void | addObjects (QMap< QString, QObject * > objects) |
| void | deactivate () |
| QString | errorMessage () |
| bool | exists () |
| QString | fileName () |
| bool | isActivated () |
Detailed Description
This class represents the activated script and is used by the ScriptManager to activate/deactivate scripts.
Definition at line 31 of file script.h.
Constructor & Destructor Documentation
| Script::Script | ( | QString | file | ) |
Script class constructor.
- Parameters:
-
file The path to the script file to be activated (executed)
Definition at line 23 of file script.cpp.
| Script::~Script | ( | ) |
Definition at line 30 of file script.cpp.
Member Function Documentation
| void Script::activate | ( | ) |
Activates the script.
Definition at line 43 of file script.cpp.
Add an object to be accessible by the script.
- Parameters:
-
name Name to appear in the script object Object to be accessible by the script
Definition at line 115 of file script.cpp.
Adds more than one scripting Objects to the script.
- Parameters:
-
objects Map of the objects to add
Definition at line 121 of file script.cpp.
| void Script::deactivate | ( | ) |
Deactivate the script.
Definition at line 94 of file script.cpp.
| QString Script::errorMessage | ( | ) |
Returns an html error message if there have been errors in the script.
Definition at line 126 of file script.cpp.
| bool Script::exists | ( | ) |
Checks if the script file assigned to the Script object exists as a file on the given path.
- Returns:
- True if the script file exists False if it does not exist
Definition at line 102 of file script.cpp.
| QString Script::fileName | ( | ) |
Returns the file that was given as parameter to the constructor.
Definition at line 109 of file script.cpp.
| bool Script::isActivated | ( | ) |
Returns true if the script was successfully activated; false otherwise.
Definition at line 37 of file script.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference