Computer Assited Medical Intervention Tool Kit  version 4.1
ComponentCreationState.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 COMPONENTCREATIONSTATE_H
26 #define COMPONENTCREATIONSTATE_H
27 
28 #include <QState>
29 #include <QWidget>
30 
31 class WizardMainWindow;
33 
34 // Sub-States
41 
42 // Dependency from cepcoreschema
43 // Declaration here to avoid declaration in dependant projects.
44 namespace cepcoreschema {
45 class ComponentExtension;
46 class Component;
47 }
48 
58 class ComponentCreationState : public QState {
59 
60  Q_OBJECT;
61 
62 public:
66  ~ComponentCreationState() override = default;
67 
68  void resetDomComponentExtension(cepcoreschema::ComponentExtension* domComponentExtension);
69 
70 signals:
71  void nextCCS();
72 
73 public slots:
74  virtual void componentFinished();
75  virtual void componentCancelled();
76 
77 protected:
80  void onEntry(QEvent* event) override;
81 
82  void onExit(QEvent* event) override;
84 
85  // Substates (to be updated with domComponent at each entry)
92 
93 private:
94  void createSubStates(WizardMainWindow* mainWindow);
95 
96  bool cancelled;
97  QString name;
98  cepcoreschema::ComponentExtension* domComponentExtension;
99  cepcoreschema::Component* domComponent;
100 
101 };
102 #endif
Widget to add or remove properties to the component.
Definition: ComponentAddPropertyWidget.h:46
Widget to describe component.
Definition: ComponentDescriptionWidget.h:41
ComponentAddPropertyWidget * componentAddPropertyWidget
Definition: ComponentCreationState.h:88
ComponentDescriptionWidget * componentDescriptionWidget
Definition: ComponentCreationState.h:86
State to create component extension.
Definition: ComponentExtensionCreationState.h:57
QString name
Definition: ComponentCreationState.h:97
ComponentDescriptionState * componentDescriptionState
Definition: ComponentCreationState.h:87
cepcoreschema::Component * domComponent
Definition: ComponentCreationState.h:99
The main window of the Wizard.
Definition: WizardMainWindow.h:43
Definition: ActionExtensionGenerator.h:36
A component is something that composed something and could also be a part of something.
Definition: modeling/libraries/pml/Component.h:48
State to create one component.
Definition: ComponentCreationState.h:58
State to summarise component creation.
Definition: ComponentSummaryState.h:45
ComponentSummaryWidget * componentSummaryWidget
Definition: ComponentCreationState.h:90
ComponentSummaryState * componentSummaryState
Definition: ComponentCreationState.h:91
ComponentAddPropertyState * componentAddPropertyState
Definition: ComponentCreationState.h:89
bool cancelled
Definition: ComponentCreationState.h:96
State to describe component.
Definition: ComponentDescriptionState.h:47
cepcoreschema::ComponentExtension * domComponentExtension
Definition: ComponentCreationState.h:98
Widget to summarise the component creation.
Definition: ComponentSummaryWidget.h:42
State to add a property to a component.
Definition: ComponentAddPropertyState.h:49