NepomukDaemons
searchcore.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _NEPOMUK_SEARCH_CORE_H_
00021 #define _NEPOMUK_SEARCH_CORE_H_
00022
00023 #include <QtCore/QObject>
00024 #include <QtCore/QUrl>
00025 #include <QtCore/QHash>
00026
00027 #include <nepomuk/nepomuk_export.h>
00028
00029 #include "result.h"
00030
00031 namespace Nepomuk {
00032 namespace Search {
00033
00034 class Query;
00035
00039 class NEPOMUK_EXPORT SearchCore : public QObject
00040 {
00041 Q_OBJECT
00042
00043 public:
00044 SearchCore( QObject* parent = 0 );
00045 ~SearchCore();
00046
00047 double cutOffScore() const;
00048
00049 QList<Result> lastResults() const;
00050
00051 QList<Result> blockingQuery( const Query& query );
00052
00053 bool isActive() const;
00054
00055 public Q_SLOTS:
00056 void query( const Query& query );
00057
00058 void cancel();
00059
00063 void setCutOffScore( double score );
00064
00065 Q_SIGNALS:
00066 void newResult( const Nepomuk::Search::Result& );
00067 void scoreChanged( const Nepomuk::Search::Result& );
00068 void finished();
00069
00070 private Q_SLOTS:
00071 void slotNewResult( const Nepomuk::Search::Result& );
00072 void slotFinished();
00073
00074 private:
00075 class Private;
00076 Private* const d;
00077 };
00078 }
00079 }
00080
00081 #endif