UndoStack Class Reference
#include <undostack.h>
Public Member Functions | |
| UndoStack (int maxSize=20) | |
| ~UndoStack () | |
| bool | action (UndoState *state) |
| bool | undo (uint steps, int objectId) |
| bool | redo (uint steps, int objectId) |
| uint | size () const |
| uint | undoItems () const |
| uint | redoItems () const |
| uint | maxSize () const |
| void | setMaxSize (uint maxSize) |
| void | clear () |
| UndoState * | getNextUndo (int objectId) |
| UndoState * | getNextRedo (int objectId) |
Private Member Functions | |
| bool | checkSize () |
Private Attributes | |
| StateList | undoActions_ |
| StateList | redoActions_ |
| uint | maxSize_ |
Friends | |
| class | UndoManager |
Detailed Description
Definition at line 37 of file undostack.h.
Constructor & Destructor Documentation
| UndoStack::UndoStack | ( | int | maxSize = 20 |
) | [explicit] |
Definition at line 31 of file undostack.cpp.
| UndoStack::~UndoStack | ( | ) |
Definition at line 215 of file undostack.cpp.
Member Function Documentation
| bool UndoStack::action | ( | UndoState * | state | ) |
Definition at line 36 of file undostack.cpp.
References checkSize(), redoActions_, and undoActions_.
| bool UndoStack::undo | ( | uint | steps, | |
| int | objectId | |||
| ) |
Definition at line 45 of file undostack.cpp.
References UndoObject::getUId(), UndoManager::GLOBAL_UNDO_MODE, redoActions_, UndoState::undo(), and undoActions_.
| bool UndoStack::redo | ( | uint | steps, | |
| int | objectId | |||
| ) |
Definition at line 76 of file undostack.cpp.
References UndoObject::getUId(), UndoManager::GLOBAL_UNDO_MODE, UndoState::redo(), redoActions_, and undoActions_.
| uint UndoStack::size | ( | ) | const |
Definition at line 107 of file undostack.cpp.
References redoActions_, and undoActions_.
Referenced by checkSize().
| uint UndoStack::undoItems | ( | ) | const |
| uint UndoStack::redoItems | ( | ) | const |
| uint UndoStack::maxSize | ( | ) | const |
| void UndoStack::setMaxSize | ( | uint | maxSize | ) |
| void UndoStack::clear | ( | ) |
| UndoState * UndoStack::getNextUndo | ( | int | objectId | ) |
Definition at line 159 of file undostack.cpp.
References TransactionState::contains(), UndoObject::getUId(), UndoManager::GLOBAL_UNDO_MODE, state, undoActions_, and UndoState::undoObject().
| UndoState * UndoStack::getNextRedo | ( | int | objectId | ) |
Definition at line 187 of file undostack.cpp.
References TransactionState::contains(), UndoObject::getUId(), UndoManager::GLOBAL_UNDO_MODE, redoActions_, state, and UndoState::undoObject().
| bool UndoStack::checkSize | ( | ) | [private] |
Definition at line 133 of file undostack.cpp.
References maxSize_, redoActions_, size(), and undoActions_.
Referenced by action(), and setMaxSize().
Friends And Related Function Documentation
friend class UndoManager [friend] |
Definition at line 87 of file undostack.h.
Member Data Documentation
StateList UndoStack::undoActions_ [private] |
Definition at line 77 of file undostack.h.
Referenced by action(), checkSize(), clear(), getNextUndo(), redo(), size(), undo(), and undoItems().
StateList UndoStack::redoActions_ [private] |
Definition at line 78 of file undostack.h.
Referenced by action(), checkSize(), clear(), getNextRedo(), redo(), redoItems(), size(), and undo().
uint UndoStack::maxSize_ [private] |
The documentation for this class was generated from the following files:
