Uranium
Application Framework
|
Public Member Functions | |
None | __init__ (self) |
None | undo (self) |
None | redo (self) |
mergeWith (self, other) | |
None | push (self) |
Protected Attributes | |
_timestamp = time.time() | |
bool | _always_merge = False |
Base class for operations that should support undo and redo.
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. :param other: :type{Operation} The operation to merge with. :return: An operation when this operation and `other` can be merged, or False if they cannot be merged.
Reimplemented in UM.Operations.GravityOperation.GravityOperation, 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.
None 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.
None UM.Operations.Operation.Operation.redo | ( | self | ) |
Redo the operation. This should be reimplemented by subclasses to perform all actions necessary to redo the operation. :note This is automatically called when the operation is first put onto the OperationStack.
Reimplemented in UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation, UM.Operations.GravityOperation.GravityOperation, 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.SetTransformOperation.SetTransformOperation, and UM.Operations.TranslateOperation.TranslateOperation.
None UM.Operations.Operation.Operation.undo | ( | self | ) |
Undo the operation. This should be reimplemented by subclasses to perform all actions necessary to redo the operation.
Reimplemented in UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation, UM.Operations.GravityOperation.GravityOperation, 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.SetTransformOperation.SetTransformOperation, and UM.Operations.TranslateOperation.TranslateOperation.