40 #include <QtCore/QObject>
A wrapper around QProcess to conveniently start an external program and forward its outputs.
Definition: ExternalProcess.h:64
~ExternalProcess() override
D'tor.
std::function< void(const String &)> callbackStdErr_
Definition: ExternalProcess.h:123
ExternalProcess()
default Ctor; callbacks for stdout/stderr are empty
RETURNSTATE
result of calling an external executable
Definition: ExternalProcess.h:70
RETURNSTATE run(const QString &exe, const QStringList &args, const QString &working_dir, const bool verbose, String &error_msg, IO_MODE io_mode=IO_MODE::READ_WRITE)
Runs a program and calls the callback functions from time to time if output from the external program...
void setCallbacks(std::function< void(const String &)> callbackStdOut, std::function< void(const String &)> callbackStdErr)
re-wire the callbacks used during run()
IO_MODE
Open mode for the process.
Definition: ExternalProcess.h:79
QProcess * qp_
pointer to avoid including the QProcess header here (it's huge)
Definition: ExternalProcess.h:121
ExternalProcess(std::function< void(const String &)> callbackStdOut, std::function< void(const String &)> callbackStdErr)
set the callback functions to process stdout and stderr output when the external process generates it
std::function< void(const String &)> callbackStdOut_
Definition: ExternalProcess.h:122
ExternalProcess::RETURNSTATE run(const QString &exe, const QStringList &args, const QString &working_dir, const bool verbose, IO_MODE io_mode=IO_MODE::READ_WRITE)
Same as other overload, just without a returned error message.
A more convenient string class.
Definition: String.h:60
int verbose
Verbosity level ( "-v" is 1 and "-V" is 2 )
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48