• Skip to content
  • Skip to link menu
KDE 4.2 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 QVariant;
00031 class QString;
00032 
00033 namespace Plasma
00034 {
00035 
00036 class RunnerContext;
00037 class AbstractRunner;
00038 class QueryMatchPrivate;
00039 
00046 class PLASMA_EXPORT QueryMatch
00047 {
00048     public:
00052         enum Type {
00053             NoMatch = 0,         
00054             CompletionMatch = 10, 
00055             PossibleMatch = 30,   
00056             InformationalMatch = 50, 
00058             HelperMatch = 70, 
00066             ExactMatch = 100 
00067         };
00068 
00076         explicit QueryMatch(AbstractRunner *runner);
00077 
00081         QueryMatch(const QueryMatch &other);
00082 
00083         ~QueryMatch();
00084 
00085         bool isValid() const;
00086 
00090         void setType(Type type);
00091 
00095         Type type() const;
00096 
00103         void setRelevance(qreal relevance);
00104 
00111         qreal relevance() const;
00112 
00116         AbstractRunner *runner() const;
00117 
00126         QString id() const;
00127 
00128         QString text() const;
00129         QString subtext() const;
00130         QVariant data() const;
00131         QIcon icon() const;
00132         bool isEnabled() const;
00133 
00134         bool operator<(const QueryMatch &other) const;
00135         QueryMatch &operator=(const QueryMatch &other);
00136 
00144         void run(const RunnerContext &context) const;
00145 
00155         void setData(const QVariant &data);
00156 
00166         void setId(const QString &id);
00167 
00168         void setText(const QString &text);
00169         void setSubtext(const QString &text);
00170         void setIcon(const QIcon &icon);
00171         void setEnabled(bool enable);
00172 
00176         QAction* selectedAction() const;
00180         void setSelectedAction(QAction *action);
00181 
00182     private:
00183         QSharedDataPointer<QueryMatchPrivate> d;
00184 };
00185 
00186 }
00187 
00188 #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
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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