Kate
KateUndo Class Reference
Base class for Kate undo commands. More...
#include <kateundo.h>

Public Types | |
enum | UndoType { editInsertText, editRemoveText, editWrapLine, editUnWrapLine, editInsertLine, editRemoveLine, editMarkLineAutoWrapped, editInvalid } |
Public Member Functions | |
virtual bool | isEmpty () const |
KateUndo (KateDocument *document) | |
virtual bool | mergeWith (const KateUndo *undo) |
virtual void | redo ()=0 |
virtual KateUndo::UndoType | type () const =0 |
virtual void | undo ()=0 |
virtual | ~KateUndo () |
Protected Member Functions | |
KateDocument * | document () |
Detailed Description
Base class for Kate undo commands.
Definition at line 35 of file kateundo.h.
Member Enumeration Documentation
enum KateUndo::UndoType |
Types for undo items.
- Enumerator:
editInsertText editRemoveText editWrapLine editUnWrapLine editInsertLine editRemoveLine editMarkLineAutoWrapped editInvalid
Definition at line 53 of file kateundo.h.
Constructor & Destructor Documentation
KateUndo::KateUndo | ( | KateDocument * | document | ) |
Constructor.
- Parameters:
-
document the document the undo item belongs to
Definition at line 28 of file kateundo.cpp.
KateUndo::~KateUndo | ( | ) | [virtual] |
Destructor.
Definition at line 33 of file kateundo.cpp.
Member Function Documentation
KateDocument* KateUndo::document | ( | ) | [inline, protected] |
Return the document the undo item belongs to.
- Returns:
- the document the undo item belongs to
Definition at line 102 of file kateundo.h.
bool KateUndo::isEmpty | ( | ) | const [virtual] |
Check whether the item is empty.
- Returns:
- whether the item is empty
Reimplemented in KateEditInsertTextUndo, and KateEditRemoveTextUndo.
Definition at line 37 of file kateundo.cpp.
merge an undo item Saves a bit of memory and potentially many calls when undo/redoing.
- Parameters:
-
undo undo item to merge
- Returns:
- success
Definition at line 52 of file kateundo.cpp.
virtual void KateUndo::redo | ( | ) | [pure virtual] |
redo this item
Implemented in KateEditInsertTextUndo, KateEditRemoveTextUndo, KateEditMarkLineAutoWrappedUndo, KateEditWrapLineUndo, KateEditUnWrapLineUndo, KateEditInsertLineUndo, and KateEditRemoveLineUndo.
virtual KateUndo::UndoType KateUndo::type | ( | ) | const [pure virtual] |
type of item
- Returns:
- type
Implemented in KateEditInsertTextUndo, KateEditRemoveTextUndo, KateEditMarkLineAutoWrappedUndo, KateEditWrapLineUndo, KateEditUnWrapLineUndo, KateEditInsertLineUndo, and KateEditRemoveLineUndo.
virtual void KateUndo::undo | ( | ) | [pure virtual] |
undo this item
Implemented in KateEditInsertTextUndo, KateEditRemoveTextUndo, KateEditMarkLineAutoWrappedUndo, KateEditWrapLineUndo, KateEditUnWrapLineUndo, KateEditInsertLineUndo, and KateEditRemoveLineUndo.
The documentation for this class was generated from the following files: