util
processlinemaker.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _PROCESSLINEMAKER_H_
00023 #define _PROCESSLINEMAKER_H_
00024
00025 #include <QtCore/QObject>
00026 #include "utilexport.h"
00027
00033 class QProcess;
00034
00035 class QStringList;
00036
00041 namespace KDevelop
00042 {
00043
00044 class KDEVPLATFORMUTIL_EXPORT ProcessLineMaker : public QObject
00045 {
00046 Q_OBJECT
00047
00048 public:
00049 ProcessLineMaker( QObject* parent = 0 );
00050 ProcessLineMaker( QProcess* process, QObject* parent = 0 );
00051
00052 ~ProcessLineMaker();
00053
00058 void discardBuffers();
00059
00071 void flushBuffers();
00072
00073 public Q_SLOTS:
00081 void slotReceivedStdout( const QByteArray& buffer );
00082
00090 void slotReceivedStderr( const QByteArray& buffer );
00091
00092 Q_SIGNALS:
00100 void receivedStdoutLines( const QStringList& lines );
00101
00109 void receivedStderrLines( const QStringList& lines );
00110
00111 private:
00112 Q_PRIVATE_SLOT(d, void slotReadyReadStdout( ) )
00113 Q_PRIVATE_SLOT(d, void slotReadyReadStderr( ) )
00114 class ProcessLineMakerPrivate* const d;
00115 friend class ProcessLineMakerPrivate;
00116 };
00117
00118 }
00119
00120 #endif