Kate
KateUndoManager Class Reference
KateUndoManager implements a document's history. More...
#include <kateundomanager.h>

Public Slots | |
void | clearRedo () |
void | clearUndo () |
void | editEnd () |
void | editStart () |
void | redo () |
void | slotLineInserted (int line, const QString &s) |
void | slotLineRemoved (int line, const QString &s) |
void | slotLineUnWrapped (int line, int col, int length, bool lineRemoved) |
void | slotLineWrapped (int line, int col, int pos, bool newLine) |
void | slotMarkLineAutoWrapped (int line, bool autowrapped) |
void | slotTextInserted (int line, int col, const QString &s) |
void | slotTextRemoved (int line, int col, const QString &s) |
void | undo () |
Signals | |
void | undoChanged () |
Public Member Functions | |
bool | allowComplexMerge () const |
KateUndoManager (KateDocument *doc) | |
uint | redoCount () const |
void | setAllowComplexMerge (bool allow) |
void | setModified (bool m) |
void | setUndoDontMerge (bool dontMerge) |
uint | undoCount () const |
bool | undoDontMerge () const |
void | undoSafePoint () |
void | updateConfig () |
~KateUndoManager () |
Detailed Description
KateUndoManager implements a document's history.
It is in either of the two states:
- the default state, which allows rolling back and forth the history of a document, and
- a state in which a new element is being added to the history.
The state of the KateUndomanager can be switched using editStart() and editEnd().
Definition at line 41 of file kateundomanager.h.
Constructor & Destructor Documentation
KateUndoManager::KateUndoManager | ( | KateDocument * | doc | ) |
Creates a clean undo history.
- Parameters:
-
doc the document the KateUndoManager will belong to
Definition at line 25 of file kateundomanager.cpp.
KateUndoManager::~KateUndoManager | ( | ) |
Definition at line 40 of file kateundomanager.cpp.
Member Function Documentation
bool KateUndoManager::allowComplexMerge | ( | ) | const |
Definition at line 361 of file kateundomanager.cpp.
void KateUndoManager::clearRedo | ( | ) | [slot] |
Definition at line 317 of file kateundomanager.cpp.
void KateUndoManager::clearUndo | ( | ) | [slot] |
Definition at line 306 of file kateundomanager.cpp.
void KateUndoManager::editEnd | ( | ) | [slot] |
Notify KateUndoManager about the end of an edit.
Definition at line 67 of file kateundomanager.cpp.
void KateUndoManager::editStart | ( | ) | [slot] |
Notify KateUndoManager about the beginning of an edit.
Definition at line 56 of file kateundomanager.cpp.
void KateUndoManager::redo | ( | ) | [slot] |
Redo the latest undo group.
Make sure isDefaultState() is true when calling this method.
Definition at line 208 of file kateundomanager.cpp.
uint KateUndoManager::redoCount | ( | ) | const |
Returns how many redo() actions can be performed.
- Returns:
- the number of undo groups which can be redone
Definition at line 173 of file kateundomanager.cpp.
void KateUndoManager::setAllowComplexMerge | ( | bool | allow | ) |
Allows or disallows merging of "complex" undo groups.
When an undo group contains different types of undo items, it is considered a "complex" group.
- Parameters:
-
allow whether complex merging is allowed
Definition at line 356 of file kateundomanager.cpp.
void KateUndoManager::setModified | ( | bool | m | ) |
Definition at line 328 of file kateundomanager.cpp.
void KateUndoManager::setUndoDontMerge | ( | bool | dontMerge | ) |
Allows or disallows merging with previous undo group.
- Parameters:
-
dontMerge whether merging is not allowed
Definition at line 366 of file kateundomanager.cpp.
void KateUndoManager::slotLineInserted | ( | int | line, | |
const QString & | s | |||
) | [slot] |
Notify KateUndoManager that a line was inserted.
Definition at line 127 of file kateundomanager.cpp.
void KateUndoManager::slotLineRemoved | ( | int | line, | |
const QString & | s | |||
) | [slot] |
Notify KateUndoManager that a line was removed.
Definition at line 133 of file kateundomanager.cpp.
void KateUndoManager::slotLineUnWrapped | ( | int | line, | |
int | col, | |||
int | length, | |||
bool | lineRemoved | |||
) | [slot] |
Notify KateUndoManager that a line was un-wrapped.
Definition at line 121 of file kateundomanager.cpp.
void KateUndoManager::slotLineWrapped | ( | int | line, | |
int | col, | |||
int | pos, | |||
bool | newLine | |||
) | [slot] |
Notify KateUndoManager that a line was wrapped.
Definition at line 115 of file kateundomanager.cpp.
void KateUndoManager::slotMarkLineAutoWrapped | ( | int | line, | |
bool | autowrapped | |||
) | [slot] |
Notify KateUndoManager that a line was marked as autowrapped.
Definition at line 109 of file kateundomanager.cpp.
void KateUndoManager::slotTextInserted | ( | int | line, | |
int | col, | |||
const QString & | s | |||
) | [slot] |
Notify KateUndoManager that text was inserted.
Definition at line 97 of file kateundomanager.cpp.
void KateUndoManager::slotTextRemoved | ( | int | line, | |
int | col, | |||
const QString & | s | |||
) | [slot] |
Notify KateUndoManager that text was removed.
Definition at line 103 of file kateundomanager.cpp.
void KateUndoManager::undo | ( | ) | [slot] |
Undo the latest undo group.
Make sure isDefaultState() is true when calling this method.
Definition at line 178 of file kateundomanager.cpp.
void KateUndoManager::undoChanged | ( | ) | [signal] |
uint KateUndoManager::undoCount | ( | ) | const |
Returns how many undo() actions can be performed.
- Returns:
- the number of undo groups which can be undone
Definition at line 168 of file kateundomanager.cpp.
bool KateUndoManager::undoDontMerge | ( | ) | const |
Definition at line 351 of file kateundomanager.cpp.
void KateUndoManager::undoSafePoint | ( | ) |
Prevent the current KateUndoGroup from being merged with the next one.
Definition at line 150 of file kateundomanager.cpp.
void KateUndoManager::updateConfig | ( | ) |
Definition at line 346 of file kateundomanager.cpp.
The documentation for this class was generated from the following files: