Computer Assited Medical Intervention Tool Kit  version 4.1
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-2018 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);
68 
70  ~ActionCreationState() override = default;
71 
72  void resetDomActionExtension(cepcoreschema::ActionExtension* domActionExtension);
73 
74 signals:
75  void nextACS();
76 
77 public slots:
78  virtual void actionFinished();
79  virtual void actionCancelled();
80 
81 protected:
84  void onEntry(QEvent* event) override;
85 
86  void onExit(QEvent* event) override;
88 
98 
99 
100 private:
101  void createSubStates(WizardMainWindow* mainWindow);
102 
103  bool cancelled;
104  QString name;
105  cepcoreschema::ActionExtension* domActionExtension;
106  cepcoreschema::Action* domAction;
107  cepcoreschema::Cep* domCep;
108 
109 };
110 #endif
QString name
Definition: ActionCreationState.h:104
Widget to add or remove parameters to the action.
Definition: ActionAddParameterWidget.h:46
ActionSummaryState * actionSummaryState
Definition: ActionCreationState.h:97
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:106
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:103
State to create one action.
Definition: ActionCreationState.h:61
The main window of the Wizard.
Definition: WizardMainWindow.h:43
Definition: ActionExtensionGenerator.h:36
ActionClassificationWidget * actionClassificationWidget
Definition: ActionCreationState.h:94
ActionDescriptionState * actionDescriptionState
Definition: ActionCreationState.h:91
Widget to class the action and to attribute a tag to it.
Definition: ActionClassificationWidget.h:43
ActionAddParameterWidget * actionAddParameterWidget
Definition: ActionCreationState.h:92
cepcoreschema::ActionExtension * domActionExtension
Definition: ActionCreationState.h:105
ActionDescriptionWidget * actionDescriptionWidget
Substates (to be updated with domAction at each entry)
Definition: ActionCreationState.h:90
ActionAddParameterState * actionAddParameterState
Definition: ActionCreationState.h:93
ActionClassificationState * actionClassificationState
Definition: ActionCreationState.h:95
cepcoreschema::Cep * domCep
Definition: ActionCreationState.h:107
State to create an action extension.
Definition: ActionExtensionCreationState.h:60
ActionSummaryWidget * actionSummaryWidget
Definition: ActionCreationState.h:96