Plasma
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 PLASMA_RUNNERMANAGER_H
00023 #define PLASMA_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 QAction;
00032 class KConfigGroup;
00033
00034 namespace Plasma
00035 {
00036 class QueryMatch;
00037 class AbstractRunner;
00038 class RunnerContext;
00039 class RunnerManagerPrivate;
00040
00047 class PLASMA_EXPORT RunnerManager : public QObject
00048 {
00049 Q_OBJECT
00050
00051 public:
00052 explicit RunnerManager(QObject *parent=0);
00053 explicit RunnerManager(KConfigGroup &config, QObject *parent=0);
00054 ~RunnerManager();
00055
00061 AbstractRunner *runner(const QString &name) const;
00062
00067 RunnerContext *searchContext() const;
00068
00073 QList<QueryMatch> matches() const;
00074
00079 void run(const QueryMatch &match);
00080
00085 void run(const QString &id);
00086
00090 QList<QAction*> actionsForMatch(const QueryMatch &match);
00091
00095 QString query() const;
00096
00100 void reloadConfiguration();
00101
00102 public Q_SLOTS:
00111 void launchQuery(const QString &term, const QString &runnerName);
00112
00116 void launchQuery(const QString &term);
00117
00127 bool execQuery(const QString &term, const QString &runnerName);
00128
00132 bool execQuery(const QString &term);
00133
00137 void reset();
00138
00139 Q_SIGNALS:
00143 void matchesChanged(const QList<Plasma::QueryMatch> &matches);
00144
00145 private:
00146 Q_PRIVATE_SLOT(d, void scheduleMatchesChanged())
00147 Q_PRIVATE_SLOT(d, void matchesChanged())
00148 Q_PRIVATE_SLOT(d, void jobDone(ThreadWeaver::Job*))
00149
00150 RunnerManagerPrivate * const d;
00151
00152 friend class RunnerManagerPrivate;
00153 };
00154
00155 }
00156
00157 #endif