RunnerScript Class Reference
from PyKDE4.plasma import *
Inherits: Plasma.ScriptEngine → QObject
Namespace: Plasma
Detailed Description
RunnerScript plasma/scripting/runnerscript.h <Plasma/Scripting/RunnerScript>
Provides a restricted interface for scripting a runner.
Signals |
| actionsForMatch (Plasma.QueryMatch match, [QAction] actions) |
| createRunOptions (QWidget widget) |
| prepare () |
| reloadConfiguration () |
| teardown () |
Methods |
| __init__ (self, QObject parent=0) |
QAction | action (self, QString id) |
{QString:QAction} | actions (self) |
QAction | addAction (self, QString id, QIcon icon, QString text) |
| addAction (self, QString id, QAction action) |
| addSyntax (self, Plasma.RunnerSyntax syntax) |
| clearActions (self) |
KConfigGroup | config (self) |
Plasma.DataEngine | dataEngine (self, QString name) |
KPluginInfo | description (self) |
QString | mainScript (self) |
| match (self, Plasma.RunnerContext search) |
Plasma.Package | package (self) |
| removeAction (self, QString id) |
| run (self, Plasma.RunnerContext search, Plasma.QueryMatch action) |
Plasma.AbstractRunner | runner (self) |
[KSharedPtr] | serviceQuery (self, QString serviceType, QString constraint=QString()) |
| setHasRunOptions (self, bool hasRunOptions) |
| setIgnoredTypes (self, Plasma.RunnerContext.Types types) |
| setPriority (self, Plasma.AbstractRunner.Priority newPriority) |
| setRunner (self, Plasma.AbstractRunner runner) |
| setSpeed (self, Plasma.AbstractRunner.Speed newSpeed) |
| setSyntaxes (self, [Plasma.RunnerSyntax] syns) |
Signal Documentation
- Signal syntax:
QObject.connect(source, SIGNAL("actionsForMatch(const Plasma::QueryMatch&, QList*)"), target_slot)
createRunOptions |
( |
QWidget |
widget |
|
) |
|
|
|
- Signal syntax:
QObject.connect(source, SIGNAL("createRunOptions(QWidget*)"), target_slot)
- Signal syntax:
QObject.connect(source, SIGNAL("prepare()"), target_slot)
- Signal syntax:
QObject.connect(source, SIGNAL("reloadConfiguration()"), target_slot)
- Signal syntax:
QObject.connect(source, SIGNAL("teardown()"), target_slot)
Method Documentation
__init__ |
( |
self, |
|
|
|
QObject |
parent=0 |
|
) |
|
|
|
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.
- Returns:
- a Plasma.DataEngine matchin name
- Since:
- 4.4
- Returns:
- the KPluginInfo associated with this plasmoid
- Returns:
- absolute path to the main script file for this plasmoid
Called when the script should create QueryMatch instances through
RunnerContext.addInformationalMatch, RunnerContext.addExactMatch, and
RunnerContext.addPossibleMatch.
- Returns:
- the Package associated with this plasmoid which can
be used to request resources, such as images and
interface files.
Called whenever an exact or possible match associated with this
runner is triggered.
Returns the Plasma.AbstractRunner associated with this script component
[KSharedPtr] serviceQuery |
( |
self, |
|
|
|
QString |
serviceType, |
|
|
QString |
constraint=QString() |
|
) |
|
|
|
setHasRunOptions |
( |
self, |
|
|
|
bool |
hasRunOptions |
|
) |
|
|
|
Sets the Plasma.AbstractRunner associated with this RunnerScript