Source code for buttleofx.core.undo_redo.manageTools.undoableCommand

# Abstract class : you need to implement this class for each command in the program
# Transparent in Python
# http://www.developpez.net/forums/d310663/autres-langages/python-zope/general-python/classes-abstraites-python/


[docs]class UndoableCommand(object): """ Object saved in the Command Manager. """ # ######################################## Methods private to this class ####################################### # # ## Getters ## #
[docs] def getLabel(self): """ Return what does the command undo/redo """ # ## Others ## #
[docs] def doCmd(self): """ Executes the user request (the true function) """
[docs] def redoCmd(self): """ Undoes the operation performed by undoCmd method (Ctrl Y) """
[docs] def undoCmd(self): """ Executes the user request (Ctrl Z) """