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