Uranium
Application Framework
|
A stack of operations. More...
Public Member Functions | |
def | __init__ (self, controller) |
def | push (self, operation) |
Push an operation on the stack. More... | |
def | undo (self) |
Undo the current operation. More... | |
def | redo (self) |
Redo the next operation. More... | |
def | getOperations (self) |
Get the list of operations in the stack. More... | |
def | canUndo (self) |
Whether we can undo any more operations. More... | |
def | canRedo (self) |
Whether we can redo any more operations. More... | |
Static Public Attributes | |
tuple | changed = Signal() |
Signal for when the operation stack changes. More... | |
A stack of operations.
This maintains the history of operations, which allows for undoing and re-doing these operations.
def UM.Operations.OperationStack.OperationStack.canRedo | ( | self | ) |
Whether we can redo any more operations.
def UM.Operations.OperationStack.OperationStack.canUndo | ( | self | ) |
Whether we can undo any more operations.
def UM.Operations.OperationStack.OperationStack.getOperations | ( | self | ) |
Get the list of operations in the stack.
The end of the list represents the more recent operations.
def UM.Operations.OperationStack.OperationStack.push | ( | self, | |
operation | |||
) |
Push an operation on the stack.
This will perform the following things in sequence:
operation | Operation The operation to push onto the stack. |
def UM.Operations.OperationStack.OperationStack.redo | ( | self | ) |
Redo the next operation.
This will call redo() on the current operation and increment the current index.
def UM.Operations.OperationStack.OperationStack.undo | ( | self | ) |
Undo the current operation.
This will call undo() on the current operation and decrement the current index.
|
static |
Signal for when the operation stack changes.