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

Kate

KateUndo Class Reference

Base class for Kate undo commands. More...

#include <kateundo.h>

Inheritance diagram for KateUndo:
KateEditInsertLineUndo KateEditInsertTextUndo KateEditMarkLineAutoWrappedUndo KateEditRemoveLineUndo KateEditRemoveTextUndo KateEditUnWrapLineUndo KateEditWrapLineUndo

List of all members.

Public Types

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

Public Member Functions

virtual bool isEmpty () const
 KateUndo (KateDocument *document)
virtual bool mergeWith (const KateUndo *undo)
virtual void redo ()=0
virtual KateUndo::UndoType type () const =0
virtual void undo ()=0
virtual ~KateUndo ()

Protected Member Functions

KateDocument * document ()

Detailed Description

Base class for Kate undo commands.

Definition at line 35 of file kateundo.h.


Member Enumeration Documentation

enum KateUndo::UndoType

Types for undo items.

Enumerator:
editInsertText 
editRemoveText 
editWrapLine 
editUnWrapLine 
editInsertLine 
editRemoveLine 
editMarkLineAutoWrapped 
editInvalid 

Definition at line 53 of file kateundo.h.


Constructor & Destructor Documentation

KateUndo::KateUndo ( KateDocument *  document  ) 

Constructor.

Parameters:
document the document the undo item belongs to

Definition at line 28 of file kateundo.cpp.

KateUndo::~KateUndo (  )  [virtual]

Destructor.

Definition at line 33 of file kateundo.cpp.


Member Function Documentation

KateDocument* KateUndo::document (  )  [inline, protected]

Return the document the undo item belongs to.

Returns:
the document the undo item belongs to

Definition at line 102 of file kateundo.h.

bool KateUndo::isEmpty (  )  const [virtual]

Check whether the item is empty.

Returns:
whether the item is empty

Reimplemented in KateEditInsertTextUndo, and KateEditRemoveTextUndo.

Definition at line 37 of file kateundo.cpp.

bool KateUndo::mergeWith ( const KateUndo *  undo  )  [virtual]

merge an undo item Saves a bit of memory and potentially many calls when undo/redoing.

Parameters:
undo undo item to merge
Returns:
success

Definition at line 52 of file kateundo.cpp.

virtual void KateUndo::redo (  )  [pure virtual]

redo this item

Implemented in KateEditInsertTextUndo, KateEditRemoveTextUndo, KateEditMarkLineAutoWrappedUndo, KateEditWrapLineUndo, KateEditUnWrapLineUndo, KateEditInsertLineUndo, and KateEditRemoveLineUndo.

virtual KateUndo::UndoType KateUndo::type (  )  const [pure virtual]

type of item

Returns:
type

Implemented in KateEditInsertTextUndo, KateEditRemoveTextUndo, KateEditMarkLineAutoWrappedUndo, KateEditWrapLineUndo, KateEditUnWrapLineUndo, KateEditInsertLineUndo, and KateEditRemoveLineUndo.

virtual void KateUndo::undo (  )  [pure virtual]

undo this item

Implemented in KateEditInsertTextUndo, KateEditRemoveTextUndo, KateEditMarkLineAutoWrappedUndo, KateEditWrapLineUndo, KateEditUnWrapLineUndo, KateEditInsertLineUndo, and KateEditRemoveLineUndo.


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
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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