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

NepomukDaemons

query.h

Go to the documentation of this file.
00001 /*
00002    This file is part of the Nepomuk KDE project.
00003    Copyright (C) 2008 Sebastian Trueg <trueg@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License version 2 as published by the Free Software Foundation.
00008 
00009    This library 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 GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
00018  */
00019 
00020 #ifndef _NEPOMUK_SEARCH_QUERY_H_
00021 #define _NEPOMUK_SEARCH_QUERY_H_
00022 
00023 #include <QtCore/QSharedDataPointer>
00024 #include <QtCore/QList>
00025 #include <QtCore/QPair>
00026 #include <QtCore/QDebug>
00027 
00028 #include <nepomuk/nepomuk_export.h>
00029 
00030 class QUrl;
00031 
00032 namespace Nepomuk {
00033     namespace Search {
00034 
00035         class Term;
00036 
00047         class NEPOMUK_EXPORT Query
00048         {
00049         public:
00050             enum Type {
00051                 InvalidQuery,
00052                 PlainQuery,
00053                 SPARQLQuery
00054             };
00055 
00059             Query();
00060 
00065             Query( const Term& term );
00066 
00070             explicit Query( const QString& sparqlQuery );
00071 
00075             Query( const Query& );
00076 
00080             ~Query();
00081 
00085             Query& operator=( const Query& );
00086 
00087             Type type() const;
00088             Term term() const;
00089             QString sparqlQuery() const;
00090             int limit() const;
00091 
00092             void setTerm( const Term& );
00093             void setSparqlQuery( const QString& );
00094             void setLimit( int );
00095 
00102             void addRequestProperty( const QUrl& property, bool optional = true );
00103             void clearRequestProperties();
00104 
00105             typedef QPair<QUrl, bool> RequestProperty;
00106 
00107             QList<RequestProperty> requestProperties() const;
00108 
00109             bool operator==( const Query& ) const;
00110 
00111         private:
00112             class Private;
00113             QSharedDataPointer<Private> d;
00114         };
00115 
00116         NEPOMUK_EXPORT uint qHash( const Nepomuk::Search::Query& );
00117     }
00118 }
00119 
00120 NEPOMUK_EXPORT QDebug operator<<( QDebug, const Nepomuk::Search::Query& );
00121 
00122 #endif

NepomukDaemons

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

API Reference

Skip menu "API Reference"
  • KCMShell
  • KNotify
  • KStyles
  • Nepomuk Daemons
Generated for API Reference 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