util
KDevelop::CommandExecutor Class Reference
#include <commandexecutor.h>

Detailed Description
Simplifying the exeuction of a Command through (QK)Process.This class emits only very basic signals when the process writes something to stdout or stderr and for signaling completed and failed status.
If you need more fine-grained control use (QK)Process directly and also check wether you can use KDevelop::ProcessLineMaker to use properly terminated lines of output.
Also this class provides only asynchronous operation, it doesn't allow to wait for the program to finish.
Definition at line 47 of file commandexecutor.h.
Signals | |
| void | completed () |
| void | failed () |
| void | receivedStandardError (const QStringList &) |
| void | receivedStandardOutput (const QStringList &) |
Public Member Functions | |
| CommandExecutor (const QString &command, QObject *parent=0) | |
| void | kill () |
| void | setArguments (const QStringList &args) |
| void | setCommand (const QString &command) |
| void | setEnvironment (const QMap< QString, QString > &env) |
| void | setWorkingDirectory (const QString &dir) |
| void | start () |
Constructor & Destructor Documentation
| KDevelop::CommandExecutor::CommandExecutor | ( | const QString & | command, | |
| QObject * | parent = 0 | |||
| ) | [explicit] |
Create a command using the given executable, arguments and environment.
The process is not started immediately, instead start() has to be called.
Definition at line 61 of file commandexecutor.cpp.
Member Function Documentation
| void KDevelop::CommandExecutor::kill | ( | ) |
kill the process, failed() will likely be emitted
Definition at line 117 of file commandexecutor.cpp.
| void KDevelop::CommandExecutor::setArguments | ( | const QStringList & | args | ) |
set additional arguments to be used when executing the command
Definition at line 91 of file commandexecutor.cpp.
| void KDevelop::CommandExecutor::setCommand | ( | const QString & | command | ) |
set the Command that should be started, now a commandexecutor can be reused
Definition at line 112 of file commandexecutor.cpp.
set additional environment variables to be used when executing the command
Definition at line 86 of file commandexecutor.cpp.
| void KDevelop::CommandExecutor::setWorkingDirectory | ( | const QString & | dir | ) |
| void KDevelop::CommandExecutor::start | ( | ) |
start the command, after this has been called signals may be emitted
Definition at line 101 of file commandexecutor.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference