1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef RUNNER_H
6#define RUNNER_H
7
8#include "event/event.h"
9#include "services/language/languagegenerator.h"
10#include "debuggerglobals.h"
11#include "common/widget/outputpane.h"
12
13#include <QObject>
14#include <QAction>
15
16class RunnerPrivate;
17class Runner : public QObject
18{
19 Q_OBJECT
20public:
21 explicit Runner(QObject *parent = nullptr);
22
23public slots:
24 void run();
25 void handleEvents(const dpf::Event &event);
26 void synOutputMsg(const QString &content, OutputPane::OutputFormat format = OutputPane::OutputFormat::NormalMessage);
27
28private:
29 void running();
30 bool execCommand(const dpfservice::RunCommandInfo &info);
31 void outputMsg(const QString &content, OutputPane::OutputFormat format = OutputPane::OutputFormat::NormalMessage);
32 dpfservice::ProjectInfo getActiveProjectInfo() const;
33
34private:
35 RunnerPrivate *const d;
36};
37
38#endif // RUNNER_H
39