kate Library API Documentation

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

 KateUndoGroup (KateDocument *doc)
 ~KateUndoGroup ()
void undo ()
void redo ()
void addItem (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text)
bool merge (KateUndoGroup *newGroup)


Detailed Description

Class to manage a group of undo items.

Definition at line 33 of file kateundo.h.


Member Enumeration Documentation

enum KateUndoGroup::UndoType
 

Types for undo items.

Definition at line 62 of file kateundo.h.


Constructor & Destructor Documentation

KateUndoGroup::KateUndoGroup KateDocument *  doc  ) 
 

Constructor.

Parameters:
doc document to belong to

Definition at line 276 of file kateundo.cpp.

KateUndoGroup::~KateUndoGroup  ) 
 

Destructor.

Definition at line 282 of file kateundo.cpp.


Member Function Documentation

void KateUndoGroup::undo  ) 
 

Undo the contained undo items.

Definition at line 286 of file kateundo.cpp.

void KateUndoGroup::redo  ) 
 

Redo the contained undo items.

Definition at line 309 of file kateundo.cpp.

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 lenght of change
text text removed/inserted

Definition at line 332 of file kateundo.cpp.

Referenced by merge().

bool KateUndoGroup::merge KateUndoGroup newGroup  ) 
 

merge this group with an other

Parameters:
newGroup group to merge into this one
Returns:
success

Definition at line 347 of file kateundo.cpp.

References addItem(), isOnlyType(), and m_items.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kate Library Version 3.3.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jan 22 16:53:07 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003