RedPanda-CPP/RedPandaIDE/compiler/executablerunner.h

44 lines
916 B
C
Raw Normal View History

#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);
const QString &redirectInputFilename() const;
void setRedirectInputFilename(const QString &newDataFile);
2021-10-25 09:16:00 +08:00
bool redirectInput() const;
void setRedirectInput(bool isRedirect);
bool startConsole() const;
void setStartConsole(bool newStartConsole);
signals:
void started();
void terminated();
2021-06-25 12:40:11 +08:00
void runErrorOccurred(const QString& reason);
public slots:
void stop();
private:
QString mFilename;
QString mArguments;
QString mWorkDir;
bool mStop;
QString mRedirectInputFilename;
2021-10-25 09:16:00 +08:00
bool mRedirectInput;
bool mStartConsole;
// QThread interface
protected:
void run() override;
};
#endif // EXECUTABLERUNNER_H