RedPanda-CPP/RedPandaIDE/compiler/executablerunner.h

32 lines
560 B
C++

#ifndef EXECUTABLERUNNER_H
#define EXECUTABLERUNNER_H
#include <QThread>
class ExecutableRunner : public QThread
{
Q_OBJECT
public:
ExecutableRunner(const QString& filename, const QString& arguments, const QString& workDir);
signals:
void started();
void terminated();
void runErrorOccurred(const QString& reason);
public slots:
void stop();
private:
QString mFilename;
QString mArguments;
QString mWorkDir;
bool mStop;
// QThread interface
protected:
void run() override;
};
#endif // EXECUTABLERUNNER_H