Computer Assited Medical Intervention Tool Kit  version 5.0
LibraryCreationState.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 LIBRARYCREATIONSTATE_H
26 #define LIBRARYCREATIONSTATE_H
27 
28 #include <QState>
29 #include <QWidget>
30 
31 class WizardMainWindow;
32 // Sub States
37 class DependenciesWidget;
39 
40 // Dependency from cepcoreschema
41 // Declaration here to avoid declaration in dependant projects.
42 namespace cepcoreschema {
43 class Cep;
44 class Library;
45 }
46 
56 class LibraryCreationState : public QState {
57 
58  Q_OBJECT;
59 
60 public:
62  LibraryCreationState(QString name, WizardMainWindow* mainWidnow, cepcoreschema::Cep* domCep, QMap<QString, QStringList>* libraryFilesMap);
64  ~LibraryCreationState() override = default;
65 
66 signals:
67  void next();
68 
69 public slots:
70  virtual void extensionFinished();
71  virtual void extensionCancelled();
72 
73 protected:
76  void onEntry(QEvent* event) override;
77 
78  void onExit(QEvent* event) override;
80 
81  // Sub States
88 
89 private:
90 
91  bool cancelled;
92 
93  void createSubStates(WizardMainWindow* mainWindow);
94 
95  QString name;
96  cepcoreschema::Cep* domCep;
97  cepcoreschema::Library* domLibrary;
98 
99  QMap<QString, QStringList>* libraryFilesMap;
100 
101 };
102 #endif
LibraryCreationState::domCep
cepcoreschema::Cep * domCep
Definition: LibraryCreationState.h:96
LibraryCreationState::libraryFilesMap
QMap< QString, QStringList > * libraryFilesMap
Definition: LibraryCreationState.h:99
LibraryCreationState::cancelled
bool cancelled
Definition: LibraryCreationState.h:91
LibraryDescriptionState.h
WizardMainWindow
The main window of the Wizard. All state widgets are contained in this window.
Definition: WizardMainWindow.h:43
LibraryDependenciesState.h
LibraryDependenciesState::resetDomLibrary
void resetDomLibrary(cepcoreschema::Library *domLibrary)
Definition: LibraryDependenciesState.cpp:42
LibraryDescriptionWidget.h
LibraryCreationState::createSubStates
void createSubStates(WizardMainWindow *mainWindow)
Definition: LibraryCreationState.cpp:97
LibraryCreationState::libraryCopyFilesWidget
LibraryCopyFilesWidget * libraryCopyFilesWidget
Definition: LibraryCreationState.h:84
LibraryDescriptionState::resetDomLibrary
void resetDomLibrary(cepcoreschema::Library *domLibrary)
Definition: LibraryDescriptionState.cpp:40
LibraryCreationState::next
void next()
LibraryCreationState::onExit
void onExit(QEvent *event) override
Definition: LibraryCreationState.cpp:65
LibraryCreationState::libraryDependenciesWidget
DependenciesWidget * libraryDependenciesWidget
Definition: LibraryCreationState.h:86
LibraryCreationState::extensionCancelled
virtual void extensionCancelled()
Definition: LibraryCreationState.cpp:92
LibraryCopyFilesState.h
LibraryCreationState::libraryCopyFilesState
LibraryCopyFilesState * libraryCopyFilesState
Definition: LibraryCreationState.h:85
LibraryDependenciesState
State to define dependencies to the library.
Definition: LibraryDependenciesState.h:45
LibraryCreationState
State to create library.
Definition: LibraryCreationState.h:56
LibraryDescriptionWidget
Widget to describe a library.
Definition: LibraryDescriptionWidget.h:41
DependenciesWidget.h
LibraryCreationState::libraryDependenciesState
LibraryDependenciesState * libraryDependenciesState
Definition: LibraryCreationState.h:87
LibraryCopyFilesWidget
Widget to copy files to library.
Definition: LibraryCopyFilesWidget.h:42
LibraryCreationState::domLibrary
cepcoreschema::Library * domLibrary
Definition: LibraryCreationState.h:97
LibraryCreationState.h
LibraryCreationState::onEntry
void onEntry(QEvent *event) override
Reimplemented from QState.
Definition: LibraryCreationState.cpp:52
LibraryCreationState::name
QString name
Definition: LibraryCreationState.h:95
LibraryDescriptionState
State to describe library.
Definition: LibraryDescriptionState.h:46
DependenciesWidget
Widget to define dependencies.
Definition: DependenciesWidget.h:43
LibraryCopyFilesState::resetDomLibrary
void resetDomLibrary(cepcoreschema::Library *domLibrary)
Definition: LibraryCopyFilesState.cpp:41
LibraryCreationState::libraryDescriptionState
LibraryDescriptionState * libraryDescriptionState
Definition: LibraryCreationState.h:83
LibraryCreationState::extensionFinished
virtual void extensionFinished()
Definition: LibraryCreationState.cpp:87
LibraryCreationState::libraryDescriptionWidget
LibraryDescriptionWidget * libraryDescriptionWidget
Definition: LibraryCreationState.h:82
LibraryCopyFilesWidget.h
LibraryCreationState::LibraryCreationState
LibraryCreationState(QString name, WizardMainWindow *mainWidnow, cepcoreschema::Cep *domCep, QMap< QString, QStringList > *libraryFilesMap)
Constructor.
Definition: LibraryCreationState.cpp:42
cepcoreschema
Definition: ActionExtensionGenerator.h:36
LibraryCopyFilesState
State to copy files in library.
Definition: LibraryCopyFilesState.h:46
WizardMainWindow.h
LibraryCreationState::~LibraryCreationState
~LibraryCreationState() override=default
Destructor.