• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

Nepomuk

  • nepomuk
  • query
queryserviceclient.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2008-2010 Sebastian Trueg <trueg@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) version 3, or any
8 later version accepted by the membership of KDE e.V. (or its
9 successor approved by the membership of KDE e.V.), which shall
10 act as a proxy defined in Section 6 of version 3 of the license.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#ifndef _NEPOMUK_QUERY_SERVICE_CLIENT_H_
22#define _NEPOMUK_QUERY_SERVICE_CLIENT_H_
23
24#include <QtCore/QObject>
25
26#include "property.h"
27#include "query.h"
28
29#include "nepomukquery_export.h"
30
31class QUrl;
32
33namespace Nepomuk {
34 namespace Query {
35
36 class Result;
37
58 class NEPOMUKQUERY_EXPORT QueryServiceClient : public QObject
59 {
60 Q_OBJECT
61
62 public:
66 QueryServiceClient( QObject* parent = 0 );
67
71 ~QueryServiceClient();
72
78 static bool serviceAvailable();
79
102 static QList<Nepomuk::Query::Result> syncQuery( const Query& query, bool *ok = 0 );
103
118 static QList<Nepomuk::Query::Result> syncSparqlQuery( const QString& query,
119 const Nepomuk::Query::RequestPropertyMap& requestPropertyMap = Nepomuk::Query::RequestPropertyMap(),
120 bool *ok = 0 );
121
134 static QList<Nepomuk::Query::Result> syncDesktopQuery( const QString& query, bool *ok = 0 );
135
136 public Q_SLOTS:
148 bool query( const Query& query );
149
201 bool sparqlQuery( const QString& query, const Nepomuk::Query::RequestPropertyMap& requestPropertyMap = Nepomuk::Query::RequestPropertyMap() );
202
208 bool desktopQuery( const QString& query );
209
228 bool blockingQuery( const Query& query );
229
239 bool blockingSparqlQuery( const QString& query, const Nepomuk::Query::RequestPropertyMap& requestPropertyMap = Nepomuk::Query::RequestPropertyMap() );
240
248 bool blockingDesktopQuery( const QString& query );
249
257 void close();
258
265 bool isListingFinished() const;
266
273 QString errorMessage() const;
274
275 Q_SIGNALS:
280 void newEntries( const QList<Nepomuk::Query::Result>& entries );
281
287 void entriesRemoved( const QList<QUrl>& entries );
288
301 void resultCount( int count );
302
312 void finishedListing();
313
321 void error( const QString& errorMessage );
322
328 void serviceAvailabilityChanged( bool running );
329
330 private:
331 class Private;
332 Private* const d;
333
334 Q_PRIVATE_SLOT( d, void _k_entriesRemoved( const QStringList& ) )
335 Q_PRIVATE_SLOT( d, void _k_finishedListing() )
336 Q_PRIVATE_SLOT( d, void _k_handleQueryReply(QDBusPendingCallWatcher*) )
337 Q_PRIVATE_SLOT( d, void _k_serviceRegistered( const QString& ) )
338 Q_PRIVATE_SLOT( d, void _k_serviceUnregistered( const QString& ) )
339 };
340 }
341}
342
343#endif
Nepomuk::Query::QueryServiceClient
Convenience frontend to the Nepomuk Query DBus Service.
Definition: queryserviceclient.h:59
Nepomuk::Query::QueryServiceClient::error
void error(const QString &errorMessage)
Emitted when an error occurs.
Nepomuk::Query::QueryServiceClient::query
bool query(const Query &query)
Start a query using the Nepomuk query service.
Nepomuk::Query::QueryServiceClient::desktopQuery
bool desktopQuery(const QString &query)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Nepomuk::Query::QueryServiceClient::errorMessage
QString errorMessage() const
The last error message which has been emitted via error() or an empty string if there was no error.
Nepomuk::Query::QueryServiceClient::blockingSparqlQuery
bool blockingSparqlQuery(const QString &query, const Nepomuk::Query::RequestPropertyMap &requestPropertyMap=Nepomuk::Query::RequestPropertyMap())
This is an overloaded member function, provided for convenience. It differs from the above function o...
Nepomuk::Query::QueryServiceClient::finishedListing
void finishedListing()
Emitted when the initial listing has been finished, ie.
Nepomuk::Query::QueryServiceClient::syncQuery
static QList< Nepomuk::Query::Result > syncQuery(const Query &query, bool *ok=0)
Start a query using the Nepomuk query service.
Nepomuk::Query::QueryServiceClient::QueryServiceClient
QueryServiceClient(QObject *parent=0)
Create a new QueryServiceClient instance.
Nepomuk::Query::QueryServiceClient::sparqlQuery
bool sparqlQuery(const QString &query, const Nepomuk::Query::RequestPropertyMap &requestPropertyMap=Nepomuk::Query::RequestPropertyMap())
This is an overloaded member function, provided for convenience. It differs from the above function o...
Nepomuk::Query::QueryServiceClient::isListingFinished
bool isListingFinished() const
Nepomuk::Query::QueryServiceClient::serviceAvailable
static bool serviceAvailable()
Check if the Nepomuk query service is running.
Nepomuk::Query::QueryServiceClient::~QueryServiceClient
~QueryServiceClient()
Desctructor.
Nepomuk::Query::QueryServiceClient::close
void close()
Close the client, thus stop to monitor the query for changes.
Nepomuk::Query::QueryServiceClient::syncSparqlQuery
static QList< Nepomuk::Query::Result > syncSparqlQuery(const QString &query, const Nepomuk::Query::RequestPropertyMap &requestPropertyMap=Nepomuk::Query::RequestPropertyMap(), bool *ok=0)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Nepomuk::Query::QueryServiceClient::newEntries
void newEntries(const QList< Nepomuk::Query::Result > &entries)
Emitted for new search results.
Nepomuk::Query::QueryServiceClient::syncDesktopQuery
static QList< Nepomuk::Query::Result > syncDesktopQuery(const QString &query, bool *ok=0)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Nepomuk::Query::QueryServiceClient::resultCount
void resultCount(int count)
The number of results that are reported via newEntries() before the finishedListing() signal.
Nepomuk::Query::QueryServiceClient::blockingQuery
bool blockingQuery(const Query &query)
Start a query using the Nepomuk query service.
Nepomuk::Query::QueryServiceClient::entriesRemoved
void entriesRemoved(const QList< QUrl > &entries)
Emitted if the search results changed when monitoring a query.
Nepomuk::Query::QueryServiceClient::blockingDesktopQuery
bool blockingDesktopQuery(const QString &query)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Nepomuk::Query::QueryServiceClient::serviceAvailabilityChanged
void serviceAvailabilityChanged(bool running)
Emitted when the availability of the query service changes.
Nepomuk::Query::Query
A Nepomuk desktop query.
Definition: query.h:77
QObject
Nepomuk::Query::RequestPropertyMap
QHash< QString, Nepomuk::Types::Property > RequestPropertyMap
Convinience definition for request property mappings as used in QueryServiceClient::sparqlQuery() and...
Definition: query.h:47
Nepomuk
nepomukquery_export.h
property.h
query.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal