• 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
searchrunnable.h
Go to the documentation of this file.
1 /*
2  This file is part of the Nepomuk KDE project.
3  Copyright (C) 2007-2010 Sebastian Trueg <trueg@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef _NEPOMUK_SEARCH_THREAD_H_
21 #define _NEPOMUK_SEARCH_THREAD_H_
22 
23 #include <QtCore/QRunnable>
24 #include <QtCore/QPointer>
25 #include <QtCore/QMutex>
26 
27 #include "query/result.h"
28 
29 #include "folder.h"
30 
31 
32 namespace Soprano {
33  class QueryResultIterator;
34 }
35 
36 namespace Nepomuk2 {
37  namespace Query {
38  class Folder;
39 
40  class SearchRunnable : public QObject, public QRunnable
41  {
42  Q_OBJECT
43  public:
44  SearchRunnable( Soprano::Model* model, const QString& sparqlQuery, const RequestPropertyMap& map );
45  ~SearchRunnable();
46 
50  void cancel();
51 
52  Q_SIGNALS:
53  void newResult( const Nepomuk2::Query::Result& result );
54  void listingFinished();
55 
56  protected:
57  void run();
58 
59  private:
60  Soprano::Model* m_model;
61 
62  QString m_sparqlQuery;
63  RequestPropertyMap m_requestPropertyMap;
64  bool m_cancelled;
65  };
66  }
67 }
68 
69 #endif
Nepomuk2::Query::SearchRunnable::run
void run()
Definition: searchrunnable.cpp:74
Nepomuk2::Query::SearchRunnable::listingFinished
void listingFinished()
Nepomuk2::Query::SearchRunnable::SearchRunnable
SearchRunnable(Soprano::Model *model, const QString &sparqlQuery, const RequestPropertyMap &map)
Definition: searchrunnable.cpp:53
Nepomuk2::Query::SearchRunnable
Definition: searchrunnable.h:40
Nepomuk2::Query::SearchRunnable::~SearchRunnable
~SearchRunnable()
Definition: searchrunnable.cpp:63
QObject
QRunnable
result.h
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::SearchRunnable::newResult
void newResult(const Nepomuk2::Query::Result &result)
Nepomuk2::Query::SearchRunnable::cancel
void cancel()
Cancel the search and detach it from the folder.
Definition: searchrunnable.cpp:68
folder.h
Nepomuk2::Query::Result
A single search result.
Definition: result.h:57
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:09 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