edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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.
 
virtual void revert (TextDocument *doc)
 this method reverts the given operation
 
virtual bool giveAndMerge (TextDocument *document, Change *textChange)
 merge is never a problem, simply
 
virtual void applyLineDelta (int line, int length, int newLength)
 line is moved with the given delta
 
virtual QString toString ()
 Returns the debug text.
 
int line () const
 Returns the line index.
 
void setLine (int line)
 Sets the line of this change.
 
int field () const
 retursn the field index of this line-data item
 
void setField (int field)
 sets the field position
 
- Public Member Functions inherited from edbee::Change
virtual ~Change ()
 a virtual empty destructor
 
virtual bool canUndo ()
 This method should return true if the change can be reverted.
 
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.
 
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!!
 
bool isDocumentChange ()
 this method can be used to check if the given change is a document change
 
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.
 

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: