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// Qt-Security score:significant reason:default
4
5#ifndef QHELPSEARCHINDEXREADER_H
6#define QHELPSEARCHINDEXREADER_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of the help generator tools. This header file may change from version
14// to version without notice, or even be removed.
15//
16// We mean it.
17//
18
20
21#include <QtCore/qlist.h>
22#include <QtCore/qmutex.h>
23#include <QtCore/qthread.h>
24
26
27namespace fulltextsearch {
28
29// TODO: Employ QFuture / QtConcurrent::run() ?
31{
33
34public:
36
37 void cancelSearching();
38 void search(const QString &collectionFile, const QString &indexFilesFolder,
39 const QString &searchInput, bool usesFilterEngine = false);
40 int searchResultCount() const;
41 QList<QHelpSearchResult> searchResults(int start, int end) const;
42
46
47private:
48 void run() override;
49
50 mutable QMutex m_mutex;
51 QList<QHelpSearchResult> m_searchResults;
52 bool m_cancel = false;
53 QString m_collectionFile;
54 QString m_searchInput;
55 QString m_indexFilesFolder;
56 bool m_usesFilterEngine = false;
57};
58
59} // namespace fulltextsearch
60
61QT_END_NAMESPACE
62
63#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.