Computer Assisted Medical Intervention Tool Kit  version 5.2
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-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 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
Widget to define dependencies.
Definition: DependenciesWidget.h:43
State to copy files in library.
Definition: LibraryCopyFilesState.h:46
Widget to copy files to library.
Definition: LibraryCopyFilesWidget.h:42
State to create library.
Definition: LibraryCreationState.h:56
LibraryDescriptionWidget * libraryDescriptionWidget
Definition: LibraryCreationState.h:82
void onEntry(QEvent *event) override
Reimplemented from QState.
Definition: LibraryCreationState.cpp:52
DependenciesWidget * libraryDependenciesWidget
Definition: LibraryCreationState.h:86
LibraryCopyFilesWidget * libraryCopyFilesWidget
Definition: LibraryCreationState.h:84
LibraryDependenciesState * libraryDependenciesState
Definition: LibraryCreationState.h:87
void onExit(QEvent *event) override
Definition: LibraryCreationState.cpp:65
~LibraryCreationState() override=default
Destructor.
LibraryDescriptionState * libraryDescriptionState
Definition: LibraryCreationState.h:83
LibraryCopyFilesState * libraryCopyFilesState
Definition: LibraryCreationState.h:85
LibraryCreationState(QString name, WizardMainWindow *mainWidnow, cepcoreschema::Cep *domCep, QMap< QString, QStringList > *libraryFilesMap)
Constructor.
Definition: LibraryCreationState.cpp:42
virtual void extensionCancelled()
Definition: LibraryCreationState.cpp:92
virtual void extensionFinished()
Definition: LibraryCreationState.cpp:87
State to define dependencies to the library.
Definition: LibraryDependenciesState.h:45
State to describe library.
Definition: LibraryDescriptionState.h:46
Widget to describe a library.
Definition: LibraryDescriptionWidget.h:41
The main window of the Wizard.
Definition: WizardMainWindow.h:43
Definition: ActionExtensionGenerator.h:36