Plasma
Plasma::RunnerScript Class Reference
Provides a restricted interface for scripting a runner. More...
#include <Plasma/Scripting/RunnerScript>

Public Member Functions | |
virtual void | match (Plasma::RunnerContext &search) |
virtual void | run (const Plasma::RunnerContext &search, const Plasma::QueryMatch &action) |
AbstractRunner * | runner () const |
RunnerScript (QObject *parent=0) | |
void | setRunner (AbstractRunner *runner) |
~RunnerScript () | |
Protected Member Functions | |
QString | mainScript () const |
const Package * | package () const |
Detailed Description
Provides a restricted interface for scripting a runner.
Definition at line 41 of file runnerscript.h.
Constructor & Destructor Documentation
Plasma::RunnerScript::RunnerScript | ( | QObject * | parent = 0 |
) | [explicit] |
Default constructor for a RunnerScript.
Subclasses should not attempt to access the Plasma::AbstractRunner associated with this RunnerScript in the constructor. All such set up that requires the AbstractRunner itself should be done in the init() method.
Definition at line 34 of file runnerscript.cpp.
Plasma::RunnerScript::~RunnerScript | ( | ) |
Definition at line 40 of file runnerscript.cpp.
Member Function Documentation
QString Plasma::RunnerScript::mainScript | ( | ) | const [protected, virtual] |
- Returns:
- absolute path to the main script file for this plasmoid
Reimplemented from Plasma::ScriptEngine.
Definition at line 71 of file runnerscript.cpp.
void Plasma::RunnerScript::match | ( | Plasma::RunnerContext & | search | ) | [virtual] |
Called when the script should create QueryMatch instances through RunnerContext::addInformationalMatch, RunnerContext::addExactMatch, and RunnerContext::addPossibleMatch.
Definition at line 55 of file runnerscript.cpp.
const Package * Plasma::RunnerScript::package | ( | ) | const [protected, virtual] |
- Returns:
- the Package associated with this plasmoid which can be used to request resources, such as images and interface files.
Reimplemented from Plasma::ScriptEngine.
Definition at line 66 of file runnerscript.cpp.
void Plasma::RunnerScript::run | ( | const Plasma::RunnerContext & | search, | |
const Plasma::QueryMatch & | action | |||
) | [virtual] |
Called whenever an exact or possible match associated with this runner is triggered.
Definition at line 60 of file runnerscript.cpp.
AbstractRunner * Plasma::RunnerScript::runner | ( | ) | const |
Returns the Plasma::AbstractRunner associated with this script component.
Definition at line 50 of file runnerscript.cpp.
void Plasma::RunnerScript::setRunner | ( | AbstractRunner * | runner | ) |
Sets the Plasma::AbstractRunner associated with this RunnerScript.
Definition at line 45 of file runnerscript.cpp.
The documentation for this class was generated from the following files: