Computer Assited Medical Intervention Tool Kit  version 5.0
SaveActionState.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 SAVEACTIONSTATE_H
26 #define SAVEACTIONSTATE_H
27 
28 #include "ActionState.h"
29 
37 class SaveActionState : public ActionState {
38 
39 public:
40  typedef struct {
41  QString name;
42  QString type;
43  QString extension;
44  QString directory;
46 
49  SaveActionState(QState* parent, QString name, QString description,
50  QString defaultSaveDirName, QTextStream* logStream = nullptr);
51 
52  void setInput(QVector<saveComponentsInfo> inputComponentsInfo);
53 
55 
56 private:
57  QString defaultSaveDirName;
58 
59  /* Input components
60  * - names
61  * - types
62  * - saving extension
63  * - saving directories
64  */
65  QVector<saveComponentsInfo> inputComponentsInfo;
66 
67 };
68 #endif // SAVEACTIONSTATE_H
SaveActionState::applyAction
virtual camitk::Action::ApplyStatus applyAction()
apply the action encapsulated by this action state
Definition: SaveActionState.cpp:51
ActionState::getWidget
ActionStateWidget * getWidget()
Definition: ActionState.cpp:76
ActionState.h
SaveActionState::defaultSaveDirName
QString defaultSaveDirName
Definition: SaveActionState.h:80
camitk::Action::ApplyStatus
ApplyStatus
Definition: Action.h:247
ActionState
The state (in a state machine point of view) corresponding to the current processed action.
Definition: ActionState.h:48
ActionState::name
QString name
Name of the state action (may not be the same as the action's name)
Definition: ActionState.h:128
camitk::Action::getName
QString getName() const
get the name of the action
Definition: Action.h:338
SaveActionState::inputComponentsInfo
QVector< saveComponentsInfo > inputComponentsInfo
Definition: SaveActionState.h:88
camitk::Action::applyInPipeline
ApplyStatus applyInPipeline()
This method encapsulates the apply() method.
Definition: Action.cpp:285
camitk::Action::setInputComponents
void setInputComponents(ComponentList inputs)
Specify the input Component(s) Only applyInPipeline() should be called with this method (maybe apply)...
Definition: Action.cpp:307
Log.h
SaveActionState.h
SaveActionState::SaveActionState
SaveActionState(QState *parent, QString name, QString description, QString defaultSaveDirName, QTextStream *logStream=nullptr)
Definition: SaveActionState.cpp:40
CAMITK_ERROR
#define CAMITK_ERROR(MSG)
Log for error verbosity (the minimum verbosity) Will always appear.
Definition: Log.h:276
ActionState::logStream
QTextStream * logStream
Log stream to write report on logFile.
Definition: ActionState.h:163
description
const char * description
Definition: applications/cepgenerator/main.cpp:38
SaveActionState::setInput
void setInput(QVector< saveComponentsInfo > inputComponentsInfo)
Definition: SaveActionState.cpp:47
camitk::ComponentList
QList< Component * > ComponentList
A list of Component.
Definition: CamiTKAPI.h:127
ActionState::myAction
camitk::Action * myAction
Actual CamiTK action.
Definition: ActionState.h:136
ActionState::description
QString description
Description of the state action may not be the same as the action's description but complementary.
Definition: ActionState.h:133
camitk::refresh
void refresh()
refresh the display
SaveActionState
The asm application uses a state machine. This class implements the state of action save.
Definition: SaveActionState.h:37
SaveActionState::saveComponentsInfo
Definition: SaveActionState.h:63
Application.h
camitk
Definition: Action.cpp:35