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