• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Kate

KateUndoGroup Class Reference

Class to manage a group of undo items. More...

#include <kateundo.h>

List of all members.


Public Types

enum  UndoType {
  editInsertText, editRemoveText, editWrapLine, editUnWrapLine,
  editInsertLine, editRemoveLine, editMarkLineAutoWrapped, editInvalid
}

Public Member Functions

void addItem (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text)
bool isEmpty () const
 KateUndoGroup (KateDocument *doc)
bool merge (KateUndoGroup *newGroup, bool complex)
void redo ()
void safePoint (bool safePoint=true)
void setRedoCursor (const KTextEditor::Cursor &cursor)
void setRedoSelection (const KTextEditor::Range &selection)
void setUndoCursor (const KTextEditor::Cursor &cursor)
void setUndoSelection (const KTextEditor::Range &selection)
void undo ()
 ~KateUndoGroup ()

Detailed Description

Class to manage a group of undo items.

Definition at line 35 of file kateundo.h.


Member Enumeration Documentation

enum KateUndoGroup::UndoType

Types for undo items.

Enumerator:
editInsertText 
editRemoveText 
editWrapLine 
editUnWrapLine 
editInsertLine 
editRemoveLine 
editMarkLineAutoWrapped 
editInvalid 

Definition at line 64 of file kateundo.h.


Constructor & Destructor Documentation

KateUndoGroup::KateUndoGroup ( KateDocument *  doc  )  [explicit]

Constructor.

Parameters:
doc document to belong to

Definition at line 242 of file kateundo.cpp.

KateUndoGroup::~KateUndoGroup (  ) 

Destructor.

Definition at line 252 of file kateundo.cpp.


Member Function Documentation

void KateUndoGroup::addItem ( KateUndoGroup::UndoType  type,
uint  line,
uint  col,
uint  len,
const QString &  text 
)

add an item to the group

Parameters:
type undo item type
line line affected
col start column
len length of change
text text removed/inserted

Definition at line 303 of file kateundo.cpp.

bool KateUndoGroup::isEmpty (  )  const [inline]

is this undogroup empty?

Definition at line 126 of file kateundo.h.

bool KateUndoGroup::merge ( KateUndoGroup *  newGroup,
bool  complex 
)

merge this group with an other

Parameters:
newGroup group to merge into this one
complex set if a complex undo
Returns:
success

Definition at line 338 of file kateundo.cpp.

void KateUndoGroup::redo (  ) 

Redo the contained undo items.

Definition at line 280 of file kateundo.cpp.

void KateUndoGroup::safePoint ( bool  safePoint = true  ) 

set group as as savepoint.

the next group will not merge with this one

Definition at line 356 of file kateundo.cpp.

void KateUndoGroup::setRedoCursor ( const KTextEditor::Cursor &  cursor  ) 

sets the redo cursor position for the edit group.

Parameters:
selection selection to remember

Definition at line 323 of file kateundo.cpp.

void KateUndoGroup::setRedoSelection ( const KTextEditor::Range &  selection  ) 

sets the redo text selection range for the edit group.

Parameters:
selection selection to remember

Definition at line 313 of file kateundo.cpp.

void KateUndoGroup::setUndoCursor ( const KTextEditor::Cursor &  cursor  ) 

sets the undo cursor position for the edit group.

Parameters:
selection selection to remember

Definition at line 318 of file kateundo.cpp.

void KateUndoGroup::setUndoSelection ( const KTextEditor::Range &  selection  ) 

sets the undo text selection range for the edit group.

Parameters:
selection selection to remember

Definition at line 308 of file kateundo.cpp.

void KateUndoGroup::undo (  ) 

Undo the contained undo items.

Definition at line 257 of file kateundo.cpp.


The documentation for this class was generated from the following files:
  • kateundo.h
  • kateundo.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
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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