Medical Imaging Interaction Toolkit
2023.12.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 |
typedef LimitedLinearUndo | Self |
typedef UndoModel | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Types inherited from mitk::UndoModel | |
typedef UndoModel | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
virtual std::vector< std::string > | GetClassHierarchy () const override |
virtual const char * | GetClassName () const |
Pointer | Clone () const |
bool | SetOperationEvent (UndoStackItem *stackItem) override |
bool | Undo () override |
Undoes the last changes. More... | |
bool | Undo (bool) override |
virtual bool | Undo (int oeid) |
Undoes all changes until ObjectEventID oeid. More... | |
bool | Redo () override |
Undoes the last changes. More... | |
bool | Redo (bool) override |
virtual bool | Redo (int oeid) |
Redoes all changes until ObjectEventID oeid. More... | |
void | Clear () override |
Clears UndoList and RedoList. More... | |
void | ClearRedoList () override |
Clears the RedoList. More... | |
bool | RedoListEmpty () override |
True, if RedoList is empty. More... | |
std::size_t | GetUndoLimit () const override |
Gets the limit on the size of the undo history. The undo limit determines how many items can be stored in the undo stack. If the value is 0 that means that there is no limit. More... | |
void | SetUndoLimit (std::size_t limit) override |
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. The 0 value means that there is no limit. 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 specified OperationEvent in Undo-list corresponding to the given values; if nothing found, then returns nullptr. More... | |
Static Public Member Functions | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
Static Public Member Functions inherited from mitk::UndoModel | |
static const char * | GetStaticNameOfClass () |
Protected Member Functions | |
LimitedLinearUndo () | |
~LimitedLinearUndo () override | |
void | ClearList (UndoContainer *list) |
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 button, ...)
Definition at line 36 of file mitkLimitedLinearUndo.h.
typedef itk::SmartPointer<const Self> mitk::LimitedLinearUndo::ConstPointer |
Definition at line 42 of file mitkLimitedLinearUndo.h.
Definition at line 42 of file mitkLimitedLinearUndo.h.
Definition at line 42 of file mitkLimitedLinearUndo.h.
Definition at line 42 of file mitkLimitedLinearUndo.h.
typedef std::deque<UndoStackItem *> mitk::LimitedLinearUndo::UndoContainer |
Definition at line 39 of file mitkLimitedLinearUndo.h.
typedef std::deque<UndoStackItem *>::reverse_iterator mitk::LimitedLinearUndo::UndoContainerRevIter |
Definition at line 40 of file mitkLimitedLinearUndo.h.
|
protected |
Constructor
|
overrideprotected |
Destructor
|
overridevirtual |
Clears UndoList and RedoList.
Implements mitk::UndoModel.
|
protected |
|
overridevirtual |
Clears the RedoList.
Implements mitk::UndoModel.
Pointer mitk::LimitedLinearUndo::Clone | ( | ) | const |
|
inlineoverridevirtual |
Reimplemented from mitk::UndoModel.
Reimplemented in mitk::VerboseLimitedLinearUndo.
Definition at line 42 of file mitkLimitedLinearUndo.h.
|
virtual |
Reimplemented from mitk::UndoModel.
Reimplemented in mitk::VerboseLimitedLinearUndo.
|
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 specified OperationEvent in Undo-list corresponding to the given values; if nothing found, then returns nullptr.
Implements mitk::UndoModel.
|
inlinestatic |
Definition at line 42 of file mitkLimitedLinearUndo.h.
|
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. If the value is 0 that means that there is no limit.
Implements mitk::UndoModel.
|
static |
|
overridevirtual |
Undoes the last changes.
Reads the top element of the Redo-Stack, executes the operation, swaps the OperationEvent-Operation with the Undo-Operation and sets it to Undo-Stack
Implements mitk::UndoModel.
|
overridevirtual |
Implements mitk::UndoModel.
|
virtual |
Redoes all changes until ObjectEventID oeid.
|
overridevirtual |
True, if RedoList is empty.
Implements mitk::UndoModel.
|
overridevirtual |
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. The 0 value means that there is no limit.
limit | the maximum number of items on the stack |
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 Redo-Stack
Implements mitk::UndoModel.
|
overridevirtual |
Implements mitk::UndoModel.
|
virtual |
Undoes all changes until ObjectEventID oeid.
|
protected |
Definition at line 133 of file mitkLimitedLinearUndo.h.
|
protected |
Definition at line 131 of file mitkLimitedLinearUndo.h.