Plasma
abstractrunner.cpp
Go to the documentation of this file.
270 KService::List AbstractRunner::serviceQuery(const QString &serviceType, const QString &constraint) const
410 const QString path = KStandardDirs::locate("data", "plasma/runners/" + runnerDescription.pluginName() + '/');
413 kDebug() << "Could not create a(n)" << api << "ScriptEngine for the" << runnerDescription.name() << "Runner.";
void suspendMatching(bool suspend)
Sets whether or not the runner is available for match requests.
Definition: abstractrunner.cpp:372
void addSyntax(const RunnerSyntax &syntax)
Adds a registered syntax that this runner understands.
Definition: abstractrunner.cpp:97
QAction * addAction(const QString &id, const QIcon &icon, const QString &text)
Creates and then adds an action to the action registry.
Definition: abstractrunner.cpp:172
void init()
Reimplement this slot to run any initialization routines on first load.
Definition: abstractrunner.cpp:352
QHash< QString, QAction * > actions() const
Returns all registered actions.
Definition: abstractrunner.cpp:195
int size() const
An abstract base class for Plasma Runner plugins.
Definition: abstractrunner.h:63
QAction * action(const QString &id) const
Returns the action associated with the id.
Definition: abstractrunner.cpp:190
QMimeData * mimeDataForMatch(const Plasma::QueryMatch *match)
Reimplement this slot if you want your runner to support serialization and drag and drop...
Definition: abstractrunner.cpp:206
void removeAction(const QString &id)
Removes the action from the action registry.
Definition: abstractrunner.cpp:184
AppletScript * loadScriptEngine(const QString &language, Applet *applet)
Loads an Applet script engine for the given language.
Definition: scriptengine.cpp:206
virtual void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match)
Called whenever an exact or possible match associated with this runner is triggered.
Definition: abstractrunner.cpp:280
static QMutex * bigLock()
Access to a shared lock that all runners (and code that manages/interacts with them) can share to pro...
Definition: abstractrunner.cpp:275
QString description() const
virtual QList< QAction * > actionsForMatch(const Plasma::QueryMatch &match)
A given match can have more than action that can be performed on it.
Definition: abstractrunner.cpp:162
int elapsed() const
QString id() const
Definition: runnersyntax.h:40
void setSpeed(Speed newSpeed)
Sets the nominal speed of the runner.
Definition: abstractrunner.cpp:243
virtual void reloadConfiguration()
Signal runner to reload its configuration.
Definition: abstractrunner.cpp:90
AbstractRunner(QObject *parent=0, const QString &path=QString())
Definition: abstractrunner.cpp:48
QString objectName() const
bool isEmpty() const
KService::List serviceQuery(const QString &serviceType, const QString &constraint=QString()) const
Definition: abstractrunner.cpp:270
void setDefaultSyntax(const RunnerSyntax &syntax)
Set syntax as the default syntax for the runner; the default syntax will be substituted to the empty ...
Definition: abstractrunner.cpp:102
int restart()
bool isMatchingSuspended() const
Definition: abstractrunner.cpp:367
void setIgnoredTypes(RunnerContext::Types types)
Sets the types this runner will ignore.
Definition: abstractrunner.cpp:265
KConfigGroup config() const
Provides access to the runner's configuration object.
Definition: abstractrunner.cpp:79
The RunnerContext class provides information related to a search, including the search term...
Definition: runnercontext.h:46
static QScriptValue toString(QScriptContext *ctx, QScriptEngine *eng)
Definition: easingcurve.cpp:57
QList< RunnerSyntax > syntaxes() const
Definition: abstractrunner.cpp:113
bool hasRunOptions()
If the runner has options that the user can interact with to modify what happens when run or one of t...
Definition: abstractrunner.cpp:212
Q_INVOKABLE DataEngine * dataEngine(const QString &name) const
Loads the given DataEngine.
Definition: abstractrunner.cpp:362
A match returned by an AbstractRunner in response to a given RunnerContext.
Definition: querymatch.h:47
RunnerSyntax * defaultSyntax() const
Definition: abstractrunner.cpp:118
RunnerContext::Types ignoredTypes() const
Returns the OR'ed value of all the Information types (as defined in RunnerContext::Type) this runner ...
Definition: abstractrunner.cpp:260
void setPriority(Priority newPriority)
Sets the priority of the runner.
Definition: abstractrunner.cpp:255
void setHasRunOptions(bool hasRunOptions)
Sets whether or not the runner has options for matches.
Definition: abstractrunner.cpp:217
virtual void createRunOptions(QWidget *widget)
If hasRunOptions() returns true, this method may be called to get a widget displaying the options the...
Definition: abstractrunner.cpp:222
void performMatch(Plasma::RunnerContext &context)
Triggers a call to match.
Definition: abstractrunner.cpp:123
void setSyntaxes(const QList< RunnerSyntax > &syns)
Sets the list of syntaxes; passing in an empty list effectively clears the syntaxes.
Definition: abstractrunner.cpp:108
PackageStructure::Ptr packageStructure(const QString &language, ComponentType type)
Loads an appropriate PackageStructure for the given language and type.
Definition: scriptengine.cpp:274
const Package * package() const
Accessor for the associated Package object if any.
Definition: abstractrunner.cpp:346
QIcon icon() const
virtual void match(Plasma::RunnerContext &context)
This is the main query method.
Definition: abstractrunner.cpp:287
QString name() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.