KateUndo
#include <kateundo.h>
Inherited by KateEditInsertLineUndo, KateEditInsertTextUndo, KateEditMarkLineAutoWrappedUndo, KateEditRemoveLineUndo, KateEditRemoveTextUndo, KateEditUnWrapLineUndo, and KateEditWrapLineUndo.
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 (KTextEditor::DocumentPrivate *document) | |
virtual | ~KateUndo ()=default |
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 | |
KTextEditor::DocumentPrivate * | document () |
Detailed Description
Base class for Kate undo commands.
Definition at line 29 of file kateundo.h.
Member Enumeration Documentation
◆ UndoType
enum KateUndo::UndoType |
Types for undo items.
Definition at line 47 of file kateundo.h.
Constructor & Destructor Documentation
◆ KateUndo()
|
explicit |
Constructor.
- Parameters
-
document the document the undo item belongs to
Definition at line 20 of file kateundo.cpp.
◆ ~KateUndo()
|
virtualdefault |
Destructor.
Member Function Documentation
◆ document()
|
inlineprotected |
Return the document the undo item belongs to.
- Returns
- the document the undo item belongs to
Definition at line 87 of file kateundo.h.
◆ isEmpty()
|
virtual |
Check whether the item is empty.
- Returns
- whether the item is empty
Definition at line 73 of file kateundo.cpp.
◆ mergeWith()
|
virtual |
merge an undo item Saves a bit of memory and potentially many calls when undo/redoing.
Only called for equal types of this object and the passed one.
- Parameters
-
undo undo item to merge
- Returns
- success
Definition at line 88 of file kateundo.cpp.
◆ redo()
|
pure virtual |
redo this item
◆ type()
|
pure virtual |
type of item
- Returns
- type
◆ undo()
|
pure virtual |
undo this item
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Jun 26 2022 03:49:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.