|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
A linear undo model with one undo and one redo stack. More...
#include <mitkLimitedLinearUndo.h>


Public Types | |
| typedef std::deque< UndoStackItem * > | UndoContainer |
| typedef std::deque< UndoStackItem * >::reverse_iterator | UndoContainerRevIter |
Public Member Functions | |
| mitkClassMacro (LimitedLinearUndo, UndoModel) | |
| Pointer | Clone () const |
| bool | SetOperationEvent (UndoStackItem *stackItem) override |
| Store an operation event on the undo stack. More... | |
| bool | Undo () override |
| Undoes the last changes. More... | |
| bool | Undo (bool) override |
| Undoes the last changes. More... | |
| virtual bool | Undo (int oeid) |
| Undoes all changes until ObjectEventID oeid. More... | |
| bool | Redo () override |
| Redoes the last undone changes. More... | |
| bool | Redo (bool) override |
| Redoes changes (parameter currently unused). More... | |
| virtual bool | Redo (int oeid) |
| Redoes all changes until ObjectEventID oeid. More... | |
| void | Clear () override |
| Clears both the UndoList and RedoList. More... | |
| void | ClearRedoList () override |
| Clears the RedoList. More... | |
| bool | RedoListEmpty () override |
| Returns true if the RedoList is empty. More... | |
| bool | UndoListEmpty () override |
| Returns true if the UndoList is empty. More... | |
| std::size_t | GetUndoLimit () const override |
| Gets the limit on the size of the undo history. More... | |
| void | SetUndoLimit (std::size_t limit) override |
| Sets a limit on the size of the undo history. More... | |
| int | GetLastObjectEventIdInList () override |
| Returns the ObjectEventId of the top element in the OperationHistory. More... | |
| int | GetLastGroupEventIdInList () override |
| Returns the GroupEventId of the top element in the OperationHistory. More... | |
| OperationEvent * | GetLastOfType (OperationActor *destination, OperationType opType) override |
| Returns the last OperationEvent in the Undo-list matching the given destination and operation type. More... | |
| unsigned int | RemoveInvalidOperations () override |
| Removes invalid operations from the undo/redo stack. More... | |
Public Member Functions inherited from mitk::UndoModel | |
| mitkClassMacroItkParent (UndoModel, itk::Object) | |
Static Public Member Functions | |
| static Pointer | New () |
Protected Member Functions | |
| LimitedLinearUndo () | |
| Constructor. More... | |
| ~LimitedLinearUndo () override | |
| Destructor. Deletes all undo and redo entries. More... | |
| void | ClearList (UndoContainer *list) |
| Convenience method to free the memory of elements in the list and clear it. More... | |
Protected Member Functions inherited from mitk::UndoModel | |
| UndoModel () | |
| ~UndoModel () override | |
Protected Attributes | |
| UndoContainer | m_UndoList |
| UndoContainer | m_RedoList |
A linear undo model with one undo and one redo stack.
Derived from UndoModel AND itk::Object. Invokes ITK-events to signal listening GUI elements whether each of the stacks is empty or not (to enable/disable buttons, etc.).
Definition at line 41 of file mitkLimitedLinearUndo.h.
| typedef std::deque<UndoStackItem *> mitk::LimitedLinearUndo::UndoContainer |
Definition at line 44 of file mitkLimitedLinearUndo.h.
| typedef std::deque<UndoStackItem *>::reverse_iterator mitk::LimitedLinearUndo::UndoContainerRevIter |
Definition at line 45 of file mitkLimitedLinearUndo.h.
|
protected |
Constructor.
|
overrideprotected |
Destructor. Deletes all undo and redo entries.
|
overridevirtual |
Clears both the UndoList and RedoList.
Implements mitk::UndoModel.
|
protected |
Convenience method to free the memory of elements in the list and clear it.
|
overridevirtual |
Clears the RedoList.
Implements mitk::UndoModel.
| Pointer mitk::LimitedLinearUndo::Clone | ( | ) | const |
|
overridevirtual |
Returns the GroupEventId of the top element in the OperationHistory.
Implements mitk::UndoModel.
|
overridevirtual |
Returns the ObjectEventId of the top element in the OperationHistory.
Implements mitk::UndoModel.
|
overridevirtual |
Returns the last OperationEvent in the Undo-list matching the given destination and operation type.
Implements mitk::UndoModel.
|
overridevirtual |
Gets the limit on the size of the undo history.
The undo limit determines how many items can be stored in the undo stack. A value of 0 means there is no limit.
Implements mitk::UndoModel.
| mitk::LimitedLinearUndo::mitkClassMacro | ( | LimitedLinearUndo | , |
| UndoModel | |||
| ) |
|
static |
|
overridevirtual |
Redoes the last undone changes.
Reads the top element of the Redo-Stack, executes the operation, swaps the OperationEvent-Operation with the Undo-Operation and sets it to the Undo-Stack.
Implements mitk::UndoModel.
|
overridevirtual |
Redoes changes (parameter currently unused).
Implements mitk::UndoModel.
|
virtual |
Redoes all changes until ObjectEventID oeid.
|
overridevirtual |
Returns true if the RedoList is empty.
Implements mitk::UndoModel.
|
overridevirtual |
Removes invalid operations from the undo/redo stack.
Iterates through m_UndoList and m_RedoList and removes invalid OperationEvents.
Implements mitk::UndoModel.
|
overridevirtual |
Store an operation event on the undo stack.
Clears the redo stack when a new operation is added. If the undo limit is reached, the oldest entry is removed.
Implements mitk::UndoModel.
Reimplemented in mitk::VerboseLimitedLinearUndo.
|
overridevirtual |
Sets a limit on the size of the undo history.
If the limit is reached, the oldest undo items will be dropped from the bottom of the undo stack. A value of 0 means there is no limit.
Implements mitk::UndoModel.
|
overridevirtual |
Undoes the last changes.
Reads the top element of the Undo-Stack, executes the operation, swaps the OperationEvent-Undo with the Operation and sets it to the Redo-Stack.
Implements mitk::UndoModel.
|
overridevirtual |
Undoes the last changes.
If fine is true, undoes one object event ID; otherwise undoes one group event ID.
Implements mitk::UndoModel.
|
virtual |
Undoes all changes until ObjectEventID oeid.
|
overridevirtual |
Returns true if the UndoList is empty.
Implements mitk::UndoModel.
|
protected |
Definition at line 154 of file mitkLimitedLinearUndo.h.
|
protected |
Definition at line 152 of file mitkLimitedLinearUndo.h.