12 class AbstractRangedChange;
13 class LineDataListChange;
37 void addOffsetDeltaToChanges( QList<AbstractRangedChange*>& changes,
int fromIndex,
int delta );
38 int findInsertIndexForOffset( QList<AbstractRangedChange*>& changes,
int offset );
40 void inverseMergeRemainingOverlappingChanges( QList<AbstractRangedChange*>& changes,
TextDocument* doc,
int mergedAtIndex,
int orgStartOffset,
int orgEndOffset ,
int delta);
54 virtual void clear(
bool performDelete=
true);
78 QList<AbstractRangedChange*> textChangeList_;
79 QList<LineDataListChange*> lineDataTextChangeList_;
80 QList<Change*> miscChangeList_;
This is the base and abstract class of a text document A TextDocument is the model part of the editor...
Definition: textdocument.h:40
virtual QString toString()
Converts this textchange to a textual representation.
Definition: mergablechangegroup.cpp:383
MergableChangeGroup(TextEditorController *controller)
The default complex textchange constructor.
Definition: mergablechangegroup.cpp:23
virtual Change * take(int idx)
Takes the given item.
Definition: mergablechangegroup.cpp:331
An undoable-command-group.
Definition: change.h:84
virtual void clear(bool performDelete=true)
clears all items
Definition: mergablechangegroup.cpp:357
bool mergeAsSelection(TextDocument *document, Change *textChange)
Definition: mergablechangegroup.cpp:476
virtual int size()
returns the number of elements
Definition: mergablechangegroup.cpp:350
This is the basic text change that's the base of the textchanges.
Definition: textchange.h:18
A special mergable group textchange. Used by the editor to merge editing operation together...
Definition: mergablechangegroup.h:23
void giveSingleTextChange(TextDocument *doc, TextChange *change)
Gives a single textchange.
Definition: mergablechangegroup.cpp:214
virtual bool isDiscardable()
default not discardable
Definition: mergablechangegroup.cpp:44
bool mergeAsGroup(TextDocument *document, Change *textChange)
merges the given textchange as a group.
Definition: mergablechangegroup.cpp:455
virtual void groupClosed()
the group is closed, we must 'store' the selection
Definition: mergablechangegroup.cpp:51
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
void compressChanges(TextDocument *document)
This is going to be the magic method that's going to merge all changes.
Definition: mergablechangegroup.cpp:512
virtual void execute(TextDocument *document)
Executes this textchange.
Definition: mergablechangegroup.cpp:62
virtual TextEditorController * controller()
returns the controller
Definition: change.cpp:128
virtual void giveChange(TextDocument *doc, Change *change)
Gives the change.
Definition: mergablechangegroup.cpp:269
A basic change.
Definition: change.h:18
void giveLineDataListTextChange(TextDocument *doc, LineDataListChange *change)
gives a line data list text change
Definition: mergablechangegroup.cpp:221
The texteditor works via the controller. The controller is the central point/mediater which maps/cont...
Definition: texteditorcontroller.h:37
The basic textrange class. A simple class of textrange with a simple vector implementation.
Definition: textrange.h:198
virtual Change * at(int idx)
returns the textchange at the given index
Definition: mergablechangegroup.cpp:312
QString toSingleTextChangeTestString()
Converts the textchangeList as as string The format is the following: <offset>:<length>:<str>,...
Definition: mergablechangegroup.cpp:395
virtual bool giveAndMerge(TextDocument *document, Change *textChange)
This method tries to merge the given change with the other change The textChange supplied with this m...
Definition: mergablechangegroup.cpp:374
This is an abstract class for ranged changes This are changes (text changes and line changes) that sp...
Definition: abstractrangedchange.h:15
virtual ~MergableChangeGroup()
The default destructor.
Definition: mergablechangegroup.cpp:35
virtual void revert(TextDocument *document)
this method is called to revert the operation reverts the given operation
Definition: mergablechangegroup.cpp:74
void moveChangesFromGroup(TextDocument *doc, ChangeGroup *group)
Moves all textchanges from the given group to this group.
Definition: mergablechangegroup.cpp:409
void compressTextChanges(TextDocument *document)
Compresses the textchanges.
Definition: mergablechangegroup.cpp:492
A full line data text change. This means the growing or shrinking of the line data buffer It stores t...
Definition: linedatalistchange.h:19