Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
CommandHistory Class Reference
A history for Command, provides undo/redo functionality. More...
#include <CommandHistory.h>
Inheritance diagram for CommandHistory:

Public Member Functions | |
| CommandHistory () | |
| ctor. | |
| virtual | ~CommandHistory () |
| dtor. | |
| void | clear () |
| Erases all the undo/redo history. | |
| void | addCommand (Command *command, bool execute=true) |
| Adds a command to the history. | |
| virtual void | undo () |
| Undoes the last action. | |
| virtual void | redo () |
| Redoes the last undone action. | |
Detailed Description
A history for Command, provides undo/redo functionality.To use this, all modifications to the model have to be done through commands that are executed with addCommand();
Constructor & Destructor Documentation
|
|
ctor.
|
|
|
dtor.
|
Member Function Documentation
|
||||||||||||
|
Adds a command to the history.
Call this for each MyCommand * cmd = new MyCommand(...);
m_historyCommand.addCommand( cmd );
Ownership of |
|
|
Erases all the undo/redo history. Use this when reloading the data, for instance, since this invalidates all the commands. |
|
|
Redoes the last undone action.
|
|
|
Undoes the last action.
|
The documentation for this class was generated from the following files:
- hugin1/hugin/CommandHistory.h
- hugin1/hugin/CommandHistory.cpp
1.3.9.1