Computer Assited Medical Intervention Tool Kit  version 5.0
ActionExtensionCreationState.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 ACTIONEXTENSIONCREATIONSTATE_H
26 #define ACTIONEXTENSIONCREATIONSTATE_H
27 
28 #include <QState>
29 #include <QWidget>
30 
31 class WizardMainWindow;
32 // Sub states
38 class DependenciesWidget;
42 
43 // Dependency from cepcoreschema
44 // Declaration here to avoid declaration in dependant projects.
45 namespace cepcoreschema {
46 class Cep;
47 class ActionExtension;
48 }
49 
60 class ActionExtensionCreationState : public QState {
61 
62  Q_OBJECT;
63 
64 public:
66  ActionExtensionCreationState(QString name, WizardMainWindow* mainWidnow, cepcoreschema::Cep* domCep);
67 
69  ~ActionExtensionCreationState() override = default;
70 
71 signals:
72  void next();
73 
74 public slots:
75  virtual void extensionFinished();
76  virtual void extensionCancelled();
77 
78 protected:
81  void onEntry(QEvent* event) override;
82 
83  void onExit(QEvent* event) override;
85 
86 private:
87 
88  bool cancelled;
89 
90  // Sub States
100 
101  void createSubStates(WizardMainWindow* mainWindow);
102 
103  QString name;
104  cepcoreschema::Cep* domCep;
105  cepcoreschema::ActionExtension* domActionExtension;
106 
107 };
108 #endif
ActionCreationState
State to create one action.
Definition: ActionCreationState.h:61
ActionExtensionCreationState::actionExtensionDependenciesWidget
DependenciesWidget * actionExtensionDependenciesWidget
Definition: ActionExtensionCreationState.h:96
ActionsCreationState
State to create actions.
Definition: ActionsCreationState.h:46
WizardMainWindow
The main window of the Wizard. All state widgets are contained in this window.
Definition: WizardMainWindow.h:43
ActionExtensionCreationState::onExit
void onExit(QEvent *event) override
Definition: ActionExtensionCreationState.cpp:70
ActionExtensionCreationState::name
QString name
Definition: ActionExtensionCreationState.h:103
ActionExtensionCreationState::actionExtensionSummaryWidget
ExtensionSummaryWidget * actionExtensionSummaryWidget
Definition: ActionExtensionCreationState.h:98
ExtensionSummaryState::setActionExtension
void setActionExtension(cepcoreschema::ActionExtension *domActionExtension)
Definition: ExtensionSummaryState.cpp:52
ActionExtensionCreationState::actionExtensionSummaryState
ExtensionSummaryState * actionExtensionSummaryState
Definition: ActionExtensionCreationState.h:99
ActionExtensionCreationState::actionExtensionDescriptionWidget
ActionExtensionDescriptionWidget * actionExtensionDescriptionWidget
Definition: ActionExtensionCreationState.h:91
ActionsCreationState.h
ActionExtensionCreationState::actionCreationState
ActionCreationState * actionCreationState
Definition: ActionExtensionCreationState.h:95
ActionExtensionCreationState::actionsCreationWidget
ActionsCreationWidget * actionsCreationWidget
Definition: ActionExtensionCreationState.h:93
ActionExtensionDependenciesState.h
ActionExtensionDependenciesState
State to define action extension dependencies.
Definition: ActionExtensionDependenciesState.h:45
ActionExtensionCreationState::onEntry
void onEntry(QEvent *event) override
Reimplemented from QState.
Definition: ActionExtensionCreationState.cpp:53
ActionExtensionCreationState::ActionExtensionCreationState
ActionExtensionCreationState(QString name, WizardMainWindow *mainWidnow, cepcoreschema::Cep *domCep)
Constructor.
Definition: ActionExtensionCreationState.cpp:44
ActionExtensionCreationState::cancelled
bool cancelled
Definition: ActionExtensionCreationState.h:88
ActionExtensionDependenciesState::resetDomActionExtension
void resetDomActionExtension(cepcoreschema::ActionExtension *domActionExtension)
Definition: ActionExtensionDependenciesState.cpp:44
ActionsCreationWidget
Widget to create actions.
Definition: ActionsCreationWidget.h:42
ActionExtensionCreationState::createSubStates
void createSubStates(WizardMainWindow *mainWindow)
Definition: ActionExtensionCreationState.cpp:102
ActionExtensionCreationState::actionExtensionDescriptionState
ActionExtensionDescriptionState * actionExtensionDescriptionState
Definition: ActionExtensionCreationState.h:92
ActionExtensionCreationState::extensionFinished
virtual void extensionFinished()
Definition: ActionExtensionCreationState.cpp:92
DependenciesWidget.h
ActionsCreationState::resetDomActionExtension
void resetDomActionExtension(cepcoreschema::ActionExtension *domActionExtension)
Definition: ActionsCreationState.cpp:42
ActionExtensionCreationState::~ActionExtensionCreationState
~ActionExtensionCreationState() override=default
Destructor.
ActionCreationState.h
ActionExtensionCreationState::actionExtensionDependenciesState
ActionExtensionDependenciesState * actionExtensionDependenciesState
Definition: ActionExtensionCreationState.h:97
DependenciesWidget
Widget to define dependencies.
Definition: DependenciesWidget.h:43
ActionExtensionCreationState::extensionCancelled
virtual void extensionCancelled()
Definition: ActionExtensionCreationState.cpp:97
ExtensionSummaryWidget
Widget to summarize the extension.
Definition: ExtensionSummaryWidget.h:42
ActionExtensionCreationState::next
void next()
ActionExtensionCreationState
State to create an action extension. .
Definition: ActionExtensionCreationState.h:60
ActionsCreationWidget.h
ExtensionSummaryState
State to summarize extension.
Definition: ExtensionSummaryState.h:47
ActionExtensionCreationState::domCep
cepcoreschema::Cep * domCep
Definition: ActionExtensionCreationState.h:104
ActionCreationState::resetDomActionExtension
void resetDomActionExtension(cepcoreschema::ActionExtension *domActionExtension)
Definition: ActionCreationState.cpp:55
ExtensionSummaryWidget.h
ActionExtensionDescriptionState
State to enter the action extension description.
Definition: ActionExtensionDescriptionState.h:46
ActionExtensionCreationState::actionsCreationState
ActionsCreationState * actionsCreationState
Definition: ActionExtensionCreationState.h:94
ActionExtensionCreationState::domActionExtension
cepcoreschema::ActionExtension * domActionExtension
Definition: ActionExtensionCreationState.h:105
ActionExtensionCreationState.h
ActionExtensionDescriptionState::resetDomActionExtension
void resetDomActionExtension(cepcoreschema::ActionExtension *domActionExtension)
Definition: ActionExtensionDescriptionState.cpp:41
ActionExtensionDescriptionWidget.h
cepcoreschema
Definition: ActionExtensionGenerator.h:36
WizardMainWindow.h
ExtensionSummaryState.h
ActionExtensionDescriptionState.h
ActionExtensionDescriptionWidget
Widget to enter the action extension description.
Definition: ActionExtensionDescriptionWidget.h:41