1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef MAVENWIDGET_H |
6 | #define MAVENWIDGET_H |
7 | |
8 | #include "services/option/toolchaindata.h" |
9 | #include "common/widget/pagewidget.h" |
10 | |
11 | struct MavenConfig{ |
12 | ToolChainData::ToolChainParam version; |
13 | QString userSetting; |
14 | QString localSetting; |
15 | }; |
16 | |
17 | class ToolChainData; |
18 | class MavenWidgetPrivate; |
19 | class MavenWidget : public PageWidget |
20 | { |
21 | Q_OBJECT |
22 | public: |
23 | explicit MavenWidget(QWidget *parent = nullptr); |
24 | ~MavenWidget() override; |
25 | |
26 | void setUserConfig(const QMap<QString, QVariant> &map) override; |
27 | void getUserConfig(QMap<QString, QVariant> &map) override; |
28 | |
29 | signals: |
30 | |
31 | public slots: |
32 | |
33 | private: |
34 | void setupUi(); |
35 | void updateUi(); |
36 | |
37 | bool dataToMap(const MavenConfig &config, QMap<QString, QVariant> &map); |
38 | bool mapToData(const QMap<QString, QVariant> &map, MavenConfig &config); |
39 | |
40 | bool getControlValue(QMap<QString, QVariant> &map); |
41 | void setControlValue(const QMap<QString, QVariant> &map); |
42 | |
43 | MavenWidgetPrivate *const d; |
44 | }; |
45 | |
46 | #endif // MAVENWIDGET_H |
47 |