LibreCAD
|
#include <undomanagerimpl.h>
Public Member Functions | |
UndoManagerImpl (unsigned int maximumUndoLevels) | |
virtual void | redo () |
redo an operation. More... | |
virtual void | undo () |
undo an operation. More... | |
virtual bool | canUndo () const |
Check if undo can be done. More... | |
virtual bool | canRedo () const |
Check if redo can be done. More... | |
virtual void | removeUndoables () |
Clears the Undo/Redo stack. More... | |
void | on_CommitProcessEvent (const lc::CommitProcessEvent &event) |
Private Attributes | |
std::vector < operation::Undoable_SPtr > | _unDoables |
Undo list. More... | |
std::stack < operation::Undoable_SPtr > | _reDoables |
Redo stack. More... | |
const unsigned int | _maximumUndoLevels |
Maximum undo level. More... | |
UndoManagerImpl manages a stack of operations and allows for undo or re-do operations that where done on a canvas
maximumUndoLevels |
Definition at line 19 of file undomanagerimpl.h.
UndoManagerImpl::UndoManagerImpl | ( | unsigned int | maximumUndoLevels | ) |
Definition at line 10 of file undomanagerimpl.cpp.
|
virtual |
Check if redo can be done.
Implements lc::UndoManager.
Definition at line 60 of file undomanagerimpl.cpp.
|
virtual |
Check if undo can be done.
Implements lc::UndoManager.
Definition at line 63 of file undomanagerimpl.cpp.
void UndoManagerImpl::on_CommitProcessEvent | ( | const lc::CommitProcessEvent & | event | ) |
Definition at line 15 of file undomanagerimpl.cpp.
|
virtual |
redo an operation.
Implements lc::UndoManager.
Definition at line 43 of file undomanagerimpl.cpp.
|
virtual |
Clears the Undo/Redo stack.
Implements lc::UndoManager.
Definition at line 67 of file undomanagerimpl.cpp.
|
virtual |
undo an operation.
Implements lc::UndoManager.
Definition at line 51 of file undomanagerimpl.cpp.
|
private |
Maximum undo level.
Definition at line 67 of file undomanagerimpl.h.
|
private |
Redo stack.
Definition at line 66 of file undomanagerimpl.h.
|
private |
Undo list.
Definition at line 65 of file undomanagerimpl.h.