kateundo.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#ifndef kate_undo_h
00022
#define kate_undo_h
00023
00024
#include <qptrlist.h>
00025
#include <qstring.h>
00026
00027
class KateDocument;
00028
class KateUndo;
00029
00033 class KateUndoGroup
00034 {
00035
public:
00040
KateUndoGroup (KateDocument *doc);
00041
00045
~KateUndoGroup ();
00046
00047
public:
00051
void undo ();
00052
00056
void redo ();
00057
00058
public:
00062 enum UndoType
00063 {
00064 editInsertText,
00065 editRemoveText,
00066 editWrapLine,
00067 editUnWrapLine,
00068 editInsertLine,
00069 editRemoveLine,
00070 editMarkLineAutoWrapped,
00071 editInvalid
00072 };
00073
00082
void addItem (KateUndoGroup::UndoType type, uint line, uint col, uint len,
const QString &text);
00083
00089
bool merge(
KateUndoGroup* newGroup,
bool complex);
00090
00094
void safePoint (
bool safePoint=
true);
00095
private:
00100 KateUndoGroup::UndoType singleType();
00101
00107
bool isOnlyType(KateUndoGroup::UndoType type);
00108
00113
void addItem (KateUndo *u);
00114
00115
private:
00119 KateDocument *m_doc;
00120
00124
QPtrList<KateUndo> m_items;
00125
00129
bool m_safePoint;
00130 };
00131
00132
#endif
00133
00134
This file is part of the documentation for kate Library Version 3.4.0.