1 | // Copyright (C) 2020 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 QHELPFILTERSETTINGSWIDGET_H |
5 | #define QHELPFILTERSETTINGSWIDGET_H |
6 | |
7 | #include <QtHelp/qhelp_global.h> |
8 | |
9 | #include <QtWidgets/qwidget.h> |
10 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | class QVersionNumber; |
14 | |
15 | class QHelpFilterEngine; |
16 | class QHelpFilterSettingsWidgetPrivate; |
17 | |
18 | class QHELP_EXPORT QHelpFilterSettingsWidget : public QWidget |
19 | { |
20 | Q_OBJECT |
21 | public: |
22 | explicit QHelpFilterSettingsWidget(QWidget *parent = nullptr); |
23 | |
24 | ~QHelpFilterSettingsWidget(); |
25 | |
26 | void setAvailableComponents(const QStringList &components); |
27 | void setAvailableVersions(const QList<QVersionNumber> &versions); |
28 | |
29 | // TODO: filterEngine may be moved to c'tor or to setFilterEngine() setter |
30 | void readSettings(const QHelpFilterEngine *filterEngine); |
31 | bool applySettings(QHelpFilterEngine *filterEngine) const; |
32 | |
33 | private: |
34 | QScopedPointer<class QHelpFilterSettingsWidgetPrivate> d_ptr; |
35 | Q_DECLARE_PRIVATE(QHelpFilterSettingsWidget) |
36 | Q_DISABLE_COPY_MOVE(QHelpFilterSettingsWidget) |
37 | }; |
38 | |
39 | QT_END_NAMESPACE |
40 | |
41 | #endif // QHELPFILTERSETTINGSWIDGET_H |
42 |