Computer Assited Medical Intervention Tool Kit  version 4.1
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-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 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
Widget to define dependencies.
Definition: DependenciesWidget.h:43
State to define action extension dependencies.
Definition: ActionExtensionDependenciesState.h:45
ActionExtensionDependenciesState * actionExtensionDependenciesState
Definition: ActionExtensionCreationState.h:97
Widget to create actions.
Definition: ActionsCreationWidget.h:42
cepcoreschema::Cep * domCep
Definition: ActionExtensionCreationState.h:104
State to enter the action extension description.
Definition: ActionExtensionDescriptionState.h:46
ActionsCreationState * actionsCreationState
Definition: ActionExtensionCreationState.h:94
State to create one action.
Definition: ActionCreationState.h:61
cepcoreschema::ActionExtension * domActionExtension
Definition: ActionExtensionCreationState.h:105
The main window of the Wizard.
Definition: WizardMainWindow.h:43
Definition: ActionExtensionGenerator.h:36
Widget to enter the action extension description.
Definition: ActionExtensionDescriptionWidget.h:41
Widget to summarize the extension.
Definition: ExtensionSummaryWidget.h:42
QString name
Definition: ActionExtensionCreationState.h:103
DependenciesWidget * actionExtensionDependenciesWidget
Definition: ActionExtensionCreationState.h:96
State to create actions.
Definition: ActionsCreationState.h:46
ActionExtensionDescriptionWidget * actionExtensionDescriptionWidget
Definition: ActionExtensionCreationState.h:91
ExtensionSummaryWidget * actionExtensionSummaryWidget
Definition: ActionExtensionCreationState.h:98
ExtensionSummaryState * actionExtensionSummaryState
Definition: ActionExtensionCreationState.h:99
ActionCreationState * actionCreationState
Definition: ActionExtensionCreationState.h:95
ActionsCreationWidget * actionsCreationWidget
Definition: ActionExtensionCreationState.h:93
State to summarize extension.
Definition: ExtensionSummaryState.h:46
bool cancelled
Definition: ActionExtensionCreationState.h:88
State to create an action extension.
Definition: ActionExtensionCreationState.h:60
ActionExtensionDescriptionState * actionExtensionDescriptionState
Definition: ActionExtensionCreationState.h:92