#include <kprocio.h>
Inheritance diagram for KProcIO:

Signals | |
| void | readReady (KProcIO *pio) |
Public Methods | |
| bool | start (RunMode runmode=NotifyOnExit, bool includeStderr=false) |
| bool | writeStdin (const QString &line, bool appendnewline=TRUE) |
| bool | writeStdin (const QCString &line, bool appendnewline) |
| bool | writeStdin (const QByteArray &data) |
| bool | fputs (const QString &line, bool AppendNewLine=TRUE) |
| void | closeWhenDone () |
| int | readln (QString &line, bool autoAck=true, bool *partial=0) |
| int | fgets (QString &line, bool autoAck=false) |
| void | resetAll () |
| void | ackRead () |
| void | enableReadSignals (bool enable) |
Protected Methods | |
| virtual void | virtual_hook (int id, void *data) |
KProcIO
This class provides a slightly simpler interface to the communication functions provided by KProcess. The simplifications are:
Aside from these, and the fact that start() takes different parameters, use this class just like KProcess.
Definition at line 50 of file kprocio.h.
|
|
Call this after you have finished processing a readReady() signal. This call need not be made in the slot that was signalled by readReady(). You won't receive any more readReady() signals until you acknowledge with ackRead(). This prevents your slot from being reentered while you are still processing the current data. If this doesn't matter, then call ackRead() right away in your readReady()-processing slot. |
|
|
closes stdin after all data has been send. |
|
|
Turns readReady() signals on and off. You can turn this off at will and not worry about losing any data. (as long as you turn it back on at some point...)
|
|
||||||||||||
|
This function calls readln().
Definition at line 148 of file kprocio.h. References readln(). |
|
||||||||||||
|
This function just calls writeStdin().
Definition at line 107 of file kprocio.h. References writeStdin(). |
|
||||||||||||||||
|
Reads a line of text (up to and including ' Use readln() in response to a readReady() signal. You may use it multiple times if more than one line of data is available. Be sure to use ackRead() when you have finished processing the readReady() signal. This informs KProcIO that you are ready for another readReady() signal. readln() never blocks. autoAck==TRUE makes these functions call ackRead() for you.
Referenced by fgets(). |
|
|
Emitted when the process is ready for reading.
|
|
|
Reset the class. Doesn't kill the process. |
|
||||||||||||
|
Starts the process. It will fail in the following cases:
|
|
|
Writes data to stdin of the process.
|
|
||||||||||||
|
Writes text to stdin of the process.
|
|
||||||||||||
|
Writes text to stdin of the process.
Referenced by fputs(). |
1.2.18