1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef PROJECTRECEIVER_H
6#define PROJECTRECEIVER_H
7
8#include "services/project/projectinfo.h"
9#include "services/builder/builderglobals.h"
10
11#include <framework/framework.h>
12
13class ProjectCmakeReceiver : public dpf::EventHandler,
14 dpf::AutoEventHandlerRegister<ProjectCmakeReceiver>
15{
16 Q_OBJECT
17 friend class dpf::AutoEventHandlerRegister<ProjectCmakeReceiver>;
18public:
19 explicit ProjectCmakeReceiver(QObject * parent = nullptr);
20
21 static Type type();
22
23 static QStringList topics();
24
25 virtual void eventProcess(const dpf::Event& event) override;
26
27 virtual void builderEvent(const dpf::Event& event);
28};
29
30class ProjectCmakeProxy : public QObject
31{
32 Q_OBJECT
33 ProjectCmakeProxy(){}
34 ProjectCmakeProxy(const ProjectCmakeProxy&) = delete;
35
36public:
37 static ProjectCmakeProxy* instance();
38
39 void setBuildCommandUuid(QString buildCommandUuid);
40 QString getBuildCommandUuid();
41
42signals:
43 void buildExecuteEnd(const BuildCommandInfo &commandInfo, int status = 0);
44
45private:
46 QString buildCommandUuid;
47};
48
49#endif // PROJECTRECEIVER_H
50