13 #ifndef mitkUndoController_h
14 #define mitkUndoController_h
46 LIMITEDLINEARUNDO = 10,
47 VERBOSE_LIMITEDLINEARUNDO = 11,
183 static UndoModel::Pointer m_CurUndoModel;
abstract class, that can be used by Undo to undo an operation.
Pairs a do-operation with its inverse undo-operation.
Controller that manages undo/redo operations by delegating to an UndoModel.
bool Undo()
Undo the last change (fine-grained, by ObjectEventId).
bool Redo(bool fine)
Redo the last undone change with control over granularity.
void Clear()
Clear both the undo and redo lists.
bool RedoListEmpty()
Check whether the redo list is empty.
int GetLastObjectEventIdInList()
Return the ObjectEventId of the top element in the undo history.
int GetLastGroupEventIdInList()
Return the GroupEventId of the top element in the undo history.
std::map< UndoType, UndoModel::Pointer > UndoModelMap
bool Undo(bool fine)
Undo the last change with control over granularity.
bool Redo()
Redo the last undone change (fine-grained, by ObjectEventId).
void ClearRedoList()
Clear the redo list only.
static UndoModel * GetCurrentUndoModel()
Return the currently active UndoModel.
std::map< UndoType, UndoModel::Pointer >::iterator UndoModelMapIter
bool SwitchUndoModel(UndoType undoType)
Switch to a different undo model type.
virtual ~UndoController()
UndoController(UndoType undoType=DEFAULTUNDOMODEL)
Construct an UndoController.
bool SetOperationEvent(UndoStackItem *operationEvent)
Store an operation event in the current undo model.
static const UndoType DEFAULTUNDOMODEL
Default UndoModel to use.
bool RemoveUndoModel(UndoType undoType)
Remove an undo model type from the list.
OperationEvent * GetLastOfType(OperationActor *destination, OperationType opType)
Return the last OperationEvent matching the given destination and operation type.
bool AddUndoModel(UndoType undoType)
Add a new undo model type and switch to it.
UndoType
Enumeration of available undo model types.
Abstract superclass for all undo models.
Represents an entry on the undo or redo stack.
Find image slices visible on a given plane.
constexpr unsigned int DEFAULT_UNDO_REDO_LIMIT
Default maximum number of operations kept on the undo/redo stack.
int OperationType
Type alias for operation type identifiers.