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

libplasma

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 QUERYMATCH_H
00021 #define QUERYMATCH_H
00022 
00023 #include <QtCore/QSharedDataPointer>
00024 
00025 #include <plasma/plasma_export.h>
00026 
00027 class QIcon;
00028 class QVariant;
00029 class QString;
00030 
00031 namespace Plasma
00032 {
00033 
00034 class RunnerContext;
00035 class AbstractRunner;
00036 class QueryMatchPrivate;
00037 
00043 class PLASMA_EXPORT QueryMatch
00044 {
00045     public:
00049         enum Type { NoMatch = 0 ,
00050                     CompletionMatch = 10 ,
00051                     PossibleMatch = 30 ,
00052                     InformationalMatch = 50 ,
00054                     HelperMatch = 70 ,
00062                     ExactMatch = 100 };
00063 
00064 
00072         explicit QueryMatch(AbstractRunner *runner);
00073 
00077         QueryMatch(const QueryMatch &other);
00078 
00079         ~QueryMatch();
00080 
00081         bool isValid() const;
00082 
00086         void setType(Type type);
00087 
00091         Type type() const;
00092 
00099         void setRelevance(qreal relevance);
00100 
00107         qreal relevance() const;
00108 
00112         AbstractRunner* runner() const;
00113 
00122         QString id() const;
00123 
00124         QString text() const;
00125         QString subtext() const;
00126         QVariant data() const;
00127         QIcon icon() const;
00128         bool isEnabled() const;
00129 
00130         bool operator<(const QueryMatch& other) const;
00131         QueryMatch& operator=(const QueryMatch &other);
00132 
00138         void run(const RunnerContext &context) const;
00139 
00149         void setData(const QVariant& data);
00150 
00160         void setId(const QString &id);
00161 
00162         void setText(const QString& text);
00163         void setSubtext(const QString& text);
00164         void setIcon(const QIcon& icon);
00165         void setEnabled(bool enable);
00166 
00167     private:
00168         QSharedDataPointer<QueryMatchPrivate> d;
00169 };
00170 
00171 }
00172 
00173 #endif

libplasma

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

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
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