| 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 | |
| 16 | class RunnerPrivate; |
| 17 | class Runner : public QObject |
| 18 | { |
| 19 | Q_OBJECT |
| 20 | public: |
| 21 | explicit Runner(QObject *parent = nullptr); |
| 22 | |
| 23 | public slots: |
| 24 | void run(); |
| 25 | void handleEvents(const dpf::Event &event); |
| 26 | void synOutputMsg(const QString &content, OutputPane::OutputFormat format = OutputPane::OutputFormat::NormalMessage); |
| 27 | |
| 28 | private: |
| 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 | |
| 34 | private: |
| 35 | RunnerPrivate *const d; |
| 36 | }; |
| 37 | |
| 38 | #endif // RUNNER_H |
| 39 |