![]() |
This class is representing a process under ARCS. More...
#include <arcsprocess.h>
Public Slots | |
void | changeSheet (QString s) |
void | finish () |
Signals | |
void | finished () |
Public Member Functions | |
void | setContext (ARCSContext *ctx) |
bool | setController (QString s=QString::null) |
void | addSheet (QString s, ARCSSheet sh) |
void | removeSheet (QString s) |
void | renameSheet (QString oldName, QString newName) |
ARCSSheet & | getSheet (QString s) |
QStringList | getSheetNames () |
QString | getControllerId () |
void | setApplicationMode (ARCS::ARCSAppFlag flag) |
void | setReferenceApplicationMode (ARCS::ARCSAppFlag flag) |
bool | startProcess () |
bool | stopProcess () |
virtual bool | event (QEvent *event) |
void | waitForFirstSheet () |
ARCSControllerComponent * | getController () |
ARCSContext * | getContext () |
bool | hasFinished () |
void | setupNextSheet () |
void | wait () |
This class is representing a process under ARCS.
A process manages a set of sheets using a controller.
Definition at line 52 of file arcsprocess.h.
void ARCSProcess::addSheet | ( | QString | s, |
ARCSSheet | sh | ||
) |
Adds a sheet to the process
s | the name of the sheet |
sh | the actual sheet structure |
Definition at line 209 of file arcsprocess.cpp.
|
slot |
Changes the current sheet This is usually triggered by the controller. The current sheet is deactivated and setupNextSheet() is eventually triggered.
s | the name of the new sheet. |
Definition at line 75 of file arcsprocess.cpp.
|
virtual |
An event handler inherited from QObject The purpose is to handle events when the process has an event loop. This is usually triggered by the ARCSAppMode::tokenHook() if needed.
Definition at line 62 of file arcsprocess.cpp.
|
slot |
Trigger this slot to finish the process (for internal use only)
Definition at line 112 of file arcsprocess.cpp.
|
signal |
Triggered when the process is finished
|
inline |
Returns the context to which this process is linked
Definition at line 138 of file arcsprocess.h.
|
inline |
Returns the actual controller component
Definition at line 135 of file arcsprocess.h.
|
inline |
Returns the id of the controller
Definition at line 96 of file arcsprocess.h.
|
inline |
Returns the sheet with the given name
s | the name of the sheet to return |
Definition at line 86 of file arcsprocess.h.
|
inline |
Returns the list of the sheets stored inside the process
Definition at line 94 of file arcsprocess.h.
|
inline |
Tells wether the process has finished its task or not (not thread-reentrant)
Definition at line 141 of file arcsprocess.h.
void ARCSProcess::removeSheet | ( | QString | s | ) |
Removes a sheet from the sheet list of the process
s | the name of the sheet to remove |
Definition at line 260 of file arcsprocess.cpp.
void ARCSProcess::renameSheet | ( | QString | oldName, |
QString | newName | ||
) |
Renames a sheet in the process list This function will do nothing if newName is already taken by another sheet.
oldName | old sheet name |
newName | new sheet name |
Definition at line 248 of file arcsprocess.cpp.
|
inline |
Sets the application mode of the process This method is intended to be used with the main process of the application. For other process, you should use setReferenceApplicationMode()
flag | the application mode flag to use. |
Definition at line 109 of file arcsprocess.h.
|
inline |
Links this process with the context of the application
Definition at line 61 of file arcsprocess.h.
bool ARCSProcess::setController | ( | QString | s = QString::null | ) |
Sets the controller to use with this process
Definition at line 120 of file arcsprocess.cpp.
void ARCSProcess::setReferenceApplicationMode | ( | ARCS::ARCSAppFlag | flag | ) |
Sets the reference application mode the process Use this method when the process is not the main process of the application. This method will then compute the resulting application mode for this process i.e. if it is a basic thread or a thread with an event loop.
flag | the reference application mode flag to use |
Definition at line 52 of file arcsprocess.cpp.
void ARCSProcess::setupNextSheet | ( | ) |
Sets up the next sheet
Definition at line 216 of file arcsprocess.cpp.
bool ARCSProcess::startProcess | ( | ) |
starts the process
Definition at line 173 of file arcsprocess.cpp.
bool ARCSProcess::stopProcess | ( | ) |
stops the process (not implemented yet)
Definition at line 192 of file arcsprocess.cpp.
void ARCSProcess::wait | ( | ) |
Waits for the end of this process
Definition at line 232 of file arcsprocess.cpp.
void ARCSProcess::waitForFirstSheet | ( | ) |
Waits for the first sheet of the process to be set up This method is needed because subprocesses must be initialized before the main process starts.
Definition at line 201 of file arcsprocess.cpp.