• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

Kate

Public Slots | Signals | Public Member Functions

KateUndoManager Class Reference

KateUndoManager implements a document's history. More...

#include <kateundomanager.h>

Inheritance diagram for KateUndoManager:
Inheritance graph
[legend]

List of all members.

Public Slots

void clearRedo ()
void clearUndo ()
void editEnd ()
void editStart ()
void endUndo ()
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 startUndo ()
void undo ()

Signals

void isActiveChanged (bool enabled)
void redoEnd (KTextEditor::Document *)
void redoStart (KTextEditor::Document *)
void undoChanged ()
void undoEnd (KTextEditor::Document *)
void undoStart (KTextEditor::Document *)

Public Member Functions

 KateUndoManager (KateDocument *doc)
 ~KateUndoManager ()
KTextEditor::Document * document ()
bool isActive () const
uint redoCount () const
void setAllowComplexMerge (bool allow)
void setModified (bool m)
uint undoCount () 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 44 of file kateundomanager.h.


Constructor & Destructor Documentation

KateUndoManager::KateUndoManager ( KateDocument *  doc)

Creates a clean undo history.

Parameters:
docthe document the KateUndoManager will belong to

Definition at line 25 of file kateundomanager.cpp.

KateUndoManager::~KateUndoManager ( )

Definition at line 42 of file kateundomanager.cpp.


Member Function Documentation

void KateUndoManager::clearRedo ( ) [slot]

Definition at line 351 of file kateundomanager.cpp.

void KateUndoManager::clearUndo ( ) [slot]

Definition at line 340 of file kateundomanager.cpp.

KTextEditor::Document * KateUndoManager::document ( )

Definition at line 53 of file kateundomanager.cpp.

void KateUndoManager::editEnd ( ) [slot]

Notify KateUndoManager about the end of an edit.

Definition at line 80 of file kateundomanager.cpp.

void KateUndoManager::editStart ( ) [slot]

Notify KateUndoManager about the beginning of an edit.

Definition at line 63 of file kateundomanager.cpp.

void KateUndoManager::endUndo ( ) [slot]

Definition at line 131 of file kateundomanager.cpp.

void KateUndoManager::inputMethodEnd ( ) [slot]

Definition at line 119 of file kateundomanager.cpp.

void KateUndoManager::inputMethodStart ( ) [slot]

Definition at line 113 of file kateundomanager.cpp.

bool KateUndoManager::isActive ( ) const [inline]

Definition at line 89 of file kateundomanager.h.

void KateUndoManager::isActiveChanged ( bool  enabled) [signal]
void KateUndoManager::redo ( ) [slot]

Redo the latest undo group.

Make sure isDefaultState() is true when calling this method.

Definition at line 249 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 227 of file kateundomanager.cpp.

void KateUndoManager::redoEnd ( KTextEditor::Document *  ) [signal]
void KateUndoManager::redoStart ( KTextEditor::Document *  ) [signal]
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:
allowwhether complex merging is allowed

Definition at line 385 of file kateundomanager.cpp.

void KateUndoManager::setModified ( bool  m)

Definition at line 362 of file kateundomanager.cpp.

void KateUndoManager::slotLineInserted ( int  line,
const QString &  s 
) [slot]

Notify KateUndoManager that a line was inserted.

Definition at line 167 of file kateundomanager.cpp.

void KateUndoManager::slotLineRemoved ( int  line,
const QString &  s 
) [slot]

Notify KateUndoManager that a line was removed.

Definition at line 173 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 161 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 155 of file kateundomanager.cpp.

void KateUndoManager::slotMarkLineAutoWrapped ( int  line,
bool  autowrapped 
) [slot]

Notify KateUndoManager that a line was marked as autowrapped.

Definition at line 149 of file kateundomanager.cpp.

void KateUndoManager::slotTextInserted ( int  line,
int  col,
const QString &  s 
) [slot]

Notify KateUndoManager that text was inserted.

Definition at line 137 of file kateundomanager.cpp.

void KateUndoManager::slotTextRemoved ( int  line,
int  col,
const QString &  s 
) [slot]

Notify KateUndoManager that text was removed.

Definition at line 143 of file kateundomanager.cpp.

void KateUndoManager::startUndo ( ) [slot]

Definition at line 125 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 232 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 222 of file kateundomanager.cpp.

void KateUndoManager::undoEnd ( KTextEditor::Document *  ) [signal]
void KateUndoManager::undoSafePoint ( )

Prevent latest KateUndoGroup from being merged with the next one.

Definition at line 188 of file kateundomanager.cpp.

void KateUndoManager::undoStart ( KTextEditor::Document *  ) [signal]
void KateUndoManager::updateConfig ( )

Definition at line 380 of file kateundomanager.cpp.


The documentation for this class was generated from the following files:
  • kateundomanager.h
  • kateundomanager.cpp

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal