1 | // Copyright (C) 2021 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #ifndef SETTINGSTAB_H |
5 | #define SETTINGSTAB_H |
6 | |
7 | #include <QString> |
8 | #include <QScrollArea> |
9 | #include <QVariantMap> |
10 | |
11 | QT_BEGIN_NAMESPACE |
12 | class QWidget; |
13 | QT_END_NAMESPACE |
14 | |
15 | struct Setting |
16 | { |
17 | QWidget *uiELement = nullptr; |
18 | QString name; |
19 | bool defaultBool = false; |
20 | double defaultReal = 0.0; |
21 | }; |
22 | |
23 | class SettingsTab : public QScrollArea |
24 | { |
25 | Q_OBJECT |
26 | |
27 | public: |
28 | explicit SettingsTab(QWidget *parent = nullptr); |
29 | |
30 | QJsonObject getOptions() const; |
31 | |
32 | private: |
33 | QList<Setting> settings; |
34 | }; |
35 | |
36 | #endif |
37 | |