1 | /* |
---|---|
2 | * Copyright (C) 2020-2022 Roy Qu (royqh1979@gmail.com) |
3 | * |
4 | * This program is free software: you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation, either version 3 of the License, or |
7 | * (at your option) any later version. |
8 | * |
9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
16 | */ |
17 | #ifndef COMPILERSETOPTIONWIDGET_H |
18 | #define COMPILERSETOPTIONWIDGET_H |
19 | |
20 | #include <QWidget> |
21 | #include "settingswidget.h" |
22 | |
23 | namespace Ui { |
24 | class CompilerSetOptionWidget; |
25 | } |
26 | |
27 | class CompilerSetDirectoriesWidget; |
28 | class CompilerSetOptionWidget : public SettingsWidget |
29 | { |
30 | Q_OBJECT |
31 | |
32 | public: |
33 | explicit CompilerSetOptionWidget(const QString& name, const QString& group, QWidget *parent = nullptr); |
34 | ~CompilerSetOptionWidget(); |
35 | |
36 | private: |
37 | Ui::CompilerSetOptionWidget *ui; |
38 | CompilerSetDirectoriesWidget* mBinDirWidget; |
39 | CompilerSetDirectoriesWidget* mCIncludeDirWidget; |
40 | CompilerSetDirectoriesWidget* mCppIncludeDirWidget; |
41 | CompilerSetDirectoriesWidget* mLibDirWidget; |
42 | |
43 | |
44 | // SettingsWidget interface |
45 | public: |
46 | void init() override; |
47 | protected: |
48 | void doLoad() override; |
49 | void doSave() override; |
50 | |
51 | private: |
52 | void reloadCurrentCompilerSet(); |
53 | void saveCurrentCompilerSet(); |
54 | |
55 | private slots: |
56 | void on_cbCompilerSet_currentIndexChanged(int index); |
57 | void on_btnFindCompilers_pressed(); |
58 | void on_btnAddBlankCompilerSet_pressed(); |
59 | void on_btnAddCompilerSetByFolder_pressed(); |
60 | void on_btnRenameCompilerSet_pressed(); |
61 | void on_btnRemoveCompilerSet_pressed(); |
62 | void updateIcons(); |
63 | |
64 | void on_cbEncoding_currentTextChanged(const QString &arg1); |
65 | void on_cbEncodingDetails_currentTextChanged(const QString &arg1); |
66 | }; |
67 | |
68 | #endif // COMPILERSETOPTIONWIDGET_H |
69 |