Can we have two method : isUndoAvailable and isRedoAvailable on QDocument or on QEditor :
- isUndoAvailable : return true if there is something in the stack of undo
- isRedoAvailable : return true if undo is called and redo can be called
There are already two signals in QDocument which you can use to achieve that (or which may fit better for some design than the methods you request).
Anyway, I've added these convenience methods to both QEditor and QDocument but, for consistency, I kept the names from QUndoStack, i.e canUndo() and canRedo().
Ulrich Van Den Hekke