Computer Assited Medical Intervention Tool Kit  version 5.0
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-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 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
96 
97 
98  void createSubStates(WizardMainWindow* mainWindow);
99 
100  QString name;
101  cepcoreschema::Cep* domCep;
102  cepcoreschema::ComponentExtension* domComponentExtension;
103 
104 };
105 #endif
ComponentExtensionCreationState
State to create component extension.
Definition: ComponentExtensionCreationState.h:57
ComponentExtensionCreationState::cancelled
bool cancelled
Definition: ComponentExtensionCreationState.h:84
WizardMainWindow
The main window of the Wizard. All state widgets are contained in this window.
Definition: WizardMainWindow.h:43
ComponentCreationState::resetDomComponentExtension
void resetDomComponentExtension(cepcoreschema::ComponentExtension *domComponentExtension)
Definition: ComponentCreationState.cpp:52
ComponentExtensionCreationState::~ComponentExtensionCreationState
~ComponentExtensionCreationState() override=default
Destructor.
ComponentCreationState
State to create one component.
Definition: ComponentCreationState.h:58
ComponentExtensionCreationState::componentsCreationWidget
ComponentsCreationWidget * componentsCreationWidget
Definition: ComponentExtensionCreationState.h:89
ComponentExtensionDependenciesState::resetDomComponentExtension
void resetDomComponentExtension(cepcoreschema::ComponentExtension *domComponentExtension)
Definition: ComponentExtensionDependenciesState.cpp:44
ComponentExtensionCreationState::domComponentExtension
cepcoreschema::ComponentExtension * domComponentExtension
Definition: ComponentExtensionCreationState.h:102
ComponentsCreationState
State to create components.
Definition: ComponentsCreationState.h:46
ComponentsCreationWidget
Widget to create components.
Definition: ComponentsCreationWidget.h:42
ComponentExtensionDependenciesState.h
ComponentExtensionCreationState::componentsCreationState
ComponentsCreationState * componentsCreationState
Definition: ComponentExtensionCreationState.h:90
ComponentExtensionDescriptionState
State to describe component extension.
Definition: ComponentExtensionDescriptionState.h:46
ComponentExtensionDescriptionWidget
Widget to describe component extension.
Definition: ComponentExtensionDescriptionWidget.h:41
ComponentExtensionCreationState::next
void next()
ComponentExtensionCreationState::createSubStates
void createSubStates(WizardMainWindow *mainWindow)
Definition: ComponentExtensionCreationState.cpp:105
ComponentExtensionCreationState::componentExtensionDependenciesState
ComponentExtensionDependenciesState * componentExtensionDependenciesState
Definition: ComponentExtensionCreationState.h:93
ComponentExtensionCreationState::componentCreationState
ComponentCreationState * componentCreationState
Definition: ComponentExtensionCreationState.h:91
ComponentExtensionCreationState::extensionFinished
virtual void extensionFinished()
Definition: ComponentExtensionCreationState.cpp:94
ComponentExtensionCreationState::componentExtensionDescriptionWidget
ComponentExtensionDescriptionWidget * componentExtensionDescriptionWidget
Definition: ComponentExtensionCreationState.h:87
ComponentExtensionCreationState::onExit
void onExit(QEvent *event) override
Definition: ComponentExtensionCreationState.cpp:71
ComponentExtensionDescriptionState::resetDomComponentExtension
void resetDomComponentExtension(cepcoreschema::ComponentExtension *domComponentExtension)
Definition: ComponentExtensionDescriptionState.cpp:41
DependenciesWidget.h
ComponentExtensionCreationState.h
ExtensionSummaryState::setComponentExtension
void setComponentExtension(cepcoreschema::ComponentExtension *domComponentExtension)
Definition: ExtensionSummaryState.cpp:60
ComponentExtensionCreationState::componentExtensionSummaryWidget
ExtensionSummaryWidget * componentExtensionSummaryWidget
Definition: ComponentExtensionCreationState.h:94
ComponentExtensionCreationState::onEntry
void onEntry(QEvent *event) override
Reimplemented from QState.
Definition: ComponentExtensionCreationState.cpp:53
ComponentExtensionCreationState::name
QString name
Definition: ComponentExtensionCreationState.h:100
ComponentExtensionCreationState::componentExtensionSummaryState
ExtensionSummaryState * componentExtensionSummaryState
Definition: ComponentExtensionCreationState.h:95
ComponentExtensionCreationState::componentExtensionDescriptionState
ComponentExtensionDescriptionState * componentExtensionDescriptionState
Definition: ComponentExtensionCreationState.h:88
ComponentExtensionCreationState::domCep
cepcoreschema::Cep * domCep
Definition: ComponentExtensionCreationState.h:101
ComponentCreationState.h
ComponentExtensionDescriptionWidget.h
ComponentExtensionDescriptionState.h
DependenciesWidget
Widget to define dependencies.
Definition: DependenciesWidget.h:43
ComponentExtensionCreationState::ComponentExtensionCreationState
ComponentExtensionCreationState(QString name, WizardMainWindow *mainWidnow, cepcoreschema::Cep *domCep)
Constructor.
Definition: ComponentExtensionCreationState.cpp:44
ExtensionSummaryWidget
Widget to summarize the extension.
Definition: ExtensionSummaryWidget.h:42
ComponentsCreationState.h
ComponentExtensionCreationState::componentExtensionDependenciesWidget
DependenciesWidget * componentExtensionDependenciesWidget
Definition: ComponentExtensionCreationState.h:92
ExtensionSummaryState
State to summarize extension.
Definition: ExtensionSummaryState.h:47
ExtensionSummaryWidget.h
ComponentExtensionDependenciesState
State to define dependencies to the component extension.
Definition: ComponentExtensionDependenciesState.h:45
ComponentExtensionCreationState::extensionCancelled
virtual void extensionCancelled()
Definition: ComponentExtensionCreationState.cpp:99
cepcoreschema
Definition: ActionExtensionGenerator.h:36
WizardMainWindow.h
ExtensionSummaryState.h
ComponentsCreationWidget.h
ComponentsCreationState::resetDomComponentExtension
void resetDomComponentExtension(cepcoreschema::ComponentExtension *domComponentExtension)
Definition: ComponentsCreationState.cpp:41