2021-04-21 18:58:35 +08:00
|
|
|
#ifndef EXECUTABLERUNNER_H
|
|
|
|
#define EXECUTABLERUNNER_H
|
|
|
|
|
2021-11-01 09:18:23 +08:00
|
|
|
#include "runner.h"
|
2021-04-21 18:58:35 +08:00
|
|
|
|
2021-11-01 09:18:23 +08:00
|
|
|
class ExecutableRunner : public Runner
|
2021-04-21 18:58:35 +08:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2021-11-01 09:18:23 +08:00
|
|
|
ExecutableRunner(const QString& filename, const QString& arguments, const QString& workDir,
|
|
|
|
QObject* parent = nullptr);
|
2021-04-21 18:58:35 +08:00
|
|
|
|
2021-10-24 23:13:00 +08:00
|
|
|
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);
|
2021-10-24 23:13:00 +08:00
|
|
|
|
2021-04-21 18:58:35 +08:00
|
|
|
private:
|
2021-10-24 23:13:00 +08:00
|
|
|
QString mRedirectInputFilename;
|
2021-10-25 09:16:00 +08:00
|
|
|
bool mRedirectInput;
|
|
|
|
bool mStartConsole;
|
2021-04-21 18:58:35 +08:00
|
|
|
|
|
|
|
// QThread interface
|
|
|
|
protected:
|
|
|
|
void run() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // EXECUTABLERUNNER_H
|