process.cpp
author insilmaril
Fri, 01 Feb 2008 15:28:35 +0000
changeset 661 6a5e2c27f8a4
parent 429 69a4c16bd85b
child 825 1ad892c1a709
permissions -rw-r--r--
Added brasilian translation by Amadeu Júnior
insilmaril@0
     1
#include "process.h"
insilmaril@0
     2
insilmaril@0
     3
/////////////////////////////////////////////////////////////////
insilmaril@0
     4
// Process
insilmaril@0
     5
/////////////////////////////////////////////////////////////////
insilmaril@0
     6
Process::Process()
insilmaril@0
     7
{
insilmaril@408
     8
	connect( this, SIGNAL(readyReadStandardError()),
insilmaril@0
     9
			 this, SLOT(readProcErrout()) );
insilmaril@408
    10
	connect( this, SIGNAL(readyReadStandardOutput()),
insilmaril@0
    11
			 this, SLOT(readProcStdout()) );
insilmaril@0
    12
	clear();		 
insilmaril@0
    13
}
insilmaril@0
    14
insilmaril@0
    15
Process::~Process()
insilmaril@0
    16
{
insilmaril@0
    17
}
insilmaril@0
    18
insilmaril@0
    19
void Process::clear()
insilmaril@0
    20
{
insilmaril@0
    21
	errOut="";
insilmaril@0
    22
	stdOut="";
insilmaril@0
    23
}
insilmaril@0
    24
insilmaril@0
    25
void Process::readProcErrout()
insilmaril@0
    26
{
insilmaril@408
    27
	errOut+=readAllStandardError();
insilmaril@0
    28
}
insilmaril@0
    29
insilmaril@0
    30
void Process::readProcStdout()
insilmaril@0
    31
{
insilmaril@408
    32
	stdOut+=readAllStandardOutput();
insilmaril@0
    33
}
insilmaril@0
    34
insilmaril@0
    35
QString Process::getErrout()
insilmaril@0
    36
{
insilmaril@0
    37
	return errOut;
insilmaril@0
    38
}
insilmaril@0
    39
insilmaril@0
    40
QString Process::getStdout()
insilmaril@0
    41
{
insilmaril@0
    42
	return stdOut;
insilmaril@0
    43
}