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