Public Types | Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes
ButtonProcessAdministrator Class Reference

#include <ButtonProcessAdministrator.h>

List of all members.

Public Types

enum  ProcessState { NotRunning, Starting, Running, ShuttingDown }

Public Slots

void handleClick ()
void handleProcessError (QProcess::ProcessError error)
void startInExternalTerminal ()

Signals

void combinedStringChanged (QString text)
void combinedStringChanged ()
void stdcoutStringChanged (QString text)
void stdcoutStringChanged ()
void stderrStringChanged (QString text)
void stderrStringChanged ()

Public Member Functions

void addButton (QAbstractButton *button)
void addButton (QPushButton *button)
void addButton (RosProcessButton *button)
 ButtonProcessAdministrator (QObject *parent=0)
 ButtonProcessAdministrator (QString getName, QString command_, QStringList arguments_, QObject *parent=0)
 ButtonProcessAdministrator (const ButtonProcessAdministrator &copy)
QStringList getArguments () const
QString getCombinedString () const
QString getCommand () const
QString getName () const
QProcess::ProcessState getState () const
QString getStdcoutString () const
QString getStderrString () const
void setCommand (QString, QStringList)
void startProcess ()
void stopProcess ()
 ~ButtonProcessAdministrator ()

Private Slots

void handleProcessStateChange (QProcess::ProcessState state)
void readStderrProcess ()
void readStdoutProcess ()
void setButtonTextShuttingDown ()
void setButtonTextStart ()
void setButtonTextStarting ()
void setButtonTextStop ()

Private Member Functions

void connectProcess ()
void setButtonText (QString)
void setName (QString name_)

Private Attributes

QStringList arguments_
 The arguments which are passed to the command.
QVector< QAbstractButton * > buttons_
 Contains the buttons which are administrated.
QString combined_string_
 Contains combined output from cerr and cout.
QString command_
 The command which is executed.
ProcessState current_process_state_
QString name_
 The name of the process.
QProcess * process_
 The QProcess object for starting a process.
QString stdcout_string_
 Contains the cout output from the process.
QString stderr_string_
 Contains the cerr output from the process.

Detailed Description

Definition at line 9 of file ButtonProcessAdministrator.h.


Member Enumeration Documentation

Extended enum for the process state. With shutting down state.

Enumerator:
NotRunning 
Starting 
Running 
ShuttingDown 

Definition at line 90 of file ButtonProcessAdministrator.h.


Constructor & Destructor Documentation

Definition at line 19 of file ButtonProcessAdministrator.cpp.

ButtonProcessAdministrator::ButtonProcessAdministrator ( QString  getName,
QString  command_,
QStringList  arguments_,
QObject *  parent = 0 
)

Init the ButtonProcessAdministrator with a name.

Parameters:
QStringname The name of the

Definition at line 7 of file ButtonProcessAdministrator.cpp.

A copyconstructor.

Definition at line 28 of file ButtonProcessAdministrator.cpp.

Definition at line 39 of file ButtonProcessAdministrator.cpp.


Member Function Documentation

void ButtonProcessAdministrator::addButton ( QAbstractButton *  button)

Connects a Button with the Admin.

Definition at line 62 of file ButtonProcessAdministrator.cpp.

void ButtonProcessAdministrator::addButton ( QPushButton *  button)

Connects a QPushButton with the Admin.

Parameters:

Definition at line 69 of file ButtonProcessAdministrator.cpp.

Connects a RosProcessButton with the Admin.

Parameters:

Definition at line 76 of file ButtonProcessAdministrator.cpp.

void ButtonProcessAdministrator::combinedStringChanged ( QString  text) [signal]

This signal is emitted if the combinedString has changed.

Definition at line 139 of file ButtonProcessAdministrator.cpp.

Definition at line 57 of file ButtonProcessAdministrator.cpp.

Getter for combinedString.

Returns:
combinedString

Definition at line 90 of file ButtonProcessAdministrator.cpp.

Definition at line 52 of file ButtonProcessAdministrator.cpp.

QString ButtonProcessAdministrator::getName ( void  ) const

Definition at line 47 of file ButtonProcessAdministrator.cpp.

QProcess::ProcessState ButtonProcessAdministrator::getState ( ) const

Returns the current state of the internal process.

Definition at line 85 of file ButtonProcessAdministrator.cpp.

Getter for stdcoutString.

Returns:
stdcoutString

Definition at line 100 of file ButtonProcessAdministrator.cpp.

Getter for stderrString.

Returns:
stderrString

Definition at line 95 of file ButtonProcessAdministrator.cpp.

Definition at line 148 of file ButtonProcessAdministrator.cpp.

void ButtonProcessAdministrator::handleProcessError ( QProcess::ProcessError  error) [slot]

Definition at line 165 of file ButtonProcessAdministrator.cpp.

void ButtonProcessAdministrator::handleProcessStateChange ( QProcess::ProcessState  state) [private, slot]

Handles the state change of a process.

Definition at line 202 of file ButtonProcessAdministrator.cpp.

Is called when new data from stderr is available.

Definition at line 240 of file ButtonProcessAdministrator.cpp.

Is called when new data from stdout is available.

Definition at line 221 of file ButtonProcessAdministrator.cpp.

void ButtonProcessAdministrator::setButtonText ( QString  text) [private]

Definition at line 131 of file ButtonProcessAdministrator.cpp.

Sets the buttontext to starting.

Definition at line 273 of file ButtonProcessAdministrator.cpp.

Set the buttontext to stop.

Definition at line 258 of file ButtonProcessAdministrator.cpp.

Sets the buttontext to starting.

Definition at line 268 of file ButtonProcessAdministrator.cpp.

Sets the buttontext to start.

Definition at line 263 of file ButtonProcessAdministrator.cpp.

void ButtonProcessAdministrator::setCommand ( QString  command,
QStringList  arguments 
)

Sets the command and its arguments.

Definition at line 124 of file ButtonProcessAdministrator.cpp.

void ButtonProcessAdministrator::setName ( QString  name_) [private]

Definition at line 119 of file ButtonProcessAdministrator.cpp.

Definition at line 193 of file ButtonProcessAdministrator.cpp.

Stops the process.

Definition at line 112 of file ButtonProcessAdministrator.cpp.

void ButtonProcessAdministrator::stdcoutStringChanged ( QString  text) [signal]

This signal is emitted if the stdcoutString has changed.

This signal is emitted if the stdcoutString has changed.

void ButtonProcessAdministrator::stderrStringChanged ( QString  text) [signal]

This signal is emitted if the stderrString has changed.

Starts the process.

Definition at line 105 of file ButtonProcessAdministrator.cpp.


Member Data Documentation

The arguments which are passed to the command.

Definition at line 184 of file ButtonProcessAdministrator.h.

QVector<QAbstractButton*> ButtonProcessAdministrator::buttons_ [private]

Contains the buttons which are administrated.

Definition at line 171 of file ButtonProcessAdministrator.h.

Contains combined output from cerr and cout.

Definition at line 191 of file ButtonProcessAdministrator.h.

The command which is executed.

Definition at line 180 of file ButtonProcessAdministrator.h.

Definition at line 102 of file ButtonProcessAdministrator.h.

The name of the process.

Definition at line 174 of file ButtonProcessAdministrator.h.

The QProcess object for starting a process.

Definition at line 177 of file ButtonProcessAdministrator.h.

Contains the cout output from the process.

Definition at line 187 of file ButtonProcessAdministrator.h.

Contains the cerr output from the process.

Definition at line 189 of file ButtonProcessAdministrator.h.


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


obj_rec_gui
Author(s): AGAS/agas@uni-koblenz.de
autogenerated on Mon Oct 6 2014 02:53:43