1// Copyright (C) 2018 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 QHELPFILTERENGINE_H
5#define QHELPFILTERENGINE_H
6
7#include <QtHelp/qhelp_global.h>
8
9#include <QtCore/QObject>
10
11QT_BEGIN_NAMESPACE
12
13template <class K, class T>
14class QMap;
15class QVersionNumber;
16
17class QHelpCollectionHandler;
18class QHelpEngineCore;
19class QHelpFilterData;
20class QHelpFilterEnginePrivate;
21
22class QHELP_EXPORT QHelpFilterEngine : public QObject
23{
24 Q_OBJECT
25public:
26 QMap<QString, QString> namespaceToComponent() const;
27 QMap<QString, QVersionNumber> namespaceToVersion() const;
28
29 QStringList filters() const;
30
31 QString activeFilter() const;
32 bool setActiveFilter(const QString &filterName);
33
34 QStringList availableComponents() const;
35 QList<QVersionNumber> availableVersions() const;
36
37 QHelpFilterData filterData(const QString &filterName) const;
38 bool setFilterData(const QString &filterName, const QHelpFilterData &filterData);
39
40 bool removeFilter(const QString &filterName);
41
42 QStringList namespacesForFilter(const QString &filterName) const;
43
44 QStringList indices() const;
45 QStringList indices(const QString &filterName) const;
46
47Q_SIGNALS:
48 void filterActivated(const QString &newFilter);
49
50protected:
51 explicit QHelpFilterEngine(QHelpEngineCore *helpEngine);
52 virtual ~QHelpFilterEngine();
53
54private:
55 void setCollectionHandler(QHelpCollectionHandler *collectionHandler);
56
57 QHelpFilterEnginePrivate *d;
58 friend class QHelpEngineCore;
59 friend class QHelpEngineCorePrivate;
60};
61
62QT_END_NAMESPACE
63
64#endif // QHELPFILTERENGINE_H
65

source code of qttools/src/assistant/help/qhelpfilterengine.h