libplasma
runnermanager.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef RUNNERMANAGER_H
00023 #define RUNNERMANAGER_H
00024
00025 #include <QtCore/QList>
00026 #include <QtCore/QObject>
00027
00028 #include <plasma/plasma_export.h>
00029 #include "abstractrunner.h"
00030
00031 class KConfigGroup;
00032
00033 namespace Plasma
00034 {
00035 class QueryMatch;
00036 class AbstractRunner;
00037 class RunnerContext;
00038 class RunnerManagerPrivate;
00039
00044 class PLASMA_EXPORT RunnerManager : public QObject
00045 {
00046 Q_OBJECT
00047
00048
00049 public:
00050 explicit RunnerManager(QObject *parent=0);
00051 explicit RunnerManager(KConfigGroup& config, QObject *parent=0);
00052 ~RunnerManager();
00053
00059 AbstractRunner* runner(const QString &name) const;
00060
00065 RunnerContext* searchContext() const;
00066
00071 QList<QueryMatch> matches() const;
00072
00077 void run(const QueryMatch &match);
00078
00083 void run(const QString &id);
00084
00088 QString query() const;
00089
00093 void reloadConfiguration();
00094
00095 public Q_SLOTS:
00104 void launchQuery(const QString &term, const QString & runnerName);
00105
00109 void launchQuery(const QString &term);
00110
00120 bool execQuery(const QString &term, const QString & runnerName);
00121
00125 bool execQuery(const QString &term);
00126
00130 void reset();
00131
00132 Q_SIGNALS:
00136 void matchesChanged(const QList<Plasma::QueryMatch> &matches);
00137
00138 private:
00139 Q_PRIVATE_SLOT(d, void scheduleMatchesChanged())
00140 Q_PRIVATE_SLOT(d, void matchesChanged())
00141 Q_PRIVATE_SLOT(d, void jobDone(ThreadWeaver::Job*))
00142
00143 RunnerManagerPrivate * const d;
00144
00145 friend class RunnerManagerPrivate;
00146 };
00147
00148 }
00149
00150 #endif