Computer Assisted Medical Intervention Tool Kit  version 5.2
ComponentExtensionCreationState.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 COMPONENTEXTENSIONCREATIONSTATE_H
26 #define COMPONENTEXTENSIONCREATIONSTATE_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 ComponentExtension;
48 }
49 
57 class ComponentExtensionCreationState : public QState {
58 
59  Q_OBJECT;
60 
61 public:
63  ComponentExtensionCreationState(QString name, WizardMainWindow* mainWidnow, cepcoreschema::Cep* domCep);
65  ~ComponentExtensionCreationState() override = default;
66 
67 signals:
68  void next();
69 
70 public slots:
71  virtual void extensionFinished();
72  virtual void extensionCancelled();
73 
74 protected:
77  void onEntry(QEvent* event) override;
78 
79  void onExit(QEvent* event) override;
81 
82 private:
83 
84  bool cancelled;
85 
86  // Sub States
87  ComponentExtensionDescriptionWidget* componentExtensionDescriptionWidget;
88  ComponentExtensionDescriptionState* componentExtensionDescriptionState;
89  ComponentsCreationWidget* componentsCreationWidget;
90  ComponentsCreationState* componentsCreationState;
91  ComponentCreationState* componentCreationState;
92  DependenciesWidget* componentExtensionDependenciesWidget;
93  ComponentExtensionDependenciesState* componentExtensionDependenciesState;
94  ExtensionSummaryWidget* componentExtensionSummaryWidget;
95  ExtensionSummaryState* componentExtensionSummaryState;
96 
97 
98  void createSubStates(WizardMainWindow* mainWindow);
99 
100  QString name;
101  cepcoreschema::Cep* domCep;
102  cepcoreschema::ComponentExtension* domComponentExtension;
103 
104 };
105 #endif
State to create one component.
Definition: ComponentCreationState.h:58
State to create component extension.
Definition: ComponentExtensionCreationState.h:57
~ComponentExtensionCreationState() override=default
Destructor.
virtual void extensionFinished()
Definition: ComponentExtensionCreationState.cpp:94
void onEntry(QEvent *event) override
Reimplemented from QState.
Definition: ComponentExtensionCreationState.cpp:53
void onExit(QEvent *event) override
Definition: ComponentExtensionCreationState.cpp:71
virtual void extensionCancelled()
Definition: ComponentExtensionCreationState.cpp:99
ComponentExtensionCreationState(QString name, WizardMainWindow *mainWidnow, cepcoreschema::Cep *domCep)
Constructor.
Definition: ComponentExtensionCreationState.cpp:44
State to define dependencies to the component extension.
Definition: ComponentExtensionDependenciesState.h:45
State to describe component extension.
Definition: ComponentExtensionDescriptionState.h:46
Widget to describe component extension.
Definition: ComponentExtensionDescriptionWidget.h:41
State to create components.
Definition: ComponentsCreationState.h:46
Widget to create components.
Definition: ComponentsCreationWidget.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