edbee - Qt Editor Library
Public Member Functions | List of all members
edbee::LineDataChange Class Reference

a class to handle line-data textchanges More...

#include <linedatachange.h>

+ Inheritance diagram for edbee::LineDataChange:
+ Collaboration diagram for edbee::LineDataChange:

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 TextEditorControllercontrollerContext ()
 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...
 

Detailed Description

a class to handle line-data textchanges

Constructor & Destructor Documentation

◆ LineDataChange()

edbee::LineDataChange::LineDataChange ( int  line,
int  field 
)

◆ ~LineDataChange()

edbee::LineDataChange::~LineDataChange ( )
virtual

Member Function Documentation

◆ applyLineDelta()

void edbee::LineDataChange::applyLineDelta ( int  line,
int  length,
int  newLength 
)
virtual

line is moved with the given delta

◆ execute()

void edbee::LineDataChange::execute ( TextDocument document)
virtual

This method should execute the command.

Implements edbee::Change.

◆ field()

int edbee::LineDataChange::field ( ) const

retursn the field index of this line-data item

◆ giveAndMerge()

bool edbee::LineDataChange::giveAndMerge ( TextDocument document,
Change textChange 
)
virtual

merge is never a problem, simply

Reimplemented from edbee::Change.

◆ giveLineData()

void edbee::LineDataChange::giveLineData ( TextLineData lineData)

◆ line()

int edbee::LineDataChange::line ( ) const

Returns the line index.

◆ revert()

void edbee::LineDataChange::revert ( TextDocument )
virtual

this method reverts the given operation

Reimplemented from edbee::Change.

◆ setField()

void edbee::LineDataChange::setField ( int  field)

sets the field position

◆ setLine()

void edbee::LineDataChange::setLine ( int  line)

Sets the line of this change.

◆ toString()

QString edbee::LineDataChange::toString ( )
virtual

Returns the debug text.

Implements edbee::Change.


The documentation for this class was generated from the following files: