Kate
#include <kateundo.h>
Public Types | |
enum | ModificationFlag { UndoLine1Modified = 1, UndoLine2Modified = 2, UndoLine1Saved = 4, UndoLine2Saved = 8, RedoLine1Modified = 16, RedoLine2Modified = 32, RedoLine1Saved = 64, RedoLine2Saved = 128 } |
enum | UndoType { editInsertText, editRemoveText, editWrapLine, editUnWrapLine, editInsertLine, editRemoveLine, editMarkLineAutoWrapped, editInvalid } |
Public Member Functions | |
KateUndo (KateDocument *document) | |
virtual | ~KateUndo () |
virtual bool | isEmpty () const |
bool | isFlagSet (ModificationFlag flag) const |
virtual bool | mergeWith (const KateUndo *undo) |
virtual void | redo ()=0 |
void | setFlag (ModificationFlag flag) |
virtual KateUndo::UndoType | type () const =0 |
virtual void | undo ()=0 |
void | unsetFlag (ModificationFlag flag) |
virtual void | updateRedoSavedOnDiskFlag (QBitArray &lines) |
virtual void | updateUndoSavedOnDiskFlag (QBitArray &lines) |
Protected Member Functions | |
KateDocument * | document () |
Detailed Description
Base class for Kate undo commands.
Definition at line 41 of file kateundo.h.
Member Enumeration Documentation
Enumerator | |
---|---|
UndoLine1Modified | |
UndoLine2Modified | |
UndoLine1Saved | |
UndoLine2Saved | |
RedoLine1Modified | |
RedoLine2Modified | |
RedoLine1Saved | |
RedoLine2Saved |
Definition at line 120 of file kateundo.h.
enum KateUndo::UndoType |
Types for undo items.
Enumerator | |
---|---|
editInsertText | |
editRemoveText | |
editWrapLine | |
editUnWrapLine | |
editInsertLine | |
editRemoveLine | |
editMarkLineAutoWrapped | |
editInvalid |
Definition at line 59 of file kateundo.h.
Constructor & Destructor Documentation
KateUndo::KateUndo | ( | KateDocument * | document | ) |
Constructor.
- Parameters
-
document the document the undo item belongs to
Definition at line 31 of file kateundo.cpp.
|
virtual |
Destructor.
Definition at line 37 of file kateundo.cpp.
Member Function Documentation
|
inlineprotected |
Return the document the undo item belongs to.
- Returns
- the document the undo item belongs to
Definition at line 108 of file kateundo.h.
|
virtual |
Check whether the item is empty.
- Returns
- whether the item is empty
Reimplemented in KateEditRemoveTextUndo, and KateEditInsertTextUndo.
Definition at line 90 of file kateundo.cpp.
|
inline |
Definition at line 139 of file kateundo.h.
merge an undo item Saves a bit of memory and potentially many calls when undo/redoing.
- Parameters
-
undo undo item to merge
- Returns
- success
Reimplemented in KateEditRemoveTextUndo, and KateEditInsertTextUndo.
Definition at line 105 of file kateundo.cpp.
|
pure virtual |
redo this item
Implemented in KateEditRemoveLineUndo, KateEditInsertLineUndo, KateEditUnWrapLineUndo, KateEditWrapLineUndo, KateEditMarkLineAutoWrappedUndo, KateEditRemoveTextUndo, KateEditInsertTextUndo, KateModifiedRemoveLine, KateModifiedInsertLine, KateModifiedUnWrapLine, KateModifiedWrapLine, KateModifiedRemoveText, and KateModifiedInsertText.
|
inline |
Definition at line 131 of file kateundo.h.
|
pure virtual |
type of item
- Returns
- type
Implemented in KateEditRemoveLineUndo, KateEditInsertLineUndo, KateEditUnWrapLineUndo, KateEditWrapLineUndo, KateEditMarkLineAutoWrappedUndo, KateEditRemoveTextUndo, and KateEditInsertTextUndo.
|
pure virtual |
undo this item
Implemented in KateEditRemoveLineUndo, KateEditInsertLineUndo, KateEditUnWrapLineUndo, KateEditWrapLineUndo, KateEditMarkLineAutoWrappedUndo, KateEditRemoveTextUndo, KateEditInsertTextUndo, KateModifiedRemoveLine, KateModifiedInsertLine, KateModifiedUnWrapLine, KateModifiedWrapLine, KateModifiedRemoveText, and KateModifiedInsertText.
|
inline |
Definition at line 135 of file kateundo.h.
|
inlinevirtual |
Reimplemented in KateModifiedInsertLine, KateModifiedUnWrapLine, KateModifiedWrapLine, KateModifiedRemoveText, and KateModifiedInsertText.
Definition at line 144 of file kateundo.h.
|
inlinevirtual |
Reimplemented in KateModifiedRemoveLine, KateModifiedUnWrapLine, KateModifiedWrapLine, KateModifiedRemoveText, and KateModifiedInsertText.
Definition at line 143 of file kateundo.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.