1 | /**************************************************************************** |
2 | ** |
3 | ** Copyright (C) 2016 The Qt Company Ltd. |
4 | ** Contact: https://www.qt.io/licensing/ |
5 | ** |
6 | ** This file is part of the Qt Assistant of the Qt Toolkit. |
7 | ** |
8 | ** $QT_BEGIN_LICENSE:GPL-EXCEPT$ |
9 | ** Commercial License Usage |
10 | ** Licensees holding valid commercial Qt licenses may use this file in |
11 | ** accordance with the commercial license agreement provided with the |
12 | ** Software or, alternatively, in accordance with the terms contained in |
13 | ** a written agreement between you and The Qt Company. For licensing terms |
14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
15 | ** information use the contact form at https://www.qt.io/contact-us. |
16 | ** |
17 | ** GNU General Public License Usage |
18 | ** Alternatively, this file may be used under the terms of the GNU |
19 | ** General Public License version 3 as published by the Free Software |
20 | ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT |
21 | ** included in the packaging of this file. Please review the following |
22 | ** information to ensure the GNU General Public License requirements will |
23 | ** be met: https://www.gnu.org/licenses/gpl-3.0.html. |
24 | ** |
25 | ** $QT_END_LICENSE$ |
26 | ** |
27 | ****************************************************************************/ |
28 | |
29 | #ifndef PREFERENCESDIALOG_H |
30 | #define PREFERENCESDIALOG_H |
31 | |
32 | #include <QtCore/QMap> |
33 | #include <QtWidgets/QDialog> |
34 | #include <QtHelp/QHelpFilterData> |
35 | #include "ui_preferencesdialog.h" |
36 | #include "helpdocsettings.h" |
37 | |
38 | QT_BEGIN_NAMESPACE |
39 | |
40 | class FontPanel; |
41 | class HelpEngineWrapper; |
42 | class QFileSystemWatcher; |
43 | |
44 | class PreferencesDialog : public QDialog |
45 | { |
46 | Q_OBJECT |
47 | |
48 | public: |
49 | PreferencesDialog(QWidget *parent = nullptr); |
50 | |
51 | private slots: |
52 | void okClicked(); |
53 | void applyClicked(); |
54 | void applyChanges(); |
55 | void appFontSettingToggled(bool on); |
56 | void appFontSettingChanged(int index); |
57 | void browserFontSettingToggled(bool on); |
58 | void browserFontSettingChanged(int index); |
59 | |
60 | void setBlankPage(); |
61 | void setCurrentPage(); |
62 | void setDefaultPage(); |
63 | |
64 | signals: |
65 | void updateBrowserFont(); |
66 | void updateApplicationFont(); |
67 | void updateUserInterface(); |
68 | |
69 | private: |
70 | void updateFontSettingsPage(); |
71 | void updateOptionsPage(); |
72 | |
73 | Ui::PreferencesDialogClass m_ui; |
74 | |
75 | HelpDocSettings m_docSettings; |
76 | |
77 | FontPanel *m_appFontPanel; |
78 | FontPanel *m_browserFontPanel; |
79 | bool m_appFontChanged; |
80 | bool m_browserFontChanged; |
81 | HelpEngineWrapper &helpEngine; |
82 | const bool m_hideFiltersTab; |
83 | const bool m_hideDocsTab; |
84 | bool m_showTabs; |
85 | }; |
86 | |
87 | QT_END_NAMESPACE |
88 | |
89 | #endif // SETTINGSDIALOG_H |
90 | |