#include <ButtonProcessAdministrator.h>
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 ©) | |
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. |
Definition at line 9 of file ButtonProcessAdministrator.h.
Extended enum for the process state. With shutting down state.
Definition at line 90 of file ButtonProcessAdministrator.h.
ButtonProcessAdministrator::ButtonProcessAdministrator | ( | QObject * | parent = 0 | ) |
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.
QString | name 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.
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.
Definition at line 69 of file ButtonProcessAdministrator.cpp.
void ButtonProcessAdministrator::addButton | ( | RosProcessButton * | button | ) |
Connects a RosProcessButton with the Admin.
Definition at line 76 of file ButtonProcessAdministrator.cpp.
void ButtonProcessAdministrator::combinedStringChanged | ( | QString | text | ) | [signal] |
This signal is emitted if the combinedString has changed.
void ButtonProcessAdministrator::combinedStringChanged | ( | ) | [signal] |
void ButtonProcessAdministrator::connectProcess | ( | ) | [private] |
Definition at line 139 of file ButtonProcessAdministrator.cpp.
QStringList ButtonProcessAdministrator::getArguments | ( | ) | const |
Definition at line 57 of file ButtonProcessAdministrator.cpp.
QString ButtonProcessAdministrator::getCombinedString | ( | ) | const |
Getter for combinedString.
Definition at line 90 of file ButtonProcessAdministrator.cpp.
QString ButtonProcessAdministrator::getCommand | ( | ) | const |
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.
QString ButtonProcessAdministrator::getStdcoutString | ( | ) | const |
Getter for stdcoutString.
Definition at line 100 of file ButtonProcessAdministrator.cpp.
QString ButtonProcessAdministrator::getStderrString | ( | ) | const |
Getter for stderrString.
Definition at line 95 of file ButtonProcessAdministrator.cpp.
void ButtonProcessAdministrator::handleClick | ( | ) | [slot] |
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.
void ButtonProcessAdministrator::readStderrProcess | ( | ) | [private, slot] |
Is called when new data from stderr is available.
Definition at line 240 of file ButtonProcessAdministrator.cpp.
void ButtonProcessAdministrator::readStdoutProcess | ( | ) | [private, slot] |
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.
void ButtonProcessAdministrator::setButtonTextShuttingDown | ( | ) | [private, slot] |
Sets the buttontext to starting.
Definition at line 273 of file ButtonProcessAdministrator.cpp.
void ButtonProcessAdministrator::setButtonTextStart | ( | ) | [private, slot] |
Set the buttontext to stop.
Definition at line 258 of file ButtonProcessAdministrator.cpp.
void ButtonProcessAdministrator::setButtonTextStarting | ( | ) | [private, slot] |
Sets the buttontext to starting.
Definition at line 268 of file ButtonProcessAdministrator.cpp.
void ButtonProcessAdministrator::setButtonTextStop | ( | ) | [private, slot] |
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.
void ButtonProcessAdministrator::startInExternalTerminal | ( | ) | [slot] |
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.
void ButtonProcessAdministrator::stdcoutStringChanged | ( | ) | [signal] |
This signal is emitted if the stdcoutString has changed.
void ButtonProcessAdministrator::stderrStringChanged | ( | QString | text | ) | [signal] |
This signal is emitted if the stderrString has changed.
void ButtonProcessAdministrator::stderrStringChanged | ( | ) | [signal] |
Starts the process.
Definition at line 105 of file ButtonProcessAdministrator.cpp.
QStringList ButtonProcessAdministrator::arguments_ [private] |
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.
QString ButtonProcessAdministrator::combined_string_ [private] |
Contains combined output from cerr and cout.
Definition at line 191 of file ButtonProcessAdministrator.h.
QString ButtonProcessAdministrator::command_ [private] |
The command which is executed.
Definition at line 180 of file ButtonProcessAdministrator.h.
Definition at line 102 of file ButtonProcessAdministrator.h.
QString ButtonProcessAdministrator::name_ [private] |
The name of the process.
Definition at line 174 of file ButtonProcessAdministrator.h.
QProcess* ButtonProcessAdministrator::process_ [private] |
The QProcess object for starting a process.
Definition at line 177 of file ButtonProcessAdministrator.h.
QString ButtonProcessAdministrator::stdcout_string_ [private] |
Contains the cout output from the process.
Definition at line 187 of file ButtonProcessAdministrator.h.
QString ButtonProcessAdministrator::stderr_string_ [private] |
Contains the cerr output from the process.
Definition at line 189 of file ButtonProcessAdministrator.h.