Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Operations.Operation.Operation Class Reference

Base class for operations that should support undo and redo. More...

Inheritance diagram for UM.Operations.Operation.Operation:
UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation UM.Operations.GroupedOperation.GroupedOperation UM.Operations.LayFlatOperation.LayFlatOperation UM.Operations.MirrorOperation.MirrorOperation UM.Operations.RemoveSceneNodeOperation.RemoveSceneNodeOperation UM.Operations.RotateOperation.RotateOperation UM.Operations.ScaleOperation.ScaleOperation UM.Operations.ScaleToBoundsOperation.ScaleToBoundsOperation UM.Operations.SetTransformOperation.SetTransformOperation UM.Operations.TranslateOperation.TranslateOperation

Public Member Functions

 __init__ (self)
 
 undo (self)
 Undo the operation.
 
 redo (self)
 Redo the operation.
 
 mergeWith (self, other)
 Perform operation merging.
 
 push (self)
 Push the operation onto the stack.
 

Protected Attributes

 _timestamp
 
 _always_merge
 

Detailed Description

Base class for operations that should support undo and redo.

Constructor & Destructor Documentation

◆ __init__()

Member Function Documentation

◆ mergeWith()

UM.Operations.Operation.Operation.mergeWith (   self,
  other 
)

Perform operation merging.

This will be called by OperationStack to perform merging of operations. If this operation can be merged with other, it should return a new operation that is the combination of this operation and other. If it cannot be merged, False should be returned.

Parameters
otherOperation The operation to merge with.
Returns
An operation when this operation and other can be merged, or False if they cannot be merged.

Reimplemented in UM.Operations.GroupedOperation.GroupedOperation, UM.Operations.LayFlatOperation.LayFlatOperation, UM.Operations.MirrorOperation.MirrorOperation, UM.Operations.RotateOperation.RotateOperation, UM.Operations.ScaleOperation.ScaleOperation, UM.Operations.SetTransformOperation.SetTransformOperation, and UM.Operations.TranslateOperation.TranslateOperation.

◆ push()

UM.Operations.Operation.Operation.push (   self)

Push the operation onto the stack.

This is a convenience method that pushes this operation onto the Application's operation stack.

◆ redo()

◆ undo()


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