Computer Assited Medical Intervention Tool Kit  version 5.0
ViewerExtensionCreationState.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 VIEWEREXTENSIONCREATIONSTATE_H
26 #define VIEWEREXTENSIONCREATIONSTATE_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 ViewerExtension;
48 }
49 
60 class ViewerExtensionCreationState : public QState {
61 
62  Q_OBJECT;
63 
64 public:
66  ViewerExtensionCreationState(QString name, WizardMainWindow* mainWidnow, cepcoreschema::Cep* domCep);
67 
69  ~ViewerExtensionCreationState() override = default;
70 
71 signals:
72  void next();
73 
74 public slots:
75  virtual void extensionFinished();
76  virtual void extensionCancelled();
77 
78 protected:
81  void onEntry(QEvent* event) override;
82 
83  void onExit(QEvent* event) override;
85 
86 private:
87 
88  bool cancelled;
89 
90  // Sub States
100 
101  void createSubStates(WizardMainWindow* mainWindow);
102 
103  QString name;
104  cepcoreschema::Cep* domCep;
105  cepcoreschema::ViewerExtension* domViewerExtension;
106 
107 };
108 #endif
ViewerCreationState
State to create one action.
Definition: ViewerCreationState.h:57
ViewerExtensionCreationState::viewerExtensionDescriptionWidget
ViewerExtensionDescriptionWidget * viewerExtensionDescriptionWidget
Definition: ViewerExtensionCreationState.h:91
WizardMainWindow
The main window of the Wizard. All state widgets are contained in this window.
Definition: WizardMainWindow.h:43
ViewersCreationWidget.h
ViewersCreationState
State to create actions.
Definition: ViewersCreationState.h:46
ViewerExtensionDependenciesState
State to define action extension dependencies.
Definition: ViewerExtensionDependenciesState.h:45
ViewersCreationState::resetDomViewerExtension
void resetDomViewerExtension(cepcoreschema::ViewerExtension *domViewerExtension)
Definition: ViewersCreationState.cpp:43
ViewerExtensionCreationState::domViewerExtension
cepcoreschema::ViewerExtension * domViewerExtension
Definition: ViewerExtensionCreationState.h:105
ExtensionSummaryState::setViewerExtension
void setViewerExtension(cepcoreschema::ViewerExtension *domViewerExtension)
Definition: ExtensionSummaryState.cpp:69
ViewerExtensionDescriptionWidget
Widget to enter the action extension description.
Definition: ViewerExtensionDescriptionWidget.h:41
ViewerExtensionCreationState::viewerExtensionSummaryWidget
ExtensionSummaryWidget * viewerExtensionSummaryWidget
Definition: ViewerExtensionCreationState.h:98
ViewerExtensionCreationState::cancelled
bool cancelled
Definition: ViewerExtensionCreationState.h:88
ViewersCreationState.h
ViewerExtensionCreationState::viewerExtensionSummaryState
ExtensionSummaryState * viewerExtensionSummaryState
Definition: ViewerExtensionCreationState.h:99
ViewerExtensionCreationState::next
void next()
ViewersCreationWidget
Widget to create actions.
Definition: ViewersCreationWidget.h:45
ViewerExtensionCreationState::domCep
cepcoreschema::Cep * domCep
Definition: ViewerExtensionCreationState.h:104
ViewerExtensionCreationState::viewersCreationWidget
ViewersCreationWidget * viewersCreationWidget
Definition: ViewerExtensionCreationState.h:93
ViewerExtensionCreationState::onEntry
void onEntry(QEvent *event) override
Reimplemented from QState.
Definition: ViewerExtensionCreationState.cpp:53
ViewerExtensionCreationState::ViewerExtensionCreationState
ViewerExtensionCreationState(QString name, WizardMainWindow *mainWidnow, cepcoreschema::Cep *domCep)
Constructor.
Definition: ViewerExtensionCreationState.cpp:44
DependenciesWidget.h
ViewerExtensionCreationState::viewersCreationState
ViewersCreationState * viewersCreationState
Definition: ViewerExtensionCreationState.h:94
ViewerExtensionDescriptionState::resetDomViewerExtension
void resetDomViewerExtension(cepcoreschema::ViewerExtension *domViewerExtension)
Definition: ViewerExtensionDescriptionState.cpp:40
ViewerExtensionDependenciesState::resetDomViewerExtension
void resetDomViewerExtension(cepcoreschema::ViewerExtension *domViewerExtension)
Definition: ViewerExtensionDependenciesState.cpp:42
ViewerExtensionCreationState::extensionCancelled
virtual void extensionCancelled()
Definition: ViewerExtensionCreationState.cpp:96
ViewerExtensionCreationState::viewerCreationState
ViewerCreationState * viewerCreationState
Definition: ViewerExtensionCreationState.h:95
ViewerExtensionCreationState::viewerExtensionDescriptionState
ViewerExtensionDescriptionState * viewerExtensionDescriptionState
Definition: ViewerExtensionCreationState.h:92
ViewerExtensionDescriptionWidget.h
ViewerExtensionDependenciesState.h
ViewerCreationState::resetDomViewerExtension
void resetDomViewerExtension(cepcoreschema::ViewerExtension *domViewerExtension)
Definition: ViewerCreationState.cpp:52
DependenciesWidget
Widget to define dependencies.
Definition: DependenciesWidget.h:43
ViewerExtensionCreationState::viewerExtensionDependenciesWidget
DependenciesWidget * viewerExtensionDependenciesWidget
Definition: ViewerExtensionCreationState.h:96
ViewerExtensionDescriptionState.h
ExtensionSummaryWidget
Widget to summarize the extension.
Definition: ExtensionSummaryWidget.h:42
ViewerExtensionCreationState
State to create an action extension. .
Definition: ViewerExtensionCreationState.h:60
ViewerExtensionCreationState::extensionFinished
virtual void extensionFinished()
Definition: ViewerExtensionCreationState.cpp:91
ViewerCreationState.h
ExtensionSummaryState
State to summarize extension.
Definition: ExtensionSummaryState.h:47
ExtensionSummaryWidget.h
ViewerExtensionDescriptionState
State to enter the action extension description.
Definition: ViewerExtensionDescriptionState.h:46
ViewerExtensionCreationState::onExit
void onExit(QEvent *event) override
Definition: ViewerExtensionCreationState.cpp:70
ViewerExtensionCreationState.h
ViewerExtensionCreationState::viewerExtensionDependenciesState
ViewerExtensionDependenciesState * viewerExtensionDependenciesState
Definition: ViewerExtensionCreationState.h:97
ViewerExtensionCreationState::name
QString name
Definition: ViewerExtensionCreationState.h:103
ViewerExtensionCreationState::~ViewerExtensionCreationState
~ViewerExtensionCreationState() override=default
Destructor.
cepcoreschema
Definition: ActionExtensionGenerator.h:36
WizardMainWindow.h
ExtensionSummaryState.h
ViewerExtensionCreationState::createSubStates
void createSubStates(WizardMainWindow *mainWindow)
Definition: ViewerExtensionCreationState.cpp:101