Plasma
runnermanager.cpp
Go to the documentation of this file.
162 KService::List offers = KServiceTypeTrader::self()->query("Plasma/Runner", QString("[X-KDE-PluginInfo-Name] == '%1'").arg(singleModeRunnerId));
207 const bool selected = loadAll || (description.isPluginEnabled() && (noWhiteList || whiteList.contains(runnerName)));
209 const bool singleQueryModeEnabled = description.property("X-Plasma-AdvertiseSingleRunnerQueryMode").toBool();
215 //kDebug() << loadAll << description.isPluginEnabled() << noWhiteList << whiteList.contains(runnerName);
235 QObject::disconnect(job, SIGNAL(done(ThreadWeaver::Job*)), q, SLOT(jobDone(ThreadWeaver::Job*)));
269 AbstractRunner *runner = PluginLoader::pluginLoader()->loadRunner(service->property("X-KDE-PluginInfo-Name", QVariant::String).toString());
294 QObject::connect(runner, SIGNAL(matchingSuspended(bool)), q, SLOT(runnerMatchingSuspended(bool)));
717 term = d->currentSingleRunner->defaultSyntax()->exampleQueries().first().remove(QRegExp(":q:"));
iterator insert(const Key &key, const T &value)
static PluginLoader * pluginLoader()
Return the active plugin loader.
Definition: pluginloader.cpp:67
QStringList allowedRunners() const
Definition: runnermanager.cpp:486
AbstractRunner * singleModeRunner() const
Definition: runnermanager.cpp:522
QStringList singleModeAdvertisedRunnerIds() const
Definition: runnermanager.cpp:571
An abstract base class for Plasma Runner plugins.
Definition: abstractrunner.h:63
bool contains(const QString &str, Qt::CaseSensitivity cs) const
void setSingleMode(bool singleMode)
Sets whether or not the manager is in single mode.
Definition: runnermanager.cpp:543
void setupMatchSession()
Call this method when the runners should be prepared for a query session.
Definition: runnermanager.cpp:662
AbstractRunner * loadRunner(const QString &name)
Load a Runner plugin.
Definition: pluginloader.cpp:199
RunnerManager(QObject *parent=0)
Definition: runnermanager.cpp:441
const_iterator insert(const T &value)
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
void run(const RunnerContext &context) const
Requests this match to activae using the given context.
Definition: querymatch.cpp:273
void setAllowedRunners(const QStringList &runners)
Sets a whitelist for the plugins that can be loaded.
Definition: runnermanager.cpp:475
void reloadConfiguration()
Causes a reload of the current configuration.
Definition: runnermanager.cpp:469
void setSingleModeRunnerId(const QString &id)
Puts the manager into "single runner" mode using the given runner; if the runner does not exist or ca...
Definition: runnermanager.cpp:527
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
void loadRunner(const KService::Ptr service)
Attempts to add the AbstractRunner plugin represented by the KService passed in.
Definition: runnermanager.cpp:492
QList< AbstractRunner * > runners() const
Definition: runnermanager.cpp:566
bool isPluginVersionCompatible(unsigned int version)
Verifies that a plugin is compatible with plasma.
Definition: version.cpp:51
void matchesChanged(const QList< Plasma::QueryMatch > &matches)
Emitted each time a new match is added to the list.
int elapsed() const
QMimeData * mimeDataForMatch(const QueryMatch &match) const
Definition: runnermanager.cpp:641
QList< QueryMatch > matches() const
Retrieves all available matches found so far for the previously launched query.
Definition: runnermanager.cpp:591
void prepare()
This signal is emitted when matching is about to commence, giving runners an opportunity to prepare t...
bool isEmpty() const
bool isEmpty() const
QString trimmed() const
RunnerContext * searchContext() const
Retrieves the current context.
Definition: runnermanager.cpp:585
bool isMatchingSuspended() const
Definition: abstractrunner.cpp:367
The RunnerContext class provides information related to a search, including the search term...
Definition: runnercontext.h:46
void setParent(QObject *parent)
bool contains(QChar ch, Qt::CaseSensitivity cs) const
bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QGenericReturnArgument ret, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
bool contains(const T &value) const
A match returned by an AbstractRunner in response to a given RunnerContext.
Definition: querymatch.h:47
QString singleModeRunnerId() const
Definition: runnermanager.cpp:533
KPluginInfo::List listRunnerInfo(const QString &parentApp=QString())
Returns a list of all known Runner implementations.
Definition: pluginloader.cpp:300
bool isEmpty() const
void launchQuery(const QString &term, const QString &runnerId)
Launch a query, this will create threads and return inmediately.
Definition: runnermanager.cpp:707
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 start()
void performMatch(Plasma::RunnerContext &context)
Triggers a call to match.
Definition: abstractrunner.cpp:123
AbstractRunner * runner(const QString &name) const
Finds and returns a loaded runner or NULL.
Definition: runnermanager.cpp:513
QString runnerName(const QString &id) const
Returns the translated name of a runner.
Definition: runnermanager.cpp:576
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QList< QAction * > actionsForMatch(const QueryMatch &match)
Retrieves the list of actions, if any, for a match.
Definition: runnermanager.cpp:625
void matchSessionComplete()
Call this method when the query session is finished for the time being.
Definition: runnermanager.cpp:692
static KPluginInfo::List listRunnerInfo(const QString &parentApp=QString())
Returns a list of all known Runner implementations.
Definition: runnermanager.cpp:657
bool execQuery(const QString &term, const QString &runnerName)
Execute a query, this method will only return when the query is executed This means that the method m...
Definition: runnermanager.cpp:769
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:12 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:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.