Medical Imaging Interaction Toolkit  2018.4.99-701c8286
Medical Imaging Interaction Toolkit
mitk::UndoController Class Reference

#include <mitkUndoController.h>

Public Types

enum  UndoType { LIMITEDLINEARUNDO, VERBOSE_LIMITEDLINEARUNDO, TREEUNDO }
 
typedef std::map< UndoType, UndoModel::PointerUndoModelMap
 
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...
 
OperationEventGetLastOfType (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 UndoModelGetCurrentUndoModel ()
 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...
 

Detailed Description

Definition at line 24 of file mitkUndoController.h.

Member Typedef Documentation

◆ UndoModelMap

◆ UndoModelMapIter

Definition at line 36 of file mitkUndoController.h.

Member Enumeration Documentation

◆ UndoType

Enumerator
LIMITEDLINEARUNDO 
VERBOSE_LIMITEDLINEARUNDO 
TREEUNDO 

Definition at line 28 of file mitkUndoController.h.

Constructor & Destructor Documentation

◆ UndoController()

mitk::UndoController::UndoController ( UndoType  undoType = DEFAULTUNDOMODEL)

Constructor; Adds the new UndoType or if undoType exists , switches it to undoType; for UndoTypes see definitionmitkInteractionConst.h

◆ ~UndoController()

virtual mitk::UndoController::~UndoController ( )
virtual

Member Function Documentation

◆ AddUndoModel()

bool mitk::UndoController::AddUndoModel ( UndoType  undoType)

◆ Clear()

void mitk::UndoController::Clear ( )

Clears the Undo and the RedoList.

◆ ClearRedoList()

void mitk::UndoController::ClearRedoList ( )

Clears the RedoList.

◆ GetCurrentUndoModel()

static UndoModel* mitk::UndoController::GetCurrentUndoModel ( )
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

◆ GetLastGroupEventIdInList()

int mitk::UndoController::GetLastGroupEventIdInList ( )

returns the GroupEventId of the top Element in the OperationHistory of the selected UndoModel

◆ GetLastObjectEventIdInList()

int mitk::UndoController::GetLastObjectEventIdInList ( )

returns the ObjectEventId of the top Element in the OperationHistory of the selected UndoModel

◆ GetLastOfType()

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

◆ Redo() [1/2]

bool mitk::UndoController::Redo ( )

calls the RedoMechanism to redo the operations undone

read the Documentation of Undo!

◆ Redo() [2/2]

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

◆ RedoListEmpty()

bool mitk::UndoController::RedoListEmpty ( )

returns true, if the RedoList is empty

◆ RemoveUndoModel()

bool mitk::UndoController::RemoveUndoModel ( UndoType  undoType)

◆ SetOperationEvent()

bool mitk::UndoController::SetOperationEvent ( UndoStackItem operationEvent)

◆ SwitchUndoModel()

bool mitk::UndoController::SwitchUndoModel ( UndoType  undoType)

◆ Undo() [1/2]

bool mitk::UndoController::Undo ( )

calls the UndoMechanism to undo the last change

◆ Undo() [2/2]

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

Member Data Documentation

◆ DEFAULTUNDOMODEL

const UndoType mitk::UndoController::DEFAULTUNDOMODEL
static

Default UndoModel to use.

Definition at line 39 of file mitkUndoController.h.


The documentation for this class was generated from the following file: