Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <mitkUndoController.h>
Public Types | |
enum | UndoType { LIMITEDLINEARUNDO, VERBOSE_LIMITEDLINEARUNDO, TREEUNDO } |
typedef std::map< UndoType, UndoModel::Pointer > | UndoModelMap |
typedef std::map< UndoType, UndoModel::Pointer >::iterator | UndoModelMapIter |
Public Member Functions | |
UndoController (UndoType undoType=DEFAULTUNDOMODEL) | |
virtual | ~UndoController () |
bool | SetOperationEvent (UndoStackItem *operationEvent) |
bool | Undo () |
calls the UndoMechanism to undo the last change More... | |
bool | Undo (bool fine) |
calls the UndoMechanism to undo the last change More... | |
bool | Redo () |
calls the RedoMechanism to redo the operations undone More... | |
bool | Redo (bool fine) |
calls the RedoMechanism to redo the operations undone More... | |
void | Clear () |
Clears the Undo and the RedoList. More... | |
void | ClearRedoList () |
Clears the RedoList. More... | |
bool | RedoListEmpty () |
returns true, if the RedoList is empty More... | |
bool | SwitchUndoModel (UndoType undoType) |
bool | AddUndoModel (UndoType undoType) |
bool | RemoveUndoModel (UndoType undoType) |
int | GetLastObjectEventIdInList () |
returns the ObjectEventId of the top Element in the OperationHistory of the selected UndoModel More... | |
int | GetLastGroupEventIdInList () |
returns the GroupEventId of the top Element in the OperationHistory of the selected UndoModel More... | |
OperationEvent * | GetLastOfType (OperationActor *destination, OperationType opType) |
returns the last specified OperationEvent in Undo-list corresponding to the given value; if nothing found, then returns nullptr More... | |
Static Public Member Functions | |
static UndoModel * | GetCurrentUndoModel () |
gives access to the currently used UndoModel Introduced to access special functions of more specific UndoModels, especially to retrieve text descriptions of the undo/redo stack More... | |
Static Public Attributes | |
static const UndoType | DEFAULTUNDOMODEL |
Default UndoModel to use. More... | |
Definition at line 24 of file mitkUndoController.h.
typedef std::map<UndoType, UndoModel::Pointer> mitk::UndoController::UndoModelMap |
Definition at line 35 of file mitkUndoController.h.
typedef std::map<UndoType, UndoModel::Pointer>::iterator mitk::UndoController::UndoModelMapIter |
Definition at line 36 of file mitkUndoController.h.
Enumerator | |
---|---|
LIMITEDLINEARUNDO | |
VERBOSE_LIMITEDLINEARUNDO | |
TREEUNDO |
Definition at line 28 of file mitkUndoController.h.
mitk::UndoController::UndoController | ( | UndoType | undoType = DEFAULTUNDOMODEL | ) |
Constructor; Adds the new UndoType or if undoType exists , switches it to undoType; for UndoTypes see definitionmitkInteractionConst.h
Definition at line 27 of file mitkUndoController.cpp.
References LIMITEDLINEARUNDO, mitk::VerboseLimitedLinearUndo::New(), mitk::LimitedLinearUndo::New(), SwitchUndoModel(), and VERBOSE_LIMITEDLINEARUNDO.
|
virtual |
Definition at line 54 of file mitkUndoController.cpp.
bool mitk::UndoController::AddUndoModel | ( | UndoType | undoType | ) |
adds a new kind of UndoModel to the set of UndoModels and switches to that UndoModel if the UndoModel exists already in the List, then nothing is done
Definition at line 133 of file mitkUndoController.cpp.
References LIMITEDLINEARUNDO, mitk::VerboseLimitedLinearUndo::New(), mitk::LimitedLinearUndo::New(), and VERBOSE_LIMITEDLINEARUNDO.
void mitk::UndoController::Clear | ( | ) |
Clears the Undo and the RedoList.
Definition at line 92 of file mitkUndoController.cpp.
void mitk::UndoController::ClearRedoList | ( | ) |
Clears the RedoList.
Definition at line 97 of file mitkUndoController.cpp.
|
static |
gives access to the currently used UndoModel Introduced to access special functions of more specific UndoModels, especially to retrieve text descriptions of the undo/redo stack
Definition at line 210 of file mitkUndoController.cpp.
Referenced by QmitkSlicesInterpolator::AcceptAllInterpolations(), mitk::OverwriteSliceImageFilter::GenerateData(), QmitkExtWorkbenchWindowAdvisor::onAbout(), QmitkSliceBasedInterpolatorWidget::OnAcceptInterpolationClicked(), QmitkSurfaceBasedInterpolatorWidget::OnToggleWidgetActivation(), QmitkSliceBasedInterpolatorWidget::OnToggleWidgetActivation(), QmitkRedoAction::Run(), QmitkUndoAction::Run(), and mitk::SegTool2D::WriteSliceToVolume().
int mitk::UndoController::GetLastGroupEventIdInList | ( | ) |
returns the GroupEventId of the top Element in the OperationHistory of the selected UndoModel
Definition at line 200 of file mitkUndoController.cpp.
int mitk::UndoController::GetLastObjectEventIdInList | ( | ) |
returns the ObjectEventId of the top Element in the OperationHistory of the selected UndoModel
Definition at line 195 of file mitkUndoController.cpp.
mitk::OperationEvent * mitk::UndoController::GetLastOfType | ( | OperationActor * | destination, |
OperationType | opType | ||
) |
returns the last specified OperationEvent in Undo-list corresponding to the given value; if nothing found, then returns nullptr
Definition at line 205 of file mitkUndoController.cpp.
bool mitk::UndoController::Redo | ( | ) |
calls the RedoMechanism to redo the operations undone
read the Documentation of Undo!
Definition at line 78 of file mitkUndoController.cpp.
bool mitk::UndoController::Redo | ( | bool | fine | ) |
calls the RedoMechanism to redo the operations undone
read the Documentation of Undo! only with the possibility to fine redo, like fine undo
Definition at line 83 of file mitkUndoController.cpp.
References mitk::RenderingManager::GetInstance(), and mitk::RenderingManager::RequestUpdateAll().
bool mitk::UndoController::RedoListEmpty | ( | ) |
returns true, if the RedoList is empty
Definition at line 102 of file mitkUndoController.cpp.
bool mitk::UndoController::RemoveUndoModel | ( | UndoType | undoType | ) |
Removes an UndoModel from the set of UndoModels If that UndoModel is currently selected, then the DefaultUndoModel(const) is set. If the default is not in List, then the first UndoModel is set. UndoList may not be empty, so if the UndoType is the last, then return false;
Definition at line 164 of file mitkUndoController.cpp.
References DEFAULTUNDOMODEL.
bool mitk::UndoController::SetOperationEvent | ( | UndoStackItem * | operationEvent | ) |
bool mitk::UndoController::SwitchUndoModel | ( | UndoType | undoType | ) |
Switches the UndoModel to the given Type if there is no equal Type in List, then return false
Definition at line 110 of file mitkUndoController.cpp.
Referenced by UndoController().
bool mitk::UndoController::Undo | ( | ) |
calls the UndoMechanism to undo the last change
Definition at line 64 of file mitkUndoController.cpp.
bool mitk::UndoController::Undo | ( | bool | fine | ) |
calls the UndoMechanism to undo the last change
the UndoMechanism has the possibility to undo the last changes in two different ways: first it can Undo a group of operations done at last (e.g. build up a new object; Undo leads to deleting that
Definition at line 69 of file mitkUndoController.cpp.
References mitk::RenderingManager::GetInstance(), and mitk::RenderingManager::RequestUpdateAll().
|
static |
Default UndoModel to use.
Definition at line 39 of file mitkUndoController.h.
Referenced by RemoveUndoModel().