|
Computer Assited Medical Intervention Tool Kit
version 5.0
|
|
Go to the documentation of this file.
27 #ifndef ACTIONSTATEMACHINE_H
28 #define ACTIONSTATEMACHINE_H
32 #include <QTextStream>
33 #include <QStateMachine>
35 #include <QFinalState>
39 #include <QtXml/QDomDocument>
40 #include <QtXml/QDomNodeList>
153 #endif // ACTIONSTATEMACHINE_H
static char ** argv
argv given from command line
Definition: Application.h:433
QString type
Definition: SaveActionState.h:88
void finished()
finish everything properly when the state machine entered the final state and quit
Definition: ActionStateMachine.cpp:662
The Explorer viewer displays the list of all data currently opened in the application....
Definition: Explorer.h:64
QString getLogDirectory()
Return the current directory name to use as output log directory.
Definition: ActionStateWizard.cpp:54
void createAllActionStates(QDomNodeList nodeList)
This method may throw an AbortException if a problem occurs.
Definition: ActionStateMachine.cpp:678
void setAction(camitk::Action *action, QMap< QString, QVariant > parameters, QMap< QString, QString > inputComponentNames, QMap< QString, QString > outputComponentNames)
Definition: ActionState.cpp:53
#define CAMITK_WARNING(MSG)
Log for warning verbosity (the most common one) Will appear by default.
Definition: Log.h:266
virtual void redirectToConsole(bool)
use or not the application console (redirect or not standard out/err streams)
Definition: MainWindow.cpp:393
Definition: ActionStateViewerExtension.h:32
void autoNext()
Automatically loop to apply to next state for all states.
Definition: ActionStateMachine.cpp:506
All-in-one medical image viewer.
Definition: MedicalImageViewer.h:59
void setMainWindow(MainWindow *mw)
set the main window.
Definition: Application.cpp:251
The state (in a state machine point of view) corresponding to the current processed action.
Definition: ActionState.h:48
void checkSCXMLFile(QString filename)
check that the file is a SCXML file (simple checking, no XML Schema validation yet) This method may t...
Definition: ActionStateMachine.cpp:593
QString name
Application's name.
Definition: ActionStateMachine.h:122
virtual ~ActionStateMachine()=default
destructor
bool isNamed(QString) const
Check the name of the transition (i.e. text of the button)
Definition: ActionTransition.cpp:148
static int registerAllViewers(ViewerExtension *)
register all viewers from the given ViewerExtension
Definition: Application.cpp:918
QDomDocument scxmlDoc
XML tree containing infos.
Definition: ActionStateMachine.h:131
QVector< camitk::Action::ApplyStatus > stringToStatus(QString listOfStatus)
Definition: ActionStateMachine.cpp:837
virtual void init() override
initialize all the actions
Definition: ActionStateViewerExtension.cpp:33
void addComponentToClose(QString compName, QString compType, bool force=false)
add a component's name and type to the list of component to close during the transition.
Definition: ActionTransition.cpp:153
Action class is an abstract class that enables you to build a action (generally on a component)....
Definition: Action.h:231
ActionTransition * addActionTransition(QString transitionName, QAbstractState *nextState, bool applyAction=true, QVector< camitk::Action::ApplyStatus > disableConditions=QVector< camitk::Action::ApplyStatus >())
Adds a possible transition from this action.
Definition: ActionState.cpp:81
The generic/default application. Once this class is intanciated in the main, everything is setup....
Definition: Application.h:82
QString getName()
Returns the name of the action state (may be different from the name of the actual action)
Definition: ActionState.cpp:66
void setCamiTKAction(ActionState *actionState, QDomElement actionElement)
This method may throw an AbortException if a problem occurs.
Definition: ActionStateMachine.cpp:864
Exception class to handle abortion in component instantiation. Particularly useful to handle construc...
Definition: AbortException.h:66
#define CAMITK_ERROR(MSG)
Log for error verbosity (the minimum verbosity) Will always appear.
Definition: Log.h:276
This Class describes ActionStateMachine MainWindow extension. This application use a modified version...
Definition: ActionStateMachine.h:58
QString getDomNodeLocation(QDomNode)
build a specific error message containing the line and column if available
Definition: ActionStateMachine.cpp:987
void initResources()
Load, for the selected langage (asked to the Application), the associated .qm file.
Definition: ViewerExtension.cpp:80
QStateMachine machine
Actual state machine.
Definition: ActionStateMachine.h:125
void setInput(QVector< saveComponentsInfo > inputComponentsInfo)
Definition: SaveActionState.cpp:47
void setCamiTKSaveAction(SaveActionState *actionState, QDomElement actionElement)
This method may throw an AbortException if a problem occurs.
Definition: ActionStateMachine.cpp:951
QTime * startTime
To get track of the Action State Machine the duration.
Definition: ActionStateMachine.h:143
QString getSCXMLFilename()
Return the current filename of scxml file to use as input file.
Definition: ActionStateWizard.cpp:49
virtual void setCentralViewer(Viewer *)
set the central Viewer of the application.
Definition: MainWindow.cpp:323
QFile * logFile
Log file.
Definition: ActionStateMachine.h:149
QString name
Definition: SaveActionState.h:87
QString extension
Definition: SaveActionState.h:89
The current action state viewer.
Definition: ActionStateViewer.h:45
QDir saveDirectory
Where to save all files.
Definition: ActionStateMachine.h:140
ActionStateMachine(int &argc, char **argv, QString inputFileName="", QString outputDirectory="")
construtor.
Definition: ActionStateMachine.cpp:52
This class handle a transition between two states (including previous/next buttons)....
Definition: ActionTransition.h:59
virtual void setToolbarAutoVisibility(bool)
force toolbar visibility.
Definition: MedicalImageViewer.cpp:302
void showStatusBar(bool)
show the status bar (by default it is hidden)
Definition: MainWindow.cpp:383
static QString getName()
get the application name
Definition: Application.cpp:203
This class is the base class for your application. It sets up the main window and creates a menubar,...
Definition: MainWindow.h:89
QString directory
Definition: SaveActionState.h:90
void createTransitions(QDomNodeList nodeList)
This method may throw an AbortException if a problem occurs.
Definition: ActionStateMachine.cpp:768
#define CAMITK_TRACE(MSG)
Log for trace verbosity (the most verbose one, should be used for bug report) The msg will appear onl...
Definition: Log.h:256
QString parseSCXMLTree()
parse the XML file (using Qt DOM API) This method may throw an AbortException if a problem occurs.
Definition: ActionStateMachine.cpp:627
void autoNext()
programmatically activate the transition (during autoNext), i.e. call "click" on the button
Definition: ActionTransition.cpp:161
This dialog is shown only if at least one of the two required input parameters (SCXML and output dire...
Definition: ActionStateWizard.h:39
QString getSaveDirectory()
where to save the files
Definition: ActionStateMachine.cpp:982
void initMainWindow()
initialized main window
Definition: ActionStateMachine.cpp:558
virtual void addDockViewer(Qt::DockWidgetArea, Viewer *)
add a Viewer to the application as a docking widget and specify where it has to be docked Note that M...
Definition: MainWindow.cpp:299
void setAlternativeDesc(QString altDescText, QVector< camitk::Action::ApplyStatus > statusList)
May change its description according to the previous action result.
Definition: ActionState.cpp:161
void setWindowSubtitle(QString)
The subtitle is situated at the end of the title, on the title bar, is helps for example showing whic...
Definition: MainWindow.cpp:223
QFinalState * finalState
Final State.
Definition: ActionStateMachine.h:137
static int argc
argc given from command line
Definition: Application.h:430
QMap< QString, ActionState * > statesMap
Map of action state to build transitions.
Definition: ActionStateMachine.h:134
camitk::MainWindow * mainWindow
main window
Definition: ActionStateMachine.h:128
The asm application uses a state machine. This class implements the state of action save.
Definition: SaveActionState.h:37
Definition: SaveActionState.h:63
Definition: Action.cpp:35
QTextStream * logStream
Log stream to write report on logFile.
Definition: ActionStateMachine.h:146