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
11struct 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
20class KitsManagerWidgetPrivate;
21class KitsManagerWidget : public PageWidget
22{
23 Q_OBJECT
24public:
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
31signals:
32
33public slots:
34
35private:
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