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 | inputMethodEnd () |
| void | inputMethodStart () |
| 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 () |
| void | undoEnd () |
| void | undoStart () |
Signals | |
| void | undoChanged () |
| void | undoTrackingEnabledChanged (bool enabled) |
Public Member Functions | |
| KateUndoManager (KateDocument *doc) | |
| ~KateUndoManager () | |
| bool | allowComplexMerge () const |
| KateDocument * | document () |
| bool | isUndoTrackingEnabled () const |
| 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 () |
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 41 of file kateundomanager.cpp.
Member Function Documentation
| bool KateUndoManager::allowComplexMerge | ( | ) | const |
Definition at line 407 of file kateundomanager.cpp.
| void KateUndoManager::clearRedo | ( | ) | [slot] |
Definition at line 363 of file kateundomanager.cpp.
| void KateUndoManager::clearUndo | ( | ) | [slot] |
Definition at line 352 of file kateundomanager.cpp.
| KateDocument * KateUndoManager::document | ( | ) |
Definition at line 52 of file kateundomanager.cpp.
| void KateUndoManager::editEnd | ( | ) | [slot] |
Notify KateUndoManager about the end of an edit.
Definition at line 76 of file kateundomanager.cpp.
| void KateUndoManager::editStart | ( | ) | [slot] |
Notify KateUndoManager about the beginning of an edit.
Definition at line 62 of file kateundomanager.cpp.
| void KateUndoManager::inputMethodEnd | ( | ) | [slot] |
Definition at line 115 of file kateundomanager.cpp.
| void KateUndoManager::inputMethodStart | ( | ) | [slot] |
Definition at line 109 of file kateundomanager.cpp.
| bool KateUndoManager::isUndoTrackingEnabled | ( | ) | const [inline] |
Definition at line 97 of file kateundomanager.h.
| void KateUndoManager::redo | ( | ) | [slot] |
Redo the latest undo group.
Make sure isDefaultState() is true when calling this method.
Definition at line 254 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 219 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 402 of file kateundomanager.cpp.
| void KateUndoManager::setModified | ( | bool | m | ) |
Definition at line 374 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 412 of file kateundomanager.cpp.
| void KateUndoManager::slotLineInserted | ( | int | line, | |
| const QString & | s | |||
| ) | [slot] |
Notify KateUndoManager that a line was inserted.
Definition at line 163 of file kateundomanager.cpp.
| void KateUndoManager::slotLineRemoved | ( | int | line, | |
| const QString & | s | |||
| ) | [slot] |
Notify KateUndoManager that a line was removed.
Definition at line 169 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 157 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 151 of file kateundomanager.cpp.
| void KateUndoManager::slotMarkLineAutoWrapped | ( | int | line, | |
| bool | autowrapped | |||
| ) | [slot] |
Notify KateUndoManager that a line was marked as autowrapped.
Definition at line 145 of file kateundomanager.cpp.
| void KateUndoManager::slotTextInserted | ( | int | line, | |
| int | col, | |||
| const QString & | s | |||
| ) | [slot] |
Notify KateUndoManager that text was inserted.
Definition at line 133 of file kateundomanager.cpp.
| void KateUndoManager::slotTextRemoved | ( | int | line, | |
| int | col, | |||
| const QString & | s | |||
| ) | [slot] |
Notify KateUndoManager that text was removed.
Definition at line 139 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 224 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 214 of file kateundomanager.cpp.
| bool KateUndoManager::undoDontMerge | ( | ) | const |
Definition at line 397 of file kateundomanager.cpp.
| void KateUndoManager::undoEnd | ( | ) | [slot] |
Definition at line 127 of file kateundomanager.cpp.
| void KateUndoManager::undoSafePoint | ( | ) |
Prevent the current KateUndoGroup from being merged with the next one.
Definition at line 186 of file kateundomanager.cpp.
| void KateUndoManager::undoStart | ( | ) | [slot] |
Definition at line 121 of file kateundomanager.cpp.
| void KateUndoManager::undoTrackingEnabledChanged | ( | bool | enabled | ) | [signal] |
| void KateUndoManager::updateConfig | ( | ) |
Definition at line 392 of file kateundomanager.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference