process.cpp
author insilmaril
Thu, 17 Jul 2008 09:27:20 +0000
branchrelease-1-12-maintained
changeset 39 e37153bea487
parent 0 7a96bd401351
child 81 876eed30ba3b
child 216 d5a0ea67c91d
permissions -rw-r--r--
removed pixel garbage on right side of exported images
     1 #include "process.h"
     2 
     3 /////////////////////////////////////////////////////////////////
     4 // Process
     5 /////////////////////////////////////////////////////////////////
     6 Process::Process()
     7 {
     8 	connect( this, SIGNAL(readyReadStderr()),
     9 			 this, SLOT(readProcErrout()) );
    10 	connect( this, SIGNAL(readyReadStdout()),
    11 			 this, SLOT(readProcStdout()) );
    12 	clear();		 
    13 }
    14 
    15 Process::~Process()
    16 {
    17 }
    18 
    19 void Process::clear()
    20 {
    21 	errOut="";
    22 	stdOut="";
    23 }
    24 
    25 void Process::waitFinished()
    26 {
    27 	while (isRunning())
    28 	{
    29 	// FIXME use some kind of sleep here...
    30 	}
    31 }
    32 
    33 void Process::readProcErrout()
    34 {
    35 	errOut+=readStderr();
    36 }
    37 
    38 void Process::readProcStdout()
    39 {
    40 	stdOut+=readStdout();
    41 }
    42 
    43 QString Process::getErrout()
    44 {
    45 	return errOut;
    46 }
    47 
    48 QString Process::getStdout()
    49 {
    50 	return stdOut;
    51 }