Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Represents an entry of the undo or redo stack. More...
#include <mitkOperationEvent.h>
Public Member Functions | |
UndoStackItem (std::string description="") | |
virtual | ~UndoStackItem () |
int | GetGroupEventId () |
Returns the GroupEventId for this object. More... | |
int | GetObjectEventId () |
Returns the ObjectEventId for this object. More... | |
std::string | GetDescription () |
Returns the textual description of this object. More... | |
virtual void | ReverseOperations () |
virtual void | ReverseAndExecute () |
Static Public Member Functions | |
static int | GetCurrGroupEventId () |
For combining operations in groups. More... | |
static int | GetCurrObjectEventId () |
For combining operations in Objects. More... | |
static void | IncCurrObjectEventId () |
Increases the current ObjectEventId For example if a button click generates operations the ObjectEventId has to be incremented to be able to undo. More... | |
static void | IncCurrGroupEventId () |
Increases the current GroupEventId For example if a button click generates operations the GroupEventId has to be incremented to be able to undo. More... | |
Protected Attributes | |
bool | m_Reversed |
true, if operation and undooperation have been swaped/changed More... | |
Represents an entry of the undo or redo stack.
This basic entry includes a textual description of the item and a pair of IDs. Static member functions handle creation and incrementing of these IDs.
The GroupEventID is intended for logical grouping of several related Operations. Currently this is used only by PointSetDataInteractor. How this is done and when to use GroupEventIDs is still undocumented.
Definition at line 39 of file mitkOperationEvent.h.
mitk::UndoStackItem::UndoStackItem | ( | std::string | description = "" | ) |
Definition at line 23 of file mitkOperationEvent.cpp.
References GetCurrGroupEventId(), and GetCurrObjectEventId().
|
virtual |
Definition at line 29 of file mitkOperationEvent.cpp.
|
static |
For combining operations in groups.
This ID is used in the undo mechanism. For separation of the seperate operations If the GroupEventId of two OperationEvents is equal, then they share one group and will be undone in case of Undo(fine==false)
Definition at line 39 of file mitkOperationEvent.cpp.
Referenced by UndoStackItem().
|
static |
For combining operations in Objects.
This ID is used in the Undo-Mechanism. For separation of the seperate operations If the ObjectEventId of two OperationEvents is equal, then they share one Object and will be undone in all cases of Undo(true and false). they shal not be seperated, because they were produced to realize one object-change. for example: OE_statechange and OE_addlastpoint
Definition at line 34 of file mitkOperationEvent.cpp.
Referenced by UndoStackItem().
std::string mitk::UndoStackItem::GetDescription | ( | ) |
Returns the textual description of this object.
Definition at line 64 of file mitkOperationEvent.cpp.
int mitk::UndoStackItem::GetGroupEventId | ( | ) |
Returns the GroupEventId for this object.
Definition at line 59 of file mitkOperationEvent.cpp.
int mitk::UndoStackItem::GetObjectEventId | ( | ) |
Returns the ObjectEventId for this object.
Definition at line 54 of file mitkOperationEvent.cpp.
|
static |
Increases the current GroupEventId For example if a button click generates operations the GroupEventId has to be incremented to be able to undo.
Definition at line 49 of file mitkOperationEvent.cpp.
Referenced by QmitkSlicesInterpolator::AcceptAllInterpolations(), and mitk::SegTool2D::WriteSliceToVolume().
|
static |
Increases the current ObjectEventId For example if a button click generates operations the ObjectEventId has to be incremented to be able to undo.
Definition at line 44 of file mitkOperationEvent.cpp.
Referenced by QmitkSlicesInterpolator::AcceptAllInterpolations(), mitk::SinglePointDataInteractor::AddPoint(), mitk::PointSetDataInteractor::AddPoint(), mitk::PointSetDataInteractor::FinishMove(), mitk::OverwriteSliceImageFilter::GenerateData(), mitkVerboseLimitedLinearUndoTest(), mitk::PointSetDataInteractor::RemovePoint(), and mitk::SegTool2D::WriteSliceToVolume().
|
virtual |
Reimplemented in mitk::OperationEvent.
Definition at line 74 of file mitkOperationEvent.cpp.
|
virtual |
Reimplemented in mitk::OperationEvent.
Definition at line 69 of file mitkOperationEvent.cpp.
Referenced by mitk::OperationEvent::ReverseOperations().
|
protected |
true, if operation and undooperation have been swaped/changed
Definition at line 106 of file mitkOperationEvent.h.