karbon
VCommandHistory Class Reference
#include <vcommand.h>
Detailed Description
Manages a set of commands.It keeps the commands in a list, commands higher in the list are older than lower commands. All commands in the list can be undone, beginning from the latest command at the end of the list. Undone commands can be redone, beginning at the oldest undone command. That makes it possible to go back and forth to a specific document state.
Definition at line 143 of file vcommand.h.
Public Slots | |
void | undo () |
void | redo () |
void | undo (VCommand *command) |
void | redo (VCommand *command) |
void | undoAllTo (VCommand *command) |
void | redoAllTo (VCommand *command) |
void | documentSaved () |
Signals | |
void | historyCleared () |
void | commandExecuted (VCommand *) |
void | commandExecuted () |
void | commandAdded (VCommand *) |
void | firstCommandRemoved () |
void | lastCommandRemoved () |
void | documentRestored () |
Public Member Functions | |
VCommandHistory (KarbonPart *part) | |
~VCommandHistory () | |
void | clear () |
void | addCommand (VCommand *command, bool execute=true) |
unsigned int | undoLimit () const |
void | setUndoLimit (unsigned int limit) |
unsigned int | redoLimit () const |
void | setRedoLimit (unsigned int limit) |
const QPtrList< VCommand > * | commands () const |
Constructor & Destructor Documentation
|
Constructs a command history.
Definition at line 29 of file vcommand.cc. |
|
Destroys the command history.
Definition at line 40 of file vcommand.cc. |
Member Function Documentation
|
Adds a new command to the history.
Definition at line 70 of file vcommand.cc. |
|
Clears the command history by removing all commands. Emits the historyCleared signal Definition at line 45 of file vcommand.cc. |
|
This signal is emitted when a command is added to the history. The added command is given as the argument. |
|
This signal is emitted when a command is executed.
|
|
This signal is emitted when a command is executed. The executed command is given as the argument. |
|
Read only access to the command history list.
Definition at line 222 of file vcommand.h. |
|
This signal is emitted when the actual document state matches the last saved one. Use documentSaved to set the last saved document state. |
|
Marks the actual document state as saved. The position within the list corresponding to the actual document state is saved. Definition at line 267 of file vcommand.cc. |
|
This signal is emitted when the first (oldest) command is removed.
|
|
This signal is emitted when the command history gets cleared.
|
|
This signal is emitted when the last (latest) command is removed.
|
|
Redoes the specified command.
Definition at line 193 of file vcommand.cc. |
|
Redoes the last command not already undone.
Definition at line 144 of file vcommand.cc. |
|
Redoes all command up to the specified command.
Definition at line 238 of file vcommand.cc. |
|
Returns the actual redo limit.
Definition at line 201 of file vcommand.h. |
|
Sets a new redo limit. The redo limit controls how many undone commands are stored in history. If the new limit is lower than the actual number of undone commands, the newest commands are removed until the number matches the redo limit.
Definition at line 106 of file vcommand.cc. |
|
Sets a new undo limit. The undo limit controls how many commands are stored in the history. If the new limit is lower than the actual history size, the oldest commands are removed unitl the size matches the undo limit.
Definition at line 99 of file vcommand.cc. |
|
Undoes the specified command.
Definition at line 177 of file vcommand.cc. |
|
Undoes the last command not already undone.
Definition at line 113 of file vcommand.cc. |
|
Undoes all command up to the specified command.
Definition at line 209 of file vcommand.cc. |
|
Returns the actual undo limit.
Definition at line 180 of file vcommand.h. |
The documentation for this class was generated from the following files: