Computer Assisted Medical Intervention Tool Kit  version 5.2
ViewerCreationState.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 VIEWERCREATIONSTATE_H
26 #define VIEWERCREATIONSTATE_H
27 
28 #include <QState>
29 #include <QWidget>
30 
31 class WizardMainWindow;
33 
34 // Sub-states
38 class ViewerSummaryState;
39 
40 // Dependency from cepcoreschema
41 // Declaration here to avoid declaration in dependant projects.
42 namespace cepcoreschema {
43 class ViewerExtension;
44 class Viewer;
45 class Cep;
46 }
47 
57 class ViewerCreationState : public QState {
58 
59  Q_OBJECT;
60 
61 public:
63  ViewerCreationState(QString name, WizardMainWindow* mainWidnow, cepcoreschema::Cep* domCep, ViewerExtensionCreationState* parent);
64 
66  ~ViewerCreationState() override = default;
67 
68  void resetDomViewerExtension(cepcoreschema::ViewerExtension* domViewerExtension);
69 
70 signals:
71  void nextVCS();
72  void nextVCS2();
73 
74 public slots:
75  virtual void viewerFinished();
76  virtual void viewerCancelled();
77 
78 protected:
81  void onEntry(QEvent* event) override;
82 
83  void onExit(QEvent* event) override;
85 
91 
92 
93 private:
94  void createSubStates(WizardMainWindow* mainWindow);
95 
96  bool cancelled;
97  QString name;
98  cepcoreschema::ViewerExtension* domViewerExtension;
99  cepcoreschema::Viewer* domViewer;
100  cepcoreschema::Cep* domCep;
101 
102 };
103 #endif
State to create one action.
Definition: ViewerCreationState.h:57
ViewerSummaryState * viewerSummaryState
Definition: ViewerCreationState.h:90
void resetDomViewerExtension(cepcoreschema::ViewerExtension *domViewerExtension)
Definition: ViewerCreationState.cpp:52
ViewerCreationState(QString name, WizardMainWindow *mainWidnow, cepcoreschema::Cep *domCep, ViewerExtensionCreationState *parent)
Constructor.
Definition: ViewerCreationState.cpp:41
ViewerSummaryWidget * viewerSummaryWidget
Definition: ViewerCreationState.h:89
ViewerDescriptionWidget * viewerDescriptionWidget
Substates (to be updated with domAction at each entry)
Definition: ViewerCreationState.h:87
void onEntry(QEvent *event) override
Reimplemented from QState.
Definition: ViewerCreationState.cpp:56
virtual void viewerFinished()
Definition: ViewerCreationState.cpp:83
void onExit(QEvent *event) override
Definition: ViewerCreationState.cpp:71
virtual void viewerCancelled()
Definition: ViewerCreationState.cpp:88
~ViewerCreationState() override=default
Destructor.
ViewerDescriptionState * viewerDescriptionState
Definition: ViewerCreationState.h:88
State to describe action.
Definition: ViewerDescriptionState.h:48
Widget to describe action.
Definition: ViewerDescriptionWidget.h:43
State to create an action extension.
Definition: ViewerExtensionCreationState.h:60
State to summarize the created action.
Definition: ViewerSummaryState.h:46
Widget to summarize the created action.
Definition: ViewerSummaryWidget.h:49
The main window of the Wizard.
Definition: WizardMainWindow.h:43
Definition: ActionExtensionGenerator.h:36