madgui.util.history module¶
Utility for managing a simple history.
Classes
|
Simple class for tracking a value through a linear change history. |
-
class
madgui.util.history.History[source]¶ Bases:
objectSimple class for tracking a value through a linear change history.
This is basically a list with the additional notion of a
current revisionwhich can be incremented or decremented by “undoing” or “redoing”.Methods
can_redo()Check whether we can move forward in history.
can_undo()Check whether we can move backward in history.
clear()Clear history.
create_redo_action(parent)Create a
QActionfor a “Redo” button.create_undo_action(parent)Create a
QActionfor an “Undo” button.push(value)Add a value at our history position and clear anything behind.
redo()Move forward in history.
undo()Move backward in history.
Attributes
Signal<>
-
changed¶ Signal<>
-