#include <kcommand.h>
Public Slots | |
| virtual void | undo () |
| virtual void | redo () |
| virtual void | documentSaved () |
Signals | |
| void | commandExecuted () |
| void | documentRestored () |
Public Methods | |
| KCommandHistory () | |
| KCommandHistory (KActionCollection *actionCollection, bool withMenus=true) | |
| virtual | ~KCommandHistory () |
| void | clear () |
| void | addCommand (KCommand *command, bool execute=true) |
| int | undoLimit () const |
| void | setUndoLimit (int limit) |
| int | redoLimit () const |
| void | setRedoLimit (int limit) |
| void | updateActions () |
Definition at line 155 of file kcommand.h.
|
|
Creates a command history, to store commands. This constructor doesn't create actions, so you need to call undo and redo yourself. |
|
||||||||||||
|
Creates a command history, to store commands. This also creates an undo and a redo action, in the
|
|
|
Destructs the command history object. |
|
||||||||||||
|
Adds a command to the history. Call this for each |
|
|
Erases all the undo/redo history. Use this when reloading the data, for instance, since this invalidates all the commands. |
|
|
Emitted every time a command is executed (whether by addCommand, undo or redo). You can use this to update the GUI, for instance. |
|
|
Emitted everytime we reach the index where you saved the document for the last time. See documentSaved |
|
|
Remembers when you saved the document. Call this right after saving the document. As soon as the history reaches the current index again (via some undo/redo operations) it will emit documentRestored If you implemented undo/redo properly the document is the same you saved before. |
|
|
Redoes the last undone action. Call this if you don't use the builtin KActions. |
|
|
Definition at line 206 of file kcommand.h. |
|
|
Sets the maximum number of items in the redo history. |
|
|
Sets the maximum number of items in the undo history. |
|
|
Undoes the last action. Call this if you don't use the builtin KActions. |
|
|
Definition at line 198 of file kcommand.h. |
|
|
Enable or disable the undo and redo actions. This isn't usually necessary, but this method can be useful if you disable all actions (to go to a "readonly" state), and then want to come back to a readwrite mode. |
1.2.18