ExecCommand Class Reference
This class invokes a binary with the arguments passed in the constructor and emits the signal finished() with the output. More...
#include <execcommand.h>
Inheritance diagram for ExecCommand:


Signals | |
void | finished (const QString &output, const QString &errorOutput) |
Public Member Functions | |
ExecCommand (const QString &executable, const QStringList &args, const QString &workingDir=QString::null, const QStringList &env=QStringList(), QObject *parent=0, const char *name=0) | |
~ExecCommand () | |
Private Slots | |
void | receivedStdout (KProcess *, char *buffer, int buflen) |
void | receivedStderr (KProcess *, char *buffer, int buflen) |
void | processExited () |
void | cancelClicked () |
Private Attributes | |
KProcess * | proc |
KProgressDialog * | progressDlg |
QString | out |
QString | err |
Detailed Description
This class invokes a binary with the arguments passed in the constructor and emits the signal finished() with the output.It also displays a progress dialog with the possibility to cancel the command. If there was an error or the user pressed cancel, finished will emit a QString::null, otherwise QStrings containing the stdout/stderr. The object will delete itself after the finished signal has been emitted. Additional environment can be set in the QStringList env via QStrings with the format "foo=blah"
Definition at line 39 of file execcommand.h.
Constructor & Destructor Documentation
|
Definition at line 27 of file execcommand.cpp. References cancelClicked(), KMessageBox::error(), finished(), proc, processExited(), progressDlg, receivedStderr(), receivedStdout(), KProcess::setEnvironment(), KProcess::setWorkingDirectory(), and KProcess::start(). |
|
Definition at line 95 of file execcommand.cpp. |
Member Function Documentation
|
Definition at line 85 of file execcommand.cpp. References finished(), KProcess::kill(), proc, and progressDlg. Referenced by ExecCommand(). |
|
Referenced by cancelClicked(), ExecCommand(), and processExited(). |
|
Definition at line 76 of file execcommand.cpp. References err, finished(), out, and progressDlg. Referenced by ExecCommand(). |
|
Definition at line 71 of file execcommand.cpp. References err. Referenced by ExecCommand(). |
|
Definition at line 66 of file execcommand.cpp. References out. Referenced by ExecCommand(). |
Member Data Documentation
|
Definition at line 61 of file execcommand.h. Referenced by processExited(), and receivedStderr(). |
|
Definition at line 60 of file execcommand.h. Referenced by processExited(), and receivedStdout(). |
|
Definition at line 58 of file execcommand.h. Referenced by cancelClicked(), and ExecCommand(). |
|
Definition at line 59 of file execcommand.h. Referenced by cancelClicked(), ExecCommand(), and processExited(). |
The documentation for this class was generated from the following files:
- lib/util/execcommand.h
- lib/util/execcommand.cpp