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

Signals | |
| void | actionsForMatch (const Plasma::QueryMatch &match, QList< QAction * > *actions) |
| void | createRunOptions (QWidget *widget) |
| void | prepare () |
| void | reloadConfiguration () |
| void | teardown () |
Public Member Functions | |
| RunnerScript (QObject *parent=0) | |
| ~RunnerScript () | |
| virtual void | match (Plasma::RunnerContext &search) |
| virtual void | run (const Plasma::RunnerContext &search, const Plasma::QueryMatch &action) |
| AbstractRunner * | runner () const |
| void | setRunner (AbstractRunner *runner) |
Protected Member Functions | |
| QAction * | action (const QString &id) const |
| QHash< QString, QAction * > | actions () const |
| QAction * | addAction (const QString &id, const QIcon &icon, const QString &text) |
| void | addAction (const QString &id, QAction *action) |
| void | addSyntax (const RunnerSyntax &syntax) |
| void | clearActions () |
| KConfigGroup | config () const |
| DataEngine * | dataEngine (const QString &name) |
| KPluginInfo | description () const |
| QString | mainScript () const |
| const Package * | package () const |
| void | removeAction (const QString &id) |
| KService::List | serviceQuery (const QString &serviceType, const QString &constraint=QString()) const |
| void | setHasRunOptions (bool hasRunOptions) |
| void | setIgnoredTypes (RunnerContext::Types types) |
| void | setPriority (AbstractRunner::Priority newPriority) |
| void | setSpeed (AbstractRunner::Speed newSpeed) |
| void | setSyntaxes (const QList< RunnerSyntax > &syns) |
Detailed Description
Provides a restricted interface for scripting a runner.
Definition at line 40 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 36 of file runnerscript.cpp.
| Plasma::RunnerScript::~RunnerScript | ( | ) |
Definition at line 42 of file runnerscript.cpp.
Member Function Documentation
| QAction * Plasma::RunnerScript::action | ( | const QString & | id | ) | const [protected] |
Definition at line 146 of file runnerscript.cpp.
| QHash< QString, QAction * > Plasma::RunnerScript::actions | ( | ) | const [protected] |
Definition at line 154 of file runnerscript.cpp.
| void Plasma::RunnerScript::actionsForMatch | ( | const Plasma::QueryMatch & | match, |
| QList< QAction * > * | actions | ||
| ) | [signal] |
| QAction * Plasma::RunnerScript::addAction | ( | const QString & | id, |
| const QIcon & | icon, | ||
| const QString & | text | ||
| ) | [protected] |
Definition at line 124 of file runnerscript.cpp.
| void Plasma::RunnerScript::addAction | ( | const QString & | id, |
| QAction * | action | ||
| ) | [protected] |
Definition at line 132 of file runnerscript.cpp.
| void Plasma::RunnerScript::addSyntax | ( | const RunnerSyntax & | syntax | ) | [protected] |
Definition at line 169 of file runnerscript.cpp.
| void Plasma::RunnerScript::clearActions | ( | ) | [protected] |
Definition at line 162 of file runnerscript.cpp.
| KConfigGroup Plasma::RunnerScript::config | ( | ) | const [protected] |
Definition at line 79 of file runnerscript.cpp.
| void Plasma::RunnerScript::createRunOptions | ( | QWidget * | widget | ) | [signal] |
| DataEngine * Plasma::RunnerScript::dataEngine | ( | const QString & | name | ) | [protected] |
| KPluginInfo Plasma::RunnerScript::description | ( | ) | const [protected] |
- Returns:
- the KPluginInfo associated with this plasmoid
Definition at line 188 of file runnerscript.cpp.
| 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 193 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 59 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 183 of file runnerscript.cpp.
| void Plasma::RunnerScript::prepare | ( | ) | [signal] |
| void Plasma::RunnerScript::reloadConfiguration | ( | ) | [signal] |
| void Plasma::RunnerScript::removeAction | ( | const QString & | id | ) | [protected] |
Definition at line 139 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 64 of file runnerscript.cpp.
| AbstractRunner * Plasma::RunnerScript::runner | ( | ) | const |
Returns the Plasma::AbstractRunner associated with this script component.
Definition at line 54 of file runnerscript.cpp.
| KService::List Plasma::RunnerScript::serviceQuery | ( | const QString & | serviceType, |
| const QString & | constraint = QString() |
||
| ) | const [protected] |
Definition at line 115 of file runnerscript.cpp.
| void Plasma::RunnerScript::setHasRunOptions | ( | bool | hasRunOptions | ) | [protected] |
Definition at line 94 of file runnerscript.cpp.
| void Plasma::RunnerScript::setIgnoredTypes | ( | RunnerContext::Types | types | ) | [protected] |
Definition at line 87 of file runnerscript.cpp.
| void Plasma::RunnerScript::setPriority | ( | AbstractRunner::Priority | newPriority | ) | [protected] |
Definition at line 108 of file runnerscript.cpp.
| void Plasma::RunnerScript::setRunner | ( | AbstractRunner * | runner | ) |
Sets the Plasma::AbstractRunner associated with this RunnerScript.
Definition at line 47 of file runnerscript.cpp.
| void Plasma::RunnerScript::setSpeed | ( | AbstractRunner::Speed | newSpeed | ) | [protected] |
Definition at line 101 of file runnerscript.cpp.
| void Plasma::RunnerScript::setSyntaxes | ( | const QList< RunnerSyntax > & | syns | ) | [protected] |
Definition at line 176 of file runnerscript.cpp.
| void Plasma::RunnerScript::teardown | ( | ) | [signal] |
The documentation for this class was generated from the following files:
KDE 4.6 API Reference