Class SBCUndoStack#
This class describes an undo stack.
#include <SBCUndoStack.hpp>
Public Functions#
| Type | Name |
|---|---|
| SBCUndoStack () Constructors and destructors. |
|
| SB_DECLARE_DATA (SBCUndoStack) |
|
| void | beginHolding (const std::string & name) Begins holding. |
| void | beginUndoCommandGroup (const std::string & name) Begins a new command group to the current command group. |
| void | clear () |
| void | connectUndoSignalToSlot (SBCReferenceTarget * observer, void(SBCReferenceTarget::*)(SBCUndoEvent *) functionPointer) |
| void | disableHolding () Pauses holding. |
| void | disableUndoRedo () Disables undo and redo. |
| void | disconnectUndoSignalFromSlot (SBCReferenceTarget * observer, void(SBCReferenceTarget::*)(SBCUndoEvent *) functionPointer) |
| void | enableHolding () Resumes holding. |
| void | enableUndoRedo () Enables undo and redo. |
| void | endHolding () Ends holding. |
| void | endUndoCommandGroup () Ends a new command group to the current command group. |
| SBCContainerVector< SBCUndoCommand * > * | getCommandVector () const |
| unsigned int | getDisablingUndoRedoCounter () Returns the counter for disabling undo and redo. |
| unsigned int | getNextRedoIndex () const |
| void | hold (SBCUndoCommand * undoCommand) Adds a new command to the current command group. |
| void | hold (void * object) Holds an object allocated on the heap. |
| void | hold (SBPointerTarget * pointerTarget) Holds a pointer target allocated on the heap. |
| void | holdArray (void * array) Holds an array allocated on the heap. |
| bool | isHolding () const Storing commands. |
| bool | isRedoing () const Returns true while redoing. |
| bool | isUndoing () const Returns true while undoing. |
| virtual void | print (unsigned int offset=0) const |
| void | redo () Redo one command. |
| void | undo () Undo and redo. |
| bool | undoSignalIsConnectedToSlot (SBCReferenceTarget * observer, void(SBCReferenceTarget::*)(SBCUndoEvent *) functionPointer) const |
| virtual | ~SBCUndoStack () Destructor. |
Protected Attributes#
| Type | Name |
|---|---|
| SBCUndoStackData * | dataPointer |
Public Functions Documentation#
function SBCUndoStack#
Constructors and destructors.
Default constructor
function SB_DECLARE_DATA#
function beginHolding#
Begins holding.
function beginUndoCommandGroup#
Begins a new command group to the current command group.
function clear#
function connectUndoSignalToSlot#
void SBCUndoStack::connectUndoSignalToSlot (
SBCReferenceTarget * observer,
void(SBCReferenceTarget::*)( SBCUndoEvent *) functionPointer
)
function disableHolding#
Pauses holding.
function disableUndoRedo#
Disables undo and redo.
function disconnectUndoSignalFromSlot#
void SBCUndoStack::disconnectUndoSignalFromSlot (
SBCReferenceTarget * observer,
void(SBCReferenceTarget::*)( SBCUndoEvent *) functionPointer
)
function enableHolding#
Resumes holding.
function enableUndoRedo#
Enables undo and redo.
function endHolding#
Ends holding.
function endUndoCommandGroup#
Ends a new command group to the current command group.
function getCommandVector#
function getDisablingUndoRedoCounter#
Returns the counter for disabling undo and redo.
function getNextRedoIndex#
function hold [1/3]#
Adds a new command to the current command group.
function hold [2/3]#
Holds an object allocated on the heap.
function hold [3/3]#
Holds a pointer target allocated on the heap.
function holdArray#
Holds an array allocated on the heap.
function isHolding#
Storing commands.
Returns true while holding
function isRedoing#
Returns true while redoing.
function isUndoing#
Returns true while undoing.
function print#
function redo#
Redo one command.
function undo#
Undo and redo.
Undo one command
function undoSignalIsConnectedToSlot#
bool SBCUndoStack::undoSignalIsConnectedToSlot (
SBCReferenceTarget * observer,
void(SBCReferenceTarget::*)( SBCUndoEvent *) functionPointer
) const
function ~SBCUndoStack#
Destructor.