| 1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
| 2 | // |
| 3 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 4 | |
| 5 | #ifndef CONFIGWIDGET_H |
| 6 | #define CONFIGWIDGET_H |
| 7 | |
| 8 | #include <QDialog> |
| 9 | |
| 10 | class ConfigWidgetPrivate; |
| 11 | class ConfigWidget : public QDialog |
| 12 | { |
| 13 | Q_OBJECT |
| 14 | public: |
| 15 | explicit ConfigWidget(QWidget *parent = nullptr); |
| 16 | |
| 17 | signals: |
| 18 | void sigStartPorting(const QString &project, const QString &srcCPU, const QString &destCPU); |
| 19 | |
| 20 | public slots: |
| 21 | void configDone(); |
| 22 | |
| 23 | private: |
| 24 | void showEvent(QShowEvent *) override; |
| 25 | void initializeUi(); |
| 26 | void setDefaultValue(); |
| 27 | void refreshUi(); |
| 28 | void setupUi(QWidget *); |
| 29 | void resetUi(); |
| 30 | void refreshDetail(); |
| 31 | bool saveCfg(); |
| 32 | bool restore(); |
| 33 | QString configFilePath(); |
| 34 | |
| 35 | ConfigWidgetPrivate *const d; |
| 36 | }; |
| 37 | |
| 38 | #endif // CONFIGWIDGET_H |
| 39 | |