| 1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | 
|---|---|
| 2 | // | 
| 3 | // SPDX-License-Identifier: GPL-3.0-or-later | 
| 4 | |
| 5 | #ifndef MAVENASYNPARSE_H | 
| 6 | #define MAVENASYNPARSE_H | 
| 7 | |
| 8 | #include "services/project/projectinfo.h" | 
| 9 | #include "common/common.h" | 
| 10 | |
| 11 | #include <QFileSystemWatcher> | 
| 12 | #include <QObject> | 
| 13 | #include <QtXml> | 
| 14 | |
| 15 | class QStandardItem; | 
| 16 | class QAction; | 
| 17 | class MavenAsynParsePrivate; | 
| 18 | class MavenAsynParse : public QFileSystemWatcher | 
| 19 | { | 
| 20 | Q_OBJECT | 
| 21 | MavenAsynParsePrivate *const d; | 
| 22 | public: | 
| 23 | MavenAsynParse(); | 
| 24 | virtual ~MavenAsynParse(); | 
| 25 | |
| 26 | signals: | 
| 27 | void parsedActions(const dpfservice::ProjectActionInfos &info); | 
| 28 | void parsedError(const QString &info); | 
| 29 | void itemsModified(const QList<QStandardItem*> &info); | 
| 30 | |
| 31 | public slots: | 
| 32 | void loadPoms(const dpfservice::ProjectInfo &info); | 
| 33 | void parseProject(const dpfservice::ProjectInfo &info); | 
| 34 | void parseActions(const dpfservice::ProjectInfo &info); | 
| 35 | |
| 36 | private slots: | 
| 37 | void doDirectoryChanged(const QString &path); | 
| 38 | |
| 39 | private: | 
| 40 | void createRows(const QString &path); | 
| 41 | QString itemDisplayName(const QStandardItem *item) const; | 
| 42 | QStandardItem *findItem(const QString &path, QStandardItem *parent = nullptr) const; | 
| 43 | QList<QStandardItem *> rows(const QStandardItem *item) const; | 
| 44 | int separatorSize() const; | 
| 45 | }; | 
| 46 | |
| 47 | #endif // MAVENASYNPARSE_H | 
| 48 | 
