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.
Methods | |
__init__ (self, QObject parent=0) | |
QString | mainScript (self) |
match (self, Plasma.RunnerContext search) | |
Plasma.Package | package (self) |
run (self, Plasma.RunnerContext search, Plasma.QueryMatch action) | |
Plasma.AbstractRunner | runner (self) |
setRunner (self, Plasma.AbstractRunner runner) |
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.
QString mainScript | ( | self ) |
- Returns:
- absolute path to the main script file for this plasmoid
match | ( | self, | ||
Plasma.RunnerContext | search | |||
) |
Called when the script should create QueryMatch instances through RunnerContext.addInformationalMatch, RunnerContext.addExactMatch, and RunnerContext.addPossibleMatch.
Plasma.Package package | ( | self ) |
- Returns:
- the Package associated with this plasmoid which can be used to request resources, such as images and interface files.
run | ( | self, | ||
Plasma.RunnerContext | search, | |||
Plasma.QueryMatch | action | |||
) |
Called whenever an exact or possible match associated with this runner is triggered.
Plasma.AbstractRunner runner | ( | self ) |
Returns the Plasma.AbstractRunner associated with this script component
setRunner | ( | self, | ||
Plasma.AbstractRunner | runner | |||
) |
Sets the Plasma.AbstractRunner associated with this RunnerScript