Computer Assited Medical Intervention Tool Kit  version 5.0
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-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 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
ViewerCreationState::onEntry
void onEntry(QEvent *event) override
Reimplemented from QState.
Definition: ViewerCreationState.cpp:56
ViewerCreationState
State to create one action.
Definition: ViewerCreationState.h:57
ViewerDescriptionState::resetDomViewer
void resetDomViewer(cepcoreschema::Viewer *domViewer, cepcoreschema::ViewerExtension *domViewerExtension)
Definition: ViewerDescriptionState.cpp:52
WizardMainWindow
The main window of the Wizard. All state widgets are contained in this window.
Definition: WizardMainWindow.h:43
ViewerCreationState::cancelled
bool cancelled
Definition: ViewerCreationState.h:96
ViewerCreationState::viewerFinished
virtual void viewerFinished()
Definition: ViewerCreationState.cpp:83
ViewerDescriptionWidget
Widget to describe action.
Definition: ViewerDescriptionWidget.h:43
ViewerCreationState::viewerSummaryState
ViewerSummaryState * viewerSummaryState
Definition: ViewerCreationState.h:90
ViewerSummaryState.h
ViewerCreationState::domViewer
cepcoreschema::Viewer * domViewer
Definition: ViewerCreationState.h:99
ViewerSummaryState::resetViewer
void resetViewer(cepcoreschema::Viewer *domViewer)
Definition: ViewerSummaryState.cpp:45
ViewerCreationState::onExit
void onExit(QEvent *event) override
Definition: ViewerCreationState.cpp:71
ViewerCreationState::~ViewerCreationState
~ViewerCreationState() override=default
Destructor.
ViewerCreationState::createSubStates
void createSubStates(WizardMainWindow *mainWindow)
Definition: ViewerCreationState.cpp:93
ViewerCreationState::ViewerCreationState
ViewerCreationState(QString name, WizardMainWindow *mainWidnow, cepcoreschema::Cep *domCep, ViewerExtensionCreationState *parent)
Constructor.
Definition: ViewerCreationState.cpp:41
ViewerCreationState::nextVCS
void nextVCS()
ViewerCreationState::viewerDescriptionState
ViewerDescriptionState * viewerDescriptionState
Definition: ViewerCreationState.h:88
ViewerDescriptionWidget.h
ViewerSummaryWidget.h
ViewerDescriptionState.h
ViewerCreationState::nextVCS2
void nextVCS2()
ViewerCreationState::domViewerExtension
cepcoreschema::ViewerExtension * domViewerExtension
Definition: ViewerCreationState.h:98
ViewerDescriptionState
State to describe action.
Definition: ViewerDescriptionState.h:48
ViewerCreationState::viewerSummaryWidget
ViewerSummaryWidget * viewerSummaryWidget
Definition: ViewerCreationState.h:89
ViewerCreationState::resetDomViewerExtension
void resetDomViewerExtension(cepcoreschema::ViewerExtension *domViewerExtension)
Definition: ViewerCreationState.cpp:52
ViewerExtensionCreationState
State to create an action extension. .
Definition: ViewerExtensionCreationState.h:60
ViewerCreationState.h
ViewerCreationState::viewerCancelled
virtual void viewerCancelled()
Definition: ViewerCreationState.cpp:88
ViewerSummaryState
State to summarize the created action.
Definition: ViewerSummaryState.h:46
ViewerSummaryWidget
Widget to summarize the created action.
Definition: ViewerSummaryWidget.h:49
ViewerCreationState::viewerDescriptionWidget
ViewerDescriptionWidget * viewerDescriptionWidget
Substates (to be updated with domAction at each entry)
Definition: ViewerCreationState.h:87
ViewerExtensionCreationState.h
cepcoreschema
Definition: ActionExtensionGenerator.h:36
ViewerCreationState::domCep
cepcoreschema::Cep * domCep
Definition: ViewerCreationState.h:100
WizardMainWindow.h
ViewerCreationState::name
QString name
Definition: ViewerCreationState.h:97