1 | /****************************************************************************
|
---|
2 | **
|
---|
3 | ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
---|
4 | ** Contact: Qt Software Information ([email protected])
|
---|
5 | **
|
---|
6 | ** This file is part of the QCLucene library and is distributable under
|
---|
7 | ** the terms of the LGPL license as specified in the license.txt file.
|
---|
8 | **
|
---|
9 | ****************************************************************************/
|
---|
10 |
|
---|
11 | #ifndef QHITS_P_H
|
---|
12 | #define QHITS_P_H
|
---|
13 |
|
---|
14 | //
|
---|
15 | // W A R N I N G
|
---|
16 | // -------------
|
---|
17 | //
|
---|
18 | // This file is not part of the Qt API. It exists for the convenience
|
---|
19 | // of the help generator tools. This header file may change from version
|
---|
20 | // to version without notice, or even be removed.
|
---|
21 | //
|
---|
22 | // We mean it.
|
---|
23 | //
|
---|
24 |
|
---|
25 | #include "qsort_p.h"
|
---|
26 | #include "qquery_p.h"
|
---|
27 | #include "qfilter_p.h"
|
---|
28 | #include "qdocument_p.h"
|
---|
29 | #include "qclucene_global_p.h"
|
---|
30 |
|
---|
31 | #include <QtCore/QSharedDataPointer>
|
---|
32 | #include <QtCore/QSharedData>
|
---|
33 |
|
---|
34 | CL_NS_DEF(search)
|
---|
35 | class Hits;
|
---|
36 | CL_NS_END
|
---|
37 | CL_NS_USE(search)
|
---|
38 |
|
---|
39 | QT_BEGIN_NAMESPACE
|
---|
40 |
|
---|
41 | class QCLuceneSearcher;
|
---|
42 |
|
---|
43 | class QHELP_EXPORT QCLuceneHitsPrivate : public QSharedData
|
---|
44 | {
|
---|
45 | public:
|
---|
46 | QCLuceneHitsPrivate();
|
---|
47 | QCLuceneHitsPrivate(const QCLuceneHitsPrivate &other);
|
---|
48 |
|
---|
49 | ~QCLuceneHitsPrivate();
|
---|
50 |
|
---|
51 | Hits *hits;
|
---|
52 | bool deleteCLuceneHits;
|
---|
53 |
|
---|
54 | private:
|
---|
55 | QCLuceneHitsPrivate &operator=(const QCLuceneHitsPrivate &other);
|
---|
56 | };
|
---|
57 |
|
---|
58 | class QHELP_EXPORT QCLuceneHits
|
---|
59 | {
|
---|
60 | public:
|
---|
61 | QCLuceneHits(const QCLuceneSearcher &searcher, const QCLuceneQuery &query,
|
---|
62 | const QCLuceneFilter &filter);
|
---|
63 | QCLuceneHits(const QCLuceneSearcher &searcher, const QCLuceneQuery &query,
|
---|
64 | const QCLuceneFilter &filter, const QCLuceneSort &sort);
|
---|
65 | virtual ~QCLuceneHits();
|
---|
66 |
|
---|
67 | QCLuceneDocument document(const qint32 index);
|
---|
68 | qint32 length() const;
|
---|
69 | qint32 id (const qint32 index);
|
---|
70 | qreal score(const qint32 index);
|
---|
71 |
|
---|
72 | protected:
|
---|
73 | friend class QCLuceneSearcher;
|
---|
74 | QSharedDataPointer<QCLuceneHitsPrivate> d;
|
---|
75 | };
|
---|
76 |
|
---|
77 | QT_END_NAMESPACE
|
---|
78 |
|
---|
79 | #endif // QHITS_P_H
|
---|