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

Nepomuk-Core

  • sources
  • kde-4.12
  • kdelibs
  • nepomuk-core
  • services
  • storage
  • query
queryservice.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 Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef _NEPOMUK_QUERY_SERVICE_H_
20 #define _NEPOMUK_QUERY_SERVICE_H_
21 
22 #include "nepomukservice.h"
23 #include "query/query.h"
24 
25 #include "dbusoperators_p.h"
26 
27 #include <KUrl>
28 
29 #include <QtCore/QVariant>
30 #include <QtCore/QHash>
31 
32 class QDBusObjectPath;
33 class QDBusMessage;
34 class QDBusServiceWatcher;
35 class QThreadPool;
36 
37 namespace Nepomuk2 {
38  namespace Query {
39 
40  class Folder;
41  class FolderConnection;
42 
43  class QueryService : public QObject
44  {
45  Q_OBJECT
46  Q_CLASSINFO( "D-Bus Interface", "org.kde.nepomuk.QueryService" )
47 
48  public:
49  QueryService( Soprano::Model* model, QObject* parent );
50  ~QueryService();
51 
52  static QThreadPool* searchThreadPool();
53 
54  public Q_SLOTS:
58  Q_SCRIPTABLE QDBusObjectPath query( const QString& query, const QDBusMessage& msg );
59 
63  Q_SCRIPTABLE QDBusObjectPath desktopQuery( const QString& query, const QDBusMessage& msg );
64 
69  Q_SCRIPTABLE QDBusObjectPath sparqlQuery( const QString& query, const RequestPropertyMapDBus& requestProps, const QDBusMessage& msg );
70 
71  private Q_SLOTS:
72  void slotFolderAboutToBeDeleted( Nepomuk2::Query::Folder* folder );
73 
74  private:
78  Folder* getFolder( const Query& query );
79 
83  Folder* getFolder( const QString& sparql, const RequestPropertyMap& requestProps );
84 
85  QHash<QString, Folder*> m_openSparqlFolders;
86  QHash<Query, Folder*> m_openQueryFolders;
87 
88  int m_folderConnectionCnt; // only used for unique dbus object path generation
89  Soprano::Model* m_model;
90  };
91  }
92 }
93 
94 #endif
Nepomuk2::Query::QueryService::query
Q_SCRIPTABLE QDBusObjectPath query(const QString &query, const QDBusMessage &msg)
Create a query folder from encoded query query.
Definition: queryservice.cpp:96
QHash
QObject
query.h
Nepomuk2::Query::QueryService::sparqlQuery
Q_SCRIPTABLE QDBusObjectPath sparqlQuery(const QString &query, const RequestPropertyMapDBus &requestProps, const QDBusMessage &msg)
Create a query folder from SPARQL query string query.
Definition: queryservice.cpp:139
Nepomuk2::Query::RequestPropertyMap
QHash< QString, Nepomuk2::Types::Property > RequestPropertyMap
Convinience definition for request property mappings as used in QueryServiceClient::sparqlQuery() and...
Definition: query.h:41
Nepomuk2::Query::Query
A Nepomuk desktop query.
Definition: query.h:76
Nepomuk2::Query::QueryService::~QueryService
~QueryService()
Definition: queryservice.cpp:79
Nepomuk2::Query::Folder
One search folder which automatically updates itself.
Definition: folder.h:49
Nepomuk2::Query::QueryService::desktopQuery
Q_SCRIPTABLE QDBusObjectPath desktopQuery(const QString &query, const QDBusMessage &msg)
Create a query folder from desktop query string query which needs to be parsable by QueryParser...
Definition: queryservice.cpp:111
Nepomuk2::Query::QueryService::searchThreadPool
static QThreadPool * searchThreadPool()
Definition: queryservice.cpp:90
Nepomuk2::Query::QueryService::QueryService
QueryService(Soprano::Model *model, QObject *parent)
Definition: queryservice.cpp:44
nepomukservice.h
Nepomuk2::Query::QueryService
Definition: queryservice.h:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk-Core

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

kdelibs API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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