Inheritance diagram for DzProcess:
Enumerations | |
enum | Communication { Stdin = 0x01, Stdout = 0x02, Stderr = 0x04, DupStderr = 0x08 } |
Properties | |
Array | arguments |
Communication | communication |
Number | exitStatus |
Boolean | normalExit |
Boolean | running |
String | workingDirectory |
Methods | |
Boolean | canReadLineStderr () |
Boolean | canReadLineStdout () |
void | closeStdin () |
void | kill () |
Boolean | launch (String buffer, Array env=0) |
String | readLineStderr () |
String | readLineStdout () |
String | readStderr () |
String | readStdout () |
Boolean | start (Array env=0) |
void | tryTerminate () |
void | writeToStdin (String buffer) |
Constructors | |
DzProcess (Array args) | |
DzProcess (String arg0) | |
DzProcess () | |
Signals | |
void | launchFinished () |
Signature: "launchFinished()" | |
void | processExited () |
Signature: "processExited()" | |
void | readyReadStderr () |
Signature: "readyReadStderr()" | |
void | readyReadStdout () |
Signature: "readyReadStdout()" | |
void | wroteToStdin () |
Signature: "wroteToStdin()" |
See the Render To RIB sample (line #440+), to see this class in action.
Defines the communication channels connected to the process.
DzProcess::DzProcess | ( | ) |
Default Constructor.
Creates a DzProcess object without specifying the program or arguments. This does NOT start start the process.
DzProcess::DzProcess | ( | String | arg0 | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Creates a DzProcess object specifying only the program, without any arguments. This does NOT start start the process.
DzProcess::DzProcess | ( | Array | args | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Creates a DzProcess object specifying the program and any arguments. The first element of args
is the program to execute, the rest are the command line arguments. This does NOT start start the process.
Boolean DzProcess::canReadLineStderr | ( | ) |
Boolean DzProcess::canReadLineStdout | ( | ) |
void DzProcess::closeStdin | ( | ) |
Closes the process' standard input and deletes any pending data that hasn't been written to standard input.
void DzProcess::kill | ( | ) |
Terminates the process.
Attempts to run the process, writing buffer
to the process' standard input. Standard input is closed if all of the data in buffer
is written to it. If env
is specified, the values in the Array [of strings] are interpreted as environment settings in the form VARIABLE=VALUE, and the process is started with these environment settings. If env
is not specifiied, the process is started with the same environment settings as the starting process.
void DzProcess::launchFinished | ( | ) | [signal] |
Signature: "launchFinished()"
Emitted when the process is started with launch(). If starting the process is successful, this signal is emitted after the data passed in has been written to standard input. If starting the process fails, this signal is emitted immediately.
void DzProcess::processExited | ( | ) | [signal] |
Signature: "processExited()"
Emitted when the process has exited.
QString DzProcess::readLineStderr | ( | ) |
QString DzProcess::readLineStdout | ( | ) |
QString DzProcess::readStderr | ( | ) |
Reads the data that the process has written to standard error. When new data is written, the readyReadStderr() signal is emitted.
QString DzProcess::readStdout | ( | ) |
Reads the data that the process has written to standard output. When new data is written, the readyReadStdout() signal is emitted.
void DzProcess::readyReadStderr | ( | ) | [signal] |
Signature: "readyReadStderr()"
Emitted when the process has written data to standard error.
void DzProcess::readyReadStdout | ( | ) | [signal] |
Signature: "readyReadStdout()"
Emitted when the process has written data to standard output.
Attempts to run the process for the program and arguments specified with the arguments property or as specified in the constructor. If env
is specified, the values in the Array [of strings] are interpreted as environment settings in the form VARIABLE=VALUE, and the process is started with these environment settings. If env
is not specifiied, the process is started with the same environment settings as the starting process.
void DzProcess::tryTerminate | ( | ) |
Attempts to terminate the process.
void DzProcess::writeToStdin | ( | String | buffer | ) |
Writes buffer
to standard input. The process may, or may not, read the data. The wroteToStdin() signal is emitted once all data in buffer
has been written to the process.
void DzProcess::wroteToStdin | ( | ) | [signal] |
Signature: "wroteToStdin()"
Emitted if the data sent to standard input (via writeToStdin()) was actually written to the process.
QStringList DzProcess::arguments |
Holds an Array of strings. The first being the program to execute, the rest being the command line arguments.
Holds the communication for the process.
Holds the exit status of the program when it has finished. 0 if the process is still running. (Read Only)
Holds whether or not the process has exited normally. (Read Only)
Holds whether or not the process is currently running. (Read Only)
QString DzProcess::workingDirectory |
Holds the working directory for the process.