Computer Assited Medical Intervention Tool Kit  version 4.1
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-2018 Univ. Grenoble Alpes, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
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
LibraryCopyFilesWidget * libraryCopyFilesWidget
Definition: LibraryCreationState.h:84
Widget to define dependencies.
Definition: DependenciesWidget.h:43
Widget to describe a library.
Definition: LibraryDescriptionWidget.h:41
State to copy files in library.
Definition: LibraryCopyFilesState.h:46
State to define dependencies to the library.
Definition: LibraryDependenciesState.h:45
DependenciesWidget * libraryDependenciesWidget
Definition: LibraryCreationState.h:86
LibraryDescriptionState * libraryDescriptionState
Definition: LibraryCreationState.h:83
LibraryDependenciesState * libraryDependenciesState
Definition: LibraryCreationState.h:87
State to create library.
Definition: LibraryCreationState.h:56
The main window of the Wizard.
Definition: WizardMainWindow.h:43
Definition: ActionExtensionGenerator.h:36
cepcoreschema::Cep * domCep
Definition: LibraryCreationState.h:96
QString name
Definition: LibraryCreationState.h:95
State to describe library.
Definition: LibraryDescriptionState.h:46
QMap< QString, QStringList > * libraryFilesMap
Definition: LibraryCreationState.h:99
cepcoreschema::Library * domLibrary
Definition: LibraryCreationState.h:97
LibraryCopyFilesState * libraryCopyFilesState
Definition: LibraryCreationState.h:85
LibraryDescriptionWidget * libraryDescriptionWidget
Definition: LibraryCreationState.h:82
bool cancelled
Definition: LibraryCreationState.h:91
Widget to copy files to library.
Definition: LibraryCopyFilesWidget.h:42