Computer Assited Medical Intervention Tool Kit  version 4.0
ActionCreationState.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2016 Univ. Grenoble Alpes, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 #ifndef ACTIONCREATIONSTATE_H
26 #define ACTIONCREATIONSTATE_H
27 
28 #include <QState>
29 #include <QWidget>
30 
31 class WizardMainWindow;
33 
34 // Sub-states
42 class ActionSummaryState;
43 
44 // Dependency from cepcoreschema
45 // Declaration here to avoid declaration in dependant projects.
46 namespace cepcoreschema {
47 class ActionExtension;
48 class Action;
49 class Cep;
50 }
51 
61 class ActionCreationState : public QState {
62 
63  Q_OBJECT;
64 
65 public:
67  ActionCreationState(QString name, WizardMainWindow * mainWidnow, cepcoreschema::Cep * domCep, ActionExtensionCreationState * parent);
70 
71  void resetDomActionExtension(cepcoreschema::ActionExtension * domActionExtension);
72 
73 signals:
74  void nextACS();
75 
76 public slots:
77  virtual void actionFinished();
78  virtual void actionCancelled();
79 
80 protected:
83  virtual void onEntry ( QEvent * event );
84 
85  virtual void onExit ( QEvent * event );
87 
97 
98 
99 private:
100  void createSubStates(WizardMainWindow * mainWindow);
101 
102  bool cancelled;
103  QString name;
104  cepcoreschema::ActionExtension * domActionExtension;
105  cepcoreschema::Action * domAction;
106  cepcoreschema::Cep * domCep;
107 
108 };
109 #endif
QString name
Definition: ActionCreationState.h:103
Widget to add or remove parameters to the action.
Definition: ActionAddParameterWidget.h:46
ActionSummaryState * actionSummaryState
Definition: ActionCreationState.h:96
Widget to summarize the created action.
Definition: ActionSummaryWidget.h:42
State to class the action and to attribute a tag to it.
Definition: ActionClassificationState.h:46
cepcoreschema::Action * domAction
Definition: ActionCreationState.h:105
State to describe action.
Definition: ActionDescriptionState.h:48
State to add parameters in the action.
Definition: ActionAddParameterState.h:49
State to summarize the created action.
Definition: ActionSummaryState.h:45
Widget to describe action.
Definition: ActionDescriptionWidget.h:41
bool cancelled
Definition: ActionCreationState.h:102
State to create one action.
Definition: ActionCreationState.h:61
The main window of the Wizard.
Definition: WizardMainWindow.h:47
Definition: ActionExtensionGenerator.h:36
ActionClassificationWidget * actionClassificationWidget
Definition: ActionCreationState.h:93
ActionDescriptionState * actionDescriptionState
Definition: ActionCreationState.h:90
Widget to class the action and to attribute a tag to it.
Definition: ActionClassificationWidget.h:43
ActionAddParameterWidget * actionAddParameterWidget
Definition: ActionCreationState.h:91
cepcoreschema::ActionExtension * domActionExtension
Definition: ActionCreationState.h:104
ActionDescriptionWidget * actionDescriptionWidget
Substates (to be updated with domAction at each entry)
Definition: ActionCreationState.h:89
ActionAddParameterState * actionAddParameterState
Definition: ActionCreationState.h:92
ActionClassificationState * actionClassificationState
Definition: ActionCreationState.h:94
cepcoreschema::Cep * domCep
Definition: ActionCreationState.h:106
State to create an action extension.
Definition: ActionExtensionCreationState.h:60
ActionSummaryWidget * actionSummaryWidget
Definition: ActionCreationState.h:95