1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef JSProjectGenerator_H |
6 | #define JSProjectGenerator_H |
7 | |
8 | #include "jsasynparse.h" |
9 | #include "services/project/projectservice.h" |
10 | |
11 | #include <QObject> |
12 | #include <QDomDocument> |
13 | |
14 | class JSProjectGeneratorPrivate; |
15 | class JSProjectGenerator : public dpfservice::ProjectGenerator |
16 | { |
17 | Q_OBJECT |
18 | JSProjectGeneratorPrivate *const d; |
19 | public: |
20 | explicit JSProjectGenerator(); |
21 | virtual ~JSProjectGenerator() override; |
22 | static QString toolKitName() { return "jsdirectory"; } |
23 | virtual QStringList supportLanguages() override; |
24 | virtual QDialog* configureWidget(const QString &language, |
25 | const QString &projectPath) override; |
26 | virtual bool configure(const dpfservice::ProjectInfo &info = {}) override; |
27 | virtual QStandardItem *createRootItem(const dpfservice::ProjectInfo &info) override; |
28 | virtual void removeRootItem(QStandardItem* root) override; |
29 | virtual QMenu* createItemMenu(const QStandardItem *item) override; |
30 | |
31 | private slots: |
32 | void doProjectChildsModified(const QList<QStandardItem*> &info); |
33 | void doJSCleanMenu(); |
34 | void actionProperties(const dpfservice::ProjectInfo &info, QStandardItem *item); |
35 | }; |
36 | |
37 | #endif // JSProjectGenerator_H |
38 |