RunnerScript Class Reference
from PyKDE4.plasma import *
Inherits: Plasma.ScriptEngine → QObject
Namespace: Plasma.RunnerScript
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) |
| actionsForMatch (self, Plasma.QueryMatch match, [QAction] actions) |
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) |
| createRunOptions (self, QWidget widget) |
Plasma.DataEngine | dataEngine (self, QString name) |
KPluginInfo | description (self) |
QString | mainScript (self) |
| match (self, Plasma.RunnerContext search) |
Plasma.Package | package (self) |
| prepare (self) |
| reloadConfiguration (self) |
| removeAction (self, QString id) |
| run (self, Plasma.RunnerContext search, Plasma.QueryMatch action) |
Plasma.AbstractRunner | runner (self) |
KService.List | 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) |
| teardown (self) |
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.
- Signal syntax:
QObject.connect(source, SIGNAL("actionsForMatch(const Plasma::QueryMatch&, QList*)"), target_slot)
createRunOptions |
( |
self, |
|
|
|
QWidget |
widget |
|
) |
|
|
|
- Signal syntax:
QObject.connect(source, SIGNAL("createRunOptions(QWidget*)"), target_slot)
- 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.
- Signal syntax:
QObject.connect(source, SIGNAL("prepare()"), target_slot)
reloadConfiguration |
( |
|
self ) |
|
- Signal syntax:
QObject.connect(source, SIGNAL("reloadConfiguration()"), target_slot)
Called whenever an exact or possible match associated with this
runner is triggered.
Returns the Plasma.AbstractRunner associated with this script component
setHasRunOptions |
( |
self, |
|
|
|
bool |
hasRunOptions |
|
) |
|
|
|
Sets the Plasma.AbstractRunner associated with this RunnerScript
- Signal syntax:
QObject.connect(source, SIGNAL("teardown()"), target_slot)