1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef CMAKEITEMKEEPER_H |
6 | #define CMAKEITEMKEEPER_H |
7 | |
8 | #include "common/common.h" |
9 | |
10 | #include <QObject> |
11 | #include <QStandardItem> |
12 | |
13 | class CmakeItemKeeperPrivate; |
14 | class CmakeItemKeeper : public Inotify |
15 | { |
16 | Q_OBJECT |
17 | Q_DISABLE_COPY(CmakeItemKeeper) |
18 | CmakeItemKeeper(); |
19 | CmakeItemKeeperPrivate *const d; |
20 | |
21 | public: |
22 | static CmakeItemKeeper *instance(); |
23 | virtual ~CmakeItemKeeper(); |
24 | |
25 | signals: |
26 | void cmakeFileNodeNotify(QStandardItem *rootItem, const QPair<QString, QStringList> &files); |
27 | |
28 | public slots: |
29 | void addCmakeRootFile(QStandardItem *root, const QString rootPath); |
30 | void addCmakeSubFiles(QStandardItem *root, const QStringList subPaths); |
31 | void delCmakeFileNode(QStandardItem *rootItem); |
32 | |
33 | private: |
34 | void notifyFromWatcher(const QString &filePath); |
35 | }; |
36 | |
37 | #endif // CMAKEITEMKEEPER_H |
38 |