• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • sources
  • kde-4.12
  • kdelibs
  • plasma
runnermanager.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006 Aaron Seigo <aseigo@kde.org>
3  * Copyright (C) 2007 Ryan P. Bitanga <ryan.bitanga@gmail.com>
4  * Copyright (C) 2008 Jordi Polo <mumismo@gmail.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU Library General Public License as
8  * published by the Free Software Foundation; either version 2, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this program; if not, write to the
18  * Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef PLASMA_RUNNERMANAGER_H
23 #define PLASMA_RUNNERMANAGER_H
24 
25 #include <QtCore/QList>
26 #include <QtCore/QObject>
27 
28 #include <kplugininfo.h>
29 
30 #include <plasma/plasma_export.h>
31 #include "abstractrunner.h"
32 
33 class QAction;
34 class KConfigGroup;
35 
36 namespace Plasma
37 {
38  class QueryMatch;
39  class AbstractRunner;
40  class RunnerContext;
41  class RunnerManagerPrivate;
42 
49 class PLASMA_EXPORT RunnerManager : public QObject
50 {
51  Q_OBJECT
52 
53  public:
54  explicit RunnerManager(QObject *parent=0);
55  explicit RunnerManager(KConfigGroup &config, QObject *parent=0);
56  ~RunnerManager();
57 
63  AbstractRunner *runner(const QString &name) const;
64 
69  AbstractRunner *singleModeRunner() const;
70 
79  void setSingleModeRunnerId(const QString &id);
80 
85  QString singleModeRunnerId() const;
86 
91  bool singleMode() const;
92 
99  void setSingleMode(bool singleMode);
100 
107  QString runnerName(const QString &id) const;
108 
112  QList<AbstractRunner *> runners() const;
113 
118  QStringList singleModeAdvertisedRunnerIds() const;
119 
124  RunnerContext *searchContext() const;
125 
130  QList<QueryMatch> matches() const;
131 
136  void run(const QueryMatch &match);
137 
142  void run(const QString &id);
143 
147  QList<QAction*> actionsForMatch(const QueryMatch &match);
148 
152  QString query() const;
153 
157  void reloadConfiguration();
158 
165  void setAllowedRunners(const QStringList &runners);
166 
177  void loadRunner(const KService::Ptr service);
178 
188  void loadRunner(const QString &path);
189 
194  QStringList allowedRunners() const;
195 
200  QMimeData * mimeDataForMatch(const QueryMatch &match) const;
201 
206  QMimeData * mimeDataForMatch(const QString &id) const;
207 
219  static KPluginInfo::List listRunnerInfo(const QString &parentApp = QString());
220 
221  public Q_SLOTS:
229  void setupMatchSession();
230 
237  void matchSessionComplete();
238 
248  void launchQuery(const QString &term, const QString &runnerId);
249 
253  void launchQuery(const QString &term);
254 
264  bool execQuery(const QString &term, const QString &runnerName);
265 
269  bool execQuery(const QString &term);
270 
274  void reset();
275 
276  Q_SIGNALS:
280  void matchesChanged(const QList<Plasma::QueryMatch> &matches);
281 
286  void queryFinished();
287 
288  private:
289  Q_PRIVATE_SLOT(d, void scheduleMatchesChanged())
290  Q_PRIVATE_SLOT(d, void matchesChanged())
291  Q_PRIVATE_SLOT(d, void jobDone(ThreadWeaver::Job*))
292  Q_PRIVATE_SLOT(d, void unblockJobs())
293  Q_PRIVATE_SLOT(d, void runnerMatchingSuspended(bool))
294 
295  RunnerManagerPrivate * const d;
296 
297  friend class RunnerManagerPrivate;
298 };
299 
300 }
301 
302 #endif
abstractrunner.h
Plasma::AbstractRunner
An abstract base class for Plasma Runner plugins.
Definition: abstractrunner.h:63
QObject
Plasma::RunnerContext
The RunnerContext class provides information related to a search, including the search term...
Definition: runnercontext.h:46
Plasma::QueryMatch
A match returned by an AbstractRunner in response to a given RunnerContext.
Definition: querymatch.h:47
Plasma::RunnerManager
The RunnerManager class decides what installed runners are runnable, and their ratings.
Definition: runnermanager.h:49
plasma_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:34 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal