Vidalia  0.3.1
Signals | Public Member Functions | Private Slots | Private Attributes | List of all members
HelperProcess Class Reference

#include <HelperProcess.h>

Inheritance diagram for HelperProcess:

Signals

void startFailed (const QString &errorMessage)
 

Public Member Functions

 HelperProcess (QObject *parent=0)
 
void start (const QString &app, const QString &args)
 
void start (const QString &app, const QStringList &args)
 
bool isDone () const
 
void toForeground ()
 

Private Slots

void onError (QProcess::ProcessError error)
 
void onReadyReadStandardError ()
 
void onReadyReadStandardOutput ()
 

Private Attributes

QString _processName
 

Detailed Description

Definition at line 46 of file HelperProcess.h.

Constructor & Destructor Documentation

HelperProcess::HelperProcess ( QObject *  parent = 0)

Default constructor

Definition at line 53 of file HelperProcess.cpp.

References connect(), tc::error(), onError(), onReadyReadStandardError(), and onReadyReadStandardOutput().

Member Function Documentation

bool HelperProcess::isDone ( ) const

Returns true iff process is not running.

Definition at line 132 of file HelperProcess.cpp.

Referenced by HelperProcessPrototype::isDone().

void HelperProcess::onError ( QProcess::ProcessError  error)
privateslot

Invoked when underlying QProcess fails.

Definition at line 120 of file HelperProcess.cpp.

References _processName, startFailed(), and vWarn.

Referenced by HelperProcess().

void HelperProcess::onReadyReadStandardError ( )
privateslot

Invoked when output is written to the process's stderr.

Definition at line 69 of file HelperProcess.cpp.

References _processName, and vInfo.

Referenced by HelperProcess().

void HelperProcess::onReadyReadStandardOutput ( )
privateslot

Invoked when output is written to the process's stdout.

Definition at line 79 of file HelperProcess.cpp.

References _processName, and vInfo.

Referenced by HelperProcess().

void HelperProcess::start ( const QString &  app,
const QString &  args 
)

Start app with args appended to the end of the command line. app will be quoted, so an executable name with spaces is acceptable.

Definition at line 88 of file HelperProcess.cpp.

References _processName, and vNotice.

Referenced by HelperProcessPrototype::start().

void HelperProcess::start ( const QString &  app,
const QStringList &  args 
)

Start the specified application.

Definition at line 104 of file HelperProcess.cpp.

References _processName, string_format_arguments(), and vNotice.

void HelperProcess::startFailed ( const QString &  errorMessage)
signal

Invoked when start() fails.

Referenced by onError().

void HelperProcess::toForeground ( )

Bring process to foreground

Definition at line 138 of file HelperProcess.cpp.

Referenced by HelperProcessPrototype::toForeground().

Member Data Documentation

QString HelperProcess::_processName
private

The documentation for this class was generated from the following files: