Computer Assisted Medical Intervention Tool Kit  version 5.2
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-2024 Univ. Grenoble Alpes, CNRS, Grenoble INP - UGA, 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
91  ActionExtensionDescriptionWidget* actionExtensionDescriptionWidget;
92  ActionExtensionDescriptionState* actionExtensionDescriptionState;
93  ActionsCreationWidget* actionsCreationWidget;
94  ActionsCreationState* actionsCreationState;
95  ActionCreationState* actionCreationState;
96  DependenciesWidget* actionExtensionDependenciesWidget;
97  ActionExtensionDependenciesState* actionExtensionDependenciesState;
98  ExtensionSummaryWidget* actionExtensionSummaryWidget;
99  ExtensionSummaryState* actionExtensionSummaryState;
100 
101  void createSubStates(WizardMainWindow* mainWindow);
102 
103  QString name;
104  cepcoreschema::Cep* domCep;
105  cepcoreschema::ActionExtension* domActionExtension;
106 
107 };
108 #endif
State to create one action.
Definition: ActionCreationState.h:61
State to create an action extension.
Definition: ActionExtensionCreationState.h:60
virtual void extensionCancelled()
Definition: ActionExtensionCreationState.cpp:97
~ActionExtensionCreationState() override=default
Destructor.
virtual void extensionFinished()
Definition: ActionExtensionCreationState.cpp:92
void onExit(QEvent *event) override
Definition: ActionExtensionCreationState.cpp:70
ActionExtensionCreationState(QString name, WizardMainWindow *mainWidnow, cepcoreschema::Cep *domCep)
Constructor.
Definition: ActionExtensionCreationState.cpp:44
void onEntry(QEvent *event) override
Reimplemented from QState.
Definition: ActionExtensionCreationState.cpp:53
State to define action extension dependencies.
Definition: ActionExtensionDependenciesState.h:45
State to enter the action extension description.
Definition: ActionExtensionDescriptionState.h:46
Widget to enter the action extension description.
Definition: ActionExtensionDescriptionWidget.h:41
State to create actions.
Definition: ActionsCreationState.h:46
Widget to create actions.
Definition: ActionsCreationWidget.h:42
Widget to define dependencies.
Definition: DependenciesWidget.h:43
State to summarize extension.
Definition: ExtensionSummaryState.h:47
Widget to summarize the extension.
Definition: ExtensionSummaryWidget.h:42
The main window of the Wizard.
Definition: WizardMainWindow.h:43
Definition: ActionExtensionGenerator.h:36