1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef KITMANAGER_H |
6 | #define KITMANAGER_H |
7 | |
8 | #include "kit.h" |
9 | |
10 | #include <QObject> |
11 | |
12 | class KitManager : public QObject |
13 | { |
14 | Q_OBJECT |
15 | public: |
16 | static KitManager *instance(); |
17 | ~KitManager() override; |
18 | |
19 | void save(); |
20 | |
21 | void setSelectedKit(Kit &kit); |
22 | const Kit &getSelectedKit(); |
23 | |
24 | QString getDefaultOutputPath() const; |
25 | |
26 | signals: |
27 | |
28 | public slots: |
29 | private: |
30 | explicit KitManager(QObject *parent = nullptr); |
31 | |
32 | void restoreKits(); |
33 | |
34 | class KitList |
35 | { |
36 | public: |
37 | KitList() {} |
38 | QString defaultKit; |
39 | std::vector<std::unique_ptr<Kit>> kits; |
40 | }; |
41 | |
42 | KitList restoreKits(const QString &fileName); |
43 | }; |
44 | |
45 | #endif // KITMANAGER_H |
46 |