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

Plasma

  • 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 
77  explicit QueryMatch(AbstractRunner *runner);
78 
82  QueryMatch(const QueryMatch &other);
83 
84  ~QueryMatch();
85  QueryMatch &operator=(const QueryMatch &other);
86  bool operator==(const QueryMatch &other) const;
87  bool operator!=(const QueryMatch &other) const;
88  bool operator<(const QueryMatch &other) const;
89 
90 
94  AbstractRunner *runner() const;
95 
100  bool isValid() const;
101 
105  void setType(Type type);
106 
110  Type type() const;
111 
118  void setRelevance(qreal relevance);
119 
126  qreal relevance() const;
127 
135  void run(const RunnerContext &context) const;
136 
146  void setData(const QVariant &data);
147 
151  QVariant data() const;
152 
162  void setId(const QString &id);
163 
172  QString id() const;
173 
180  void setText(const QString &text);
181 
185  QString text() const;
186 
193  void setSubtext(const QString &text);
194 
198  QString subtext() const;
199 
205  void setIcon(const QIcon &icon);
206 
210  QIcon icon() const;
211 
217  void setEnabled(bool enable);
218 
222  bool isEnabled() const;
223 
227  QAction* selectedAction() const;
228 
232  void setSelectedAction(QAction *action);
233 
238  bool hasConfigurationInterface() const;
239 
248  void createConfigurationInterface(QWidget *parent);
249 
250  private:
251  QSharedDataPointer<QueryMatchPrivate> d;
252 };
253 
254 }
255 
256 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat May 18 2013 11:37:52 by doxygen 1.8.3.1 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-4.10.3 API Reference

Skip menu "kdelibs-4.10.3 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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