2 #ifndef __libquark_util_ExternalCommandTask_hxx 3 #define __libquark_util_ExternalCommandTask_hxx 32 {
return(_executable); }
40 {
return(_exitCode); }
72 { _unbufferedOutput = unbufferedOutput; }
94 void handleProcessFinished(
int exitCode, QProcess::ExitStatus status);
95 void handleProcessError(QProcess::ProcessError
error);
96 void handleProcessStandardError();
97 void handleProcessStandardOutput();
100 void processResults();
104 bool _unbufferedOutput;
105 QScopedPointer<QProcess> _process;
107 QString _standardOutput;
108 QString _errorOutput;
117 #endif // __libquark_util_ExternalCommandTask_hxx int exitCode() const
Returns the exit code from the subprocess.
Definition: ExternalCommandTask.h++:39
virtual ~ExternalCommandTask()
Destructor.
virtual void processStandardError(QString text)
Called to process standard error from the process.
An abstract subclass of Task that runs an external command (a subprocess).
Definition: ExternalCommandTask.h++:22
QString executable() const
Returns the path to the executable that will be run.
Definition: ExternalCommandTask.h++:31
QString toString() const
Returns a string representation of the task.
QStringList args() const
Returns the arguments to the executable.
Definition: ExternalCommandTask.h++:35
Definition: BarChartView.h++:6
void setArgs(QStringList args)
Sets the command line arguments for the executable.
ExternalCommandTask(const QString &executable)
Constructs a new ExternalCommandTask that will run the given executable.
virtual bool cancel()
Specified by Task.
virtual void processStandardOutput(QString text)
Called to process standard output from the process.
An abstract base class for objects that represent tasks to be executed by a TaskProcessor.
Definition: Task.h++:20
void setUnbufferedOutput(bool unbufferedOutput)
Specifies whether the command's output will be unbuffered.
Definition: ExternalCommandTask.h++:71
QString error() const
Returns the error message reported by this task upon failure, if any.
Definition: Task.h++:56
virtual void finish()
Called when the process has exited and just before the finished() signal is emitted.
virtual void execute()
Specified by Task.