1 | /****************************************************************************
|
---|
2 | **
|
---|
3 | ** Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team.
|
---|
4 | ** All rights reserved.
|
---|
5 | **
|
---|
6 | ** Portion Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
---|
7 | ** All rights reserved.
|
---|
8 | **
|
---|
9 | ** This file may be used under the terms of the GNU Lesser General Public
|
---|
10 | ** License version 2.1 as published by the Free Software Foundation and
|
---|
11 | ** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
---|
12 | ** Please review the following information to ensure the GNU Lesser General
|
---|
13 | ** Public License version 2.1 requirements will be met:
|
---|
14 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
---|
15 | **
|
---|
16 | ****************************************************************************/
|
---|
17 |
|
---|
18 | #ifndef QHITS_P_H
|
---|
19 | #define QHITS_P_H
|
---|
20 |
|
---|
21 | //
|
---|
22 | // W A R N I N G
|
---|
23 | // -------------
|
---|
24 | //
|
---|
25 | // This file is not part of the Qt API. It exists for the convenience
|
---|
26 | // of the help generator tools. This header file may change from version
|
---|
27 | // to version without notice, or even be removed.
|
---|
28 | //
|
---|
29 | // We mean it.
|
---|
30 | //
|
---|
31 |
|
---|
32 | #include "qsort_p.h"
|
---|
33 | #include "qquery_p.h"
|
---|
34 | #include "qfilter_p.h"
|
---|
35 | #include "qdocument_p.h"
|
---|
36 | #include "qclucene_global_p.h"
|
---|
37 |
|
---|
38 | #include <QtCore/QSharedDataPointer>
|
---|
39 | #include <QtCore/QSharedData>
|
---|
40 |
|
---|
41 | CL_NS_DEF(search)
|
---|
42 | class Hits;
|
---|
43 | CL_NS_END
|
---|
44 | CL_NS_USE(search)
|
---|
45 |
|
---|
46 | QT_BEGIN_NAMESPACE
|
---|
47 |
|
---|
48 | class QCLuceneSearcher;
|
---|
49 |
|
---|
50 | class QHELP_EXPORT QCLuceneHitsPrivate : public QSharedData
|
---|
51 | {
|
---|
52 | public:
|
---|
53 | QCLuceneHitsPrivate();
|
---|
54 | QCLuceneHitsPrivate(const QCLuceneHitsPrivate &other);
|
---|
55 |
|
---|
56 | ~QCLuceneHitsPrivate();
|
---|
57 |
|
---|
58 | Hits *hits;
|
---|
59 | bool deleteCLuceneHits;
|
---|
60 |
|
---|
61 | private:
|
---|
62 | QCLuceneHitsPrivate &operator=(const QCLuceneHitsPrivate &other);
|
---|
63 | };
|
---|
64 |
|
---|
65 | class QHELP_EXPORT QCLuceneHits
|
---|
66 | {
|
---|
67 | public:
|
---|
68 | QCLuceneHits(const QCLuceneSearcher &searcher, const QCLuceneQuery &query,
|
---|
69 | const QCLuceneFilter &filter);
|
---|
70 | QCLuceneHits(const QCLuceneSearcher &searcher, const QCLuceneQuery &query,
|
---|
71 | const QCLuceneFilter &filter, const QCLuceneSort &sort);
|
---|
72 | virtual ~QCLuceneHits();
|
---|
73 |
|
---|
74 | QCLuceneDocument document(const qint32 index);
|
---|
75 | qint32 length() const;
|
---|
76 | qint32 id (const qint32 index);
|
---|
77 | qreal score(const qint32 index);
|
---|
78 |
|
---|
79 | protected:
|
---|
80 | friend class QCLuceneSearcher;
|
---|
81 | QSharedDataPointer<QCLuceneHitsPrivate> d;
|
---|
82 | };
|
---|
83 |
|
---|
84 | QT_END_NAMESPACE
|
---|
85 |
|
---|
86 | #endif // QHITS_P_H
|
---|