diff options
Diffstat (limited to 'src/assistant/help/qhelpsearchenginecore.h')
-rw-r--r-- | src/assistant/help/qhelpsearchenginecore.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/assistant/help/qhelpsearchenginecore.h b/src/assistant/help/qhelpsearchenginecore.h new file mode 100644 index 000000000..d820a8f3d --- /dev/null +++ b/src/assistant/help/qhelpsearchenginecore.h @@ -0,0 +1,51 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QHELPSEARCHENGINECORE_H +#define QHELPSEARCHENGINECORE_H + +#include <QtHelp/qhelp_global.h> +#include <QtHelp/qhelpsearchresult.h> + +#include <QtCore/qobject.h> +#include <QtCore/qshareddata.h> + +QT_BEGIN_NAMESPACE + +class QHelpEngineCore; +class QHelpSearchEngineCorePrivate; + +class QHELP_EXPORT QHelpSearchEngineCore : public QObject +{ + Q_OBJECT + +public: + explicit QHelpSearchEngineCore(QHelpEngineCore *helpEngine); + ~QHelpSearchEngineCore(); + + int searchResultCount() const; + QList<QHelpSearchResult> searchResults(int start, int end) const; + QString searchInput() const; + + void reindexDocumentation(); + void cancelIndexing(); + + void search(const QString &searchInput); + void cancelSearching(); // TODO: is it needed? + + void scheduleIndexDocumentation(); + +Q_SIGNALS: + void indexingStarted(); + void indexingFinished(); + + void searchingStarted(); + void searchingFinished(int searchResultCount); + +private: + QHelpSearchEngineCorePrivate *d; +}; + +QT_END_NAMESPACE + +#endif // QHELPSEARCHENGINECORE_H |