Computer Assited Medical Intervention Tool Kit  version 5.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-2021 Univ. Grenoble Alpes, CNRS, Grenoble INP, TIMC, 38000 Grenoble, France
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
33
34// Sub-states
43
44// Dependency from cepcoreschema
45// Declaration here to avoid declaration in dependant projects.
46namespace cepcoreschema {
47class ActionExtension;
48class Action;
49class Cep;
50}
51
61class ActionCreationState : public QState {
62
63 Q_OBJECT;
64
65public:
67 ActionCreationState(QString name, WizardMainWindow* mainWidnow, cepcoreschema::Cep* domCep, ActionExtensionCreationState* parent);
68
70 ~ActionCreationState() override = default;
71
72 void resetDomActionExtension(cepcoreschema::ActionExtension* domActionExtension);
73
74signals:
75 void nextACS();
76
77public slots:
78 virtual void actionFinished();
79 virtual void actionCancelled();
80
81protected:
84 void onEntry(QEvent* event) override;
85
86 void onExit(QEvent* event) override;
88
98
99
100private:
101 void createSubStates(WizardMainWindow* mainWindow);
102
104 QString name;
105 cepcoreschema::ActionExtension* domActionExtension;
106 cepcoreschema::Action* domAction;
107 cepcoreschema::Cep* domCep;
108
109};
110#endif
State to add parameters in the action.
Definition: ActionAddParameterState.h:49
Widget to add or remove parameters to the action.
Definition: ActionAddParameterWidget.h:46
State to class the action and to attribute a tag to it.
Definition: ActionClassificationState.h:46
Widget to class the action and to attribute a tag to it.
Definition: ActionClassificationWidget.h:43
State to create one action.
Definition: ActionCreationState.h:61
cepcoreschema::ActionExtension * domActionExtension
Definition: ActionCreationState.h:105
ActionDescriptionWidget * actionDescriptionWidget
Substates (to be updated with domAction at each entry)
Definition: ActionCreationState.h:90
~ActionCreationState() override=default
Destructor.
void onEntry(QEvent *event) override
Reimplemented from QState.
Definition: ActionCreationState.cpp:59
bool cancelled
Definition: ActionCreationState.h:103
ActionCreationState(QString name, WizardMainWindow *mainWidnow, cepcoreschema::Cep *domCep, ActionExtensionCreationState *parent)
Constructor.
Definition: ActionCreationState.cpp:44
virtual void actionCancelled()
Definition: ActionCreationState.cpp:93
QString name
Definition: ActionCreationState.h:104
void onExit(QEvent *event) override
Definition: ActionCreationState.cpp:76
ActionClassificationWidget * actionClassificationWidget
Definition: ActionCreationState.h:94
ActionDescriptionState * actionDescriptionState
Definition: ActionCreationState.h:91
virtual void actionFinished()
Definition: ActionCreationState.cpp:88
void createSubStates(WizardMainWindow *mainWindow)
Definition: ActionCreationState.cpp:98
void resetDomActionExtension(cepcoreschema::ActionExtension *domActionExtension)
Definition: ActionCreationState.cpp:55
cepcoreschema::Action * domAction
Definition: ActionCreationState.h:106
ActionAddParameterState * actionAddParameterState
Definition: ActionCreationState.h:93
ActionSummaryWidget * actionSummaryWidget
Definition: ActionCreationState.h:96
ActionClassificationState * actionClassificationState
Definition: ActionCreationState.h:95
ActionSummaryState * actionSummaryState
Definition: ActionCreationState.h:97
ActionAddParameterWidget * actionAddParameterWidget
Definition: ActionCreationState.h:92
cepcoreschema::Cep * domCep
Definition: ActionCreationState.h:107
State to describe action.
Definition: ActionDescriptionState.h:48
Widget to describe action.
Definition: ActionDescriptionWidget.h:41
State to create an action extension.
Definition: ActionExtensionCreationState.h:60
State to summarize the created action.
Definition: ActionSummaryState.h:45
Widget to summarize the created action.
Definition: ActionSummaryWidget.h:42
The main window of the Wizard.
Definition: WizardMainWindow.h:43
Definition: ActionExtensionGenerator.h:36