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

Plasma

runnercontext.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_RUNNERCONTEXT_H
00021 #define PLASMA_RUNNERCONTEXT_H
00022 
00023 #include <QtCore/QList>
00024 #include <QtCore/QObject>
00025 #include <QtCore/QSharedDataPointer>
00026 
00027 #include <plasma/plasma_export.h>
00028 
00029 class KCompletion;
00030 
00031 namespace Plasma
00032 {
00033 
00034 class QueryMatch;
00035 class AbstractRunner;
00036 class RunnerContextPrivate;
00037 
00045 class PLASMA_EXPORT RunnerContext : public QObject
00046 {
00047     Q_OBJECT
00048 
00049     public:
00050         enum Type {
00051             None = 0,
00052             UnknownType = 1,
00053             Directory = 2,
00054             File = 4,
00055             NetworkLocation = 8,
00056             Executable = 16,
00057             ShellCommand = 32,
00058             Help = 64,
00059             FileSystem = Directory | File | Executable | ShellCommand
00060         };
00061 
00062         Q_DECLARE_FLAGS(Types, Type)
00063 
00064         explicit RunnerContext(QObject *parent = 0);
00065 
00069         explicit RunnerContext(RunnerContext &other, QObject *parent = 0);
00070 
00071         ~RunnerContext();
00072 
00077         void reset();
00078 
00083         void setQuery(const QString &term);
00084 
00088         QString query() const;
00089 
00094         Type type() const;
00095 
00103         QString mimeType() const;
00104 
00112         // trueg: what do we need the term for? It is stored in the context anyway! Plus: matches() does not have a term parameter!
00113         //        plus: it is Q_UNUSED
00114         bool addMatches(const QString &term, const QList<QueryMatch> &matches);
00115 
00126         // trueg: what do we need the term for? It is stored in the context anyway! Plus: matches() does not have a term parameter!
00127         //        plus: it is Q_UNUSED
00128         bool addMatch(const QString &term, const QueryMatch &match);
00129 
00135         QList<QueryMatch> matches() const;
00136 
00144         QueryMatch match(const QString &id) const;
00145 
00146     Q_SIGNALS:
00147         void matchesChanged();
00148 
00149     private:
00150         QExplicitlySharedDataPointer<RunnerContextPrivate> d;
00151 };
00152 
00153 }
00154 
00155 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::RunnerContext::Types)
00156 
00157 #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