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 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | template <class K, class T> |
14 | class QMap; |
15 | class QVersionNumber; |
16 | |
17 | class QHelpCollectionHandler; |
18 | class QHelpEngineCore; |
19 | class QHelpFilterData; |
20 | class QHelpFilterEnginePrivate; |
21 | |
22 | class QHELP_EXPORT QHelpFilterEngine : public QObject |
23 | { |
24 | Q_OBJECT |
25 | public: |
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 | |
47 | Q_SIGNALS: |
48 | void filterActivated(const QString &newFilter); |
49 | |
50 | protected: |
51 | explicit QHelpFilterEngine(QHelpEngineCore *helpEngine); |
52 | virtual ~QHelpFilterEngine(); |
53 | |
54 | private: |
55 | void setCollectionHandler(QHelpCollectionHandler *collectionHandler); |
56 | |
57 | QHelpFilterEnginePrivate *d; |
58 | friend class QHelpEngineCore; |
59 | friend class QHelpEngineCorePrivate; |
60 | }; |
61 | |
62 | QT_END_NAMESPACE |
63 | |
64 | #endif // QHELPFILTERENGINE_H |
65 |