edbee - Qt Editor Library
|
a class to handle line-data textchanges More...
#include <linedatachange.h>
Public Member Functions | |
LineDataChange (int line, int field) | |
virtual | ~LineDataChange () |
void | giveLineData (TextLineData *lineData) |
virtual void | execute (TextDocument *document) |
This method should execute the command. More... | |
virtual void | revert (TextDocument *doc) |
this method reverts the given operation More... | |
virtual bool | giveAndMerge (TextDocument *document, Change *textChange) |
merge is never a problem, simply More... | |
virtual void | applyLineDelta (int line, int length, int newLength) |
line is moved with the given delta More... | |
virtual QString | toString () |
Returns the debug text. More... | |
int | line () const |
Returns the line index. More... | |
void | setLine (int line) |
Sets the line of this change. More... | |
int | field () const |
retursn the field index of this line-data item More... | |
void | setField (int field) |
sets the field position More... | |
Public Member Functions inherited from edbee::Change | |
virtual | ~Change () |
a virtual empty destructor More... | |
virtual bool | canUndo () |
This method should return true if the change can be reverted. More... | |
virtual bool | isPersistenceRequired () |
This flag is used to mark this stack item as non-persistence requirable The default behaviour is that every textchange requires persistence. It is also possible to have certain changes that do not require persitence but should be placed on the undo stack. More... | |
virtual TextEditorController * | controllerContext () |
A text command can belong to a controller/view When it's a view only command. The undo only applies only to this view warning a DOCUMENT change may NEVER return a controllerContext!! More... | |
bool | isDocumentChange () |
this method can be used to check if the given change is a document change More... | |
virtual bool | isGroup () |
This method returns true if this change is a group change. When an object is group change it should be inherited by TextChangeGroup. More... | |
a class to handle line-data textchanges
edbee::LineDataChange::LineDataChange | ( | int | line, |
int | field | ||
) |
|
virtual |
|
virtual |
line is moved with the given delta
|
virtual |
This method should execute the command.
Implements edbee::Change.
int edbee::LineDataChange::field | ( | ) | const |
retursn the field index of this line-data item
|
virtual |
merge is never a problem, simply
Reimplemented from edbee::Change.
void edbee::LineDataChange::giveLineData | ( | TextLineData * | lineData | ) |
int edbee::LineDataChange::line | ( | ) | const |
Returns the line index.
|
virtual |
this method reverts the given operation
Reimplemented from edbee::Change.
void edbee::LineDataChange::setField | ( | int | field | ) |
sets the field position
void edbee::LineDataChange::setLine | ( | int | line | ) |
Sets the line of this change.
|
virtual |
Returns the debug text.
Implements edbee::Change.