| 1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
| 2 | // |
| 3 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 4 | |
| 5 | #ifndef PROFILESETTINGWIDGET_H |
| 6 | #define PROFILESETTINGWIDGET_H |
| 7 | |
| 8 | #include <common/widget/pagewidget.h> |
| 9 | #include <QMap> |
| 10 | |
| 11 | static const QString lNameItem{"name" }; |
| 12 | static const QString lPathItem{"path" }; |
| 13 | |
| 14 | using LanguagePaths = QMap<QString, QString>; |
| 15 | class ProfileSettingWidgetPrivate; |
| 16 | class ProfileSettingWidget : public PageWidget |
| 17 | { |
| 18 | Q_OBJECT |
| 19 | public: |
| 20 | explicit ProfileSettingWidget(QWidget *parent = nullptr); |
| 21 | virtual ~ProfileSettingWidget(); |
| 22 | QString translateFilePath(); |
| 23 | QString languageFilePath(); |
| 24 | const LanguagePaths &getLanguagePaths() const; |
| 25 | |
| 26 | void saveConfig() override; |
| 27 | void readConfig() override; |
| 28 | |
| 29 | private: |
| 30 | void setupUi(); |
| 31 | ProfileSettingWidgetPrivate *const d; |
| 32 | |
| 33 | protected: |
| 34 | void readTranslate(); |
| 35 | }; |
| 36 | |
| 37 | #endif // PROFILESETTINGWIDGET_H |
| 38 | |