void replaceText(TextDocument *document)
replaces the text and stores the 'old' content
Definition: textchange.cpp:184
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 int docLength() const
This is the length in the document.
Definition: textchange.cpp:126
TextChange(int offset, int length, const QString &text)
Constructs a single textchange.
Definition: textchange.cpp:21
void setStoredText(const QString &text)
Sets the text of this change.
Definition: textchange.cpp:155
This is the basic text change that's the base of the textchanges.
Definition: textchange.h:18
void setDocLength(int len)
Set the length of the change.
Definition: textchange.cpp:141
const QString docText(TextDocument *doc) const
This method returns the text currently in the document.
Definition: textchange.cpp:169
void appendStoredText(const QString &text)
Appends the text to this change.
Definition: textchange.cpp:162
virtual ~TextChange()
undo's a single textchange
Definition: textchange.cpp:30
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
QString storedText() const
The text currently stored in this textchange.
Definition: textchange.cpp:147
virtual void execute(TextDocument *document)
executes the given textchange
Definition: textchange.cpp:37
int offset() const
Return the offset.
Definition: textchange.cpp:111
A basic change.
Definition: change.h:18
virtual bool giveAndMerge(TextDocument *document, Change *textChange)
This method gives the given change to this textchange. The changes will be merged if possible...
Definition: textchange.cpp:90
virtual QString toString()
converts the change to a string
Definition: textchange.cpp:102
virtual int storedLength() const
The content length is the length that's currently stored in memory.
Definition: textchange.cpp:133
virtual void revert(TextDocument *document)
Reverts the single textchange.
Definition: textchange.cpp:45
void setOffset(int offset)
set the new offset
Definition: textchange.cpp:119
This is an abstract class for ranged changes This are changes (text changes and line changes) that sp...
Definition: abstractrangedchange.h:15
QString testString()
This method returns a string used for testing.
Definition: textchange.cpp:176
virtual void mergeStoredData(AbstractRangedChange *change)
This method merges the old data with the new data change the data to merge with. ...
Definition: textchange.cpp:53