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