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

Plasma

querymatch.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2006-2007 Aaron Seigo <aseigo@kde.org>
00003  *
00004  *   This program is free software; you can redistribute it and/or modify
00005  *   it under the terms of the GNU Library General Public License as
00006  *   published by the Free Software Foundation; either version 2, or
00007  *   (at your option) any later version.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details
00013  *
00014  *   You should have received a copy of the GNU Library General Public
00015  *   License along with this program; if not, write to the
00016  *   Free Software Foundation, Inc.,
00017  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018  */
00019 
00020 #ifndef PLASMA_QUERYMATCH_H
00021 #define PLASMA_QUERYMATCH_H
00022 
00023 #include <QtCore/QList>
00024 #include <QtCore/QSharedDataPointer>
00025 
00026 #include <plasma/plasma_export.h>
00027 
00028 class QAction;
00029 class QIcon;
00030 class QString;
00031 class QVariant;
00032 class QWidget;
00033 
00034 namespace Plasma
00035 {
00036 
00037 class RunnerContext;
00038 class AbstractRunner;
00039 class QueryMatchPrivate;
00040 
00047 class PLASMA_EXPORT QueryMatch
00048 {
00049     public:
00053         enum Type {
00054             NoMatch = 0,         
00055             CompletionMatch = 10, 
00056             PossibleMatch = 30,   
00057             InformationalMatch = 50, 
00059             HelperMatch = 70, 
00067             ExactMatch = 100 
00068         };
00069 
00077         explicit QueryMatch(AbstractRunner *runner);
00078 
00082         QueryMatch(const QueryMatch &other);
00083 
00084         ~QueryMatch();
00085         QueryMatch &operator=(const QueryMatch &other);
00086         bool operator<(const QueryMatch &other) const;
00087 
00088 
00092         AbstractRunner *runner() const;
00093 
00098         bool isValid() const;
00099 
00103         void setType(Type type);
00104 
00108         Type type() const;
00109 
00116         void setRelevance(qreal relevance);
00117 
00124         qreal relevance() const;
00125 
00133         void run(const RunnerContext &context) const;
00134 
00144         void setData(const QVariant &data);
00145 
00149         QVariant data() const;
00150 
00160         void setId(const QString &id);
00161 
00170         QString id() const;
00171 
00178         void setText(const QString &text);
00179 
00183         QString text() const;
00184 
00191         void setSubtext(const QString &text);
00192 
00196         QString subtext() const;
00197 
00203         void setIcon(const QIcon &icon);
00204 
00208         QIcon icon() const;
00209 
00215         void setEnabled(bool enable);
00216 
00220         bool isEnabled() const;
00221 
00225         QAction* selectedAction() const;
00226 
00230         void setSelectedAction(QAction *action);
00231 
00236         bool hasConfigurationInterface() const;
00237 
00246         void createConfigurationInterface(QWidget *parent);
00247 
00248     private:
00249         QSharedDataPointer<QueryMatchPrivate> d;
00250 };
00251 
00252 }
00253 
00254 #endif

Plasma

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal