RedPanda-CPP/RedPandaIDE/compiler/runner.h

35 lines
661 B
C
Raw Normal View History

2021-11-01 09:18:23 +08:00
#ifndef RUNNER_H
#define RUNNER_H
#include <QThread>
class Runner : public QThread
{
Q_OBJECT
public:
explicit Runner(const QString& filename, const QString& arguments, const QString& workDir, QObject *parent = nullptr);
bool pausing() const;
2021-11-01 09:18:23 +08:00
signals:
void started();
void terminated();
void runErrorOccurred(const QString& reason);
void pausingForFinish(); // finish but pausing
2021-11-01 09:18:23 +08:00
public slots:
void stop();
protected:
virtual void doStop();
void setPausing(bool newCanFinish);
protected:
bool mPausing;
2021-11-01 09:18:23 +08:00
bool mStop;
QString mFilename;
QString mArguments;
QString mWorkDir;
};
#endif // RUNNER_H