Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qhelpsearchindexreader_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QHELPSEARCHINDEXREADER_H
5#define QHELPSEARCHINDEXREADER_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of the help generator tools. This header file may change from version
13// to version without notice, or even be removed.
14//
15// We mean it.
16//
17
19
20#include <QtCore/qlist.h>
21#include <QtCore/qmutex.h>
22#include <QtCore/qthread.h>
23
25
26namespace fulltextsearch {
27
28// TODO: Employ QFuture / QtConcurrent::run() ?
30{
32
33public:
35
36 void cancelSearching();
37 void search(const QString &collectionFile, const QString &indexFilesFolder,
38 const QString &searchInput, bool usesFilterEngine = false);
39 int searchResultCount() const;
40 QList<QHelpSearchResult> searchResults(int start, int end) const;
41
45
46private:
47 void run() override;
48
49 mutable QMutex m_mutex;
50 QList<QHelpSearchResult> m_searchResults;
51 bool m_cancel = false;
52 QString m_collectionFile;
53 QString m_searchInput;
54 QString m_indexFilesFolder;
55 bool m_usesFilterEngine = false;
56};
57
58} // namespace fulltextsearch
59
60QT_END_NAMESPACE
61
62#endif // QHELPSEARCHINDEXREADER_H
std::unique_ptr< QHelpSearchIndexWriter > m_indexWriter
std::unique_ptr< QHelpSearchIndexReader > m_indexReader
QPointer< QHelpEngineCore > m_helpEngine
void search(const QString &collectionFile, const QString &indexFilesFolder, const QString &searchInput, bool usesFilterEngine=false)
QList< QHelpSearchResult > searchResults(int start, int end) const
Combined button and popup list for selecting options.