Medical Imaging Interaction Toolkit  2023.12.99-ed252ae7
Medical Imaging Interaction Toolkit
mitk::UndoModel Class Referenceabstract

superclass for all UndoModels More...

#include <mitkUndoModel.h>

Inheritance diagram for mitk::UndoModel:
Collaboration diagram for mitk::UndoModel:

Public Types

typedef UndoModel Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

virtual std::vector< std::string > GetClassHierarchy () const
 
virtual const char * GetClassName () const
 
virtual bool SetOperationEvent (UndoStackItem *stackItem)=0
 
virtual bool Undo ()=0
 
virtual bool Undo (bool fine)=0
 
virtual bool Redo ()=0
 
virtual bool Redo (bool fine)=0
 
virtual void Clear ()=0
 clears undo and Redolist More...
 
virtual void ClearRedoList ()=0
 clears the RedoList More...
 
virtual bool RedoListEmpty ()=0
 true if RedoList is empty More...
 
virtual std::size_t GetUndoLimit () const =0
 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...
 
virtual void SetUndoLimit (std::size_t limit)=0
 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...
 
virtual int GetLastObjectEventIdInList ()=0
 returns the ObjectEventId of the top Element in the OperationHistory of the selected UndoModel More...
 
virtual int GetLastGroupEventIdInList ()=0
 returns the GroupEventId of the top Element in the OperationHistory of the selected UndoModel More...
 
virtual OperationEventGetLastOfType (OperationActor *destination, OperationType opType)=0
 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 ()
 

Protected Member Functions

 UndoModel ()
 
 ~UndoModel () override
 

Detailed Description

superclass for all UndoModels

all necessary operations, that all UndoModels share.

Definition at line 32 of file mitkUndoModel.h.

Member Typedef Documentation

◆ ConstPointer

Definition at line 35 of file mitkUndoModel.h.

◆ Pointer

Definition at line 35 of file mitkUndoModel.h.

◆ Self

Definition at line 35 of file mitkUndoModel.h.

◆ Superclass

typedef itk::Object mitk::UndoModel::Superclass

Definition at line 35 of file mitkUndoModel.h.

Constructor & Destructor Documentation

◆ UndoModel()

mitk::UndoModel::UndoModel ( )
inlineprotected

Definition at line 94 of file mitkUndoModel.h.

◆ ~UndoModel()

mitk::UndoModel::~UndoModel ( )
inlineoverrideprotected

Definition at line 95 of file mitkUndoModel.h.

Member Function Documentation

◆ Clear()

virtual void mitk::UndoModel::Clear ( )
pure virtual

clears undo and Redolist

Implemented in mitk::LimitedLinearUndo.

◆ ClearRedoList()

virtual void mitk::UndoModel::ClearRedoList ( )
pure virtual

clears the RedoList

Implemented in mitk::LimitedLinearUndo.

◆ GetClassHierarchy()

virtual std::vector<std::string> mitk::UndoModel::GetClassHierarchy ( ) const
inlinevirtual

Reimplemented in mitk::LimitedLinearUndo, and mitk::VerboseLimitedLinearUndo.

Definition at line 35 of file mitkUndoModel.h.

◆ GetClassName()

virtual const char* mitk::UndoModel::GetClassName ( ) const
virtual

◆ GetLastGroupEventIdInList()

virtual int mitk::UndoModel::GetLastGroupEventIdInList ( )
pure virtual

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

Implemented in mitk::LimitedLinearUndo.

◆ GetLastObjectEventIdInList()

virtual int mitk::UndoModel::GetLastObjectEventIdInList ( )
pure virtual

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

Implemented in mitk::LimitedLinearUndo.

◆ GetLastOfType()

virtual OperationEvent* mitk::UndoModel::GetLastOfType ( OperationActor destination,
OperationType  opType 
)
pure virtual

returns the last specified OperationEvent in Undo-list corresponding to the given values; if nothing found, then returns nullptr

needed to get the old Position of an Element for declaring an UndoOperation

Implemented in mitk::LimitedLinearUndo.

◆ GetStaticNameOfClass()

static const char* mitk::UndoModel::GetStaticNameOfClass ( )
inlinestatic

Definition at line 35 of file mitkUndoModel.h.

◆ GetUndoLimit()

virtual std::size_t mitk::UndoModel::GetUndoLimit ( ) const
pure virtual

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.

Implemented in mitk::LimitedLinearUndo.

◆ Redo() [1/2]

virtual bool mitk::UndoModel::Redo ( )
pure virtual

Implemented in mitk::LimitedLinearUndo.

◆ Redo() [2/2]

virtual bool mitk::UndoModel::Redo ( bool  fine)
pure virtual

Implemented in mitk::LimitedLinearUndo.

◆ RedoListEmpty()

virtual bool mitk::UndoModel::RedoListEmpty ( )
pure virtual

true if RedoList is empty

Implemented in mitk::LimitedLinearUndo.

◆ SetOperationEvent()

virtual bool mitk::UndoModel::SetOperationEvent ( UndoStackItem stackItem)
pure virtual

◆ SetUndoLimit()

virtual void mitk::UndoModel::SetUndoLimit ( std::size_t  limit)
pure virtual

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.

Parameters
limitthe maximum number of items on the stack

Implemented in mitk::LimitedLinearUndo.

◆ Undo() [1/2]

virtual bool mitk::UndoModel::Undo ( )
pure virtual

Implemented in mitk::LimitedLinearUndo.

◆ Undo() [2/2]

virtual bool mitk::UndoModel::Undo ( bool  fine)
pure virtual

Implemented in mitk::LimitedLinearUndo.


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