• 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
querymatch.h
Go to the documentation of this file.
1 /*
2  * Copyright 2006-2007 Aaron Seigo <aseigo@kde.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Library General Public License as
6  * published by the Free Software Foundation; either version 2, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef PLASMA_QUERYMATCH_H
21 #define PLASMA_QUERYMATCH_H
22 
23 #include <QtCore/QList>
24 #include <QtCore/QSharedDataPointer>
25 
26 #include <plasma/plasma_export.h>
27 
28 class QAction;
29 class QIcon;
30 class QString;
31 class QVariant;
32 class QWidget;
33 
34 namespace Plasma
35 {
36 
37 class RunnerContext;
38 class AbstractRunner;
39 class QueryMatchPrivate;
40 
47 class PLASMA_EXPORT QueryMatch
48 {
49  public:
53  enum Type {
54  NoMatch = 0,
55  CompletionMatch = 10,
56  PossibleMatch = 30,
57  InformationalMatch = 50,
59  HelperMatch = 70,
67  ExactMatch = 100
68  };
69 
76  explicit QueryMatch(AbstractRunner *runner);
77 
81  QueryMatch(const QueryMatch &other);
82 
83  ~QueryMatch();
84  QueryMatch &operator=(const QueryMatch &other);
85  bool operator==(const QueryMatch &other) const;
86  bool operator!=(const QueryMatch &other) const;
87  bool operator<(const QueryMatch &other) const;
88 
89 
93  AbstractRunner *runner() const;
94 
99  bool isValid() const;
100 
104  void setType(Type type);
105 
109  Type type() const;
110 
117  void setRelevance(qreal relevance);
118 
125  qreal relevance() const;
126 
134  void run(const RunnerContext &context) const;
135 
145  void setData(const QVariant &data);
146 
150  QVariant data() const;
151 
161  void setId(const QString &id);
162 
171  QString id() const;
172 
179  void setText(const QString &text);
180 
184  QString text() const;
185 
192  void setSubtext(const QString &text);
193 
197  QString subtext() const;
198 
204  void setIcon(const QIcon &icon);
205 
209  QIcon icon() const;
210 
216  void setEnabled(bool enable);
217 
221  bool isEnabled() const;
222 
226  QAction* selectedAction() const;
227 
231  void setSelectedAction(QAction *action);
232 
237  bool hasConfigurationInterface() const;
238 
247  void createConfigurationInterface(QWidget *parent);
248 
249  private:
250  QSharedDataPointer<QueryMatchPrivate> d;
251 };
252 
253 }
254 
255 #endif
QWidget
Plasma::AbstractRunner
An abstract base class for Plasma Runner plugins.
Definition: abstractrunner.h:63
Plasma::QueryMatch::Type
Type
The type of match.
Definition: querymatch.h:53
Plasma::RunnerContext
The RunnerContext class provides information related to a search, including the search term...
Definition: runnercontext.h:46
Plasma::type
static QScriptValue type(QScriptContext *ctx, QScriptEngine *eng)
Definition: easingcurve.cpp:63
Plasma::QueryMatch
A match returned by an AbstractRunner in response to a given RunnerContext.
Definition: querymatch.h:47
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