edbee - Qt Editor Library
Public Member Functions | List of all members
edbee::TextDocumentFilter Class Referenceabstract

#include <textdocumentfilter.h>

+ Collaboration diagram for edbee::TextDocumentFilter:

Public Member Functions

virtual ~TextDocumentFilter ()
 The default virtual constructor. More...
 
virtual void filterReplaceRangeSet (TextDocument *doc, TextRangeSet &rangeSet, QString &str)
 makes it possible to modify the range-set that's passed to the document More...
 
virtual void filterReplaceRangeSet (TextDocument *doc, TextRangeSet &rangeSet, QStringList &str)
 makes it possible to modify the range-set string that's passed to the document More...
 
virtual ChangefilterChange (TextDocument *doc, Change *change, int coalesceId)=0
 This method is called for any other change Just before this change is executed the changes are passed to this method. More...
 

Constructor & Destructor Documentation

◆ ~TextDocumentFilter()

edbee::TextDocumentFilter::~TextDocumentFilter ( )
virtual

The default virtual constructor.

Member Function Documentation

◆ filterChange()

virtual Change* edbee::TextDocumentFilter::filterChange ( TextDocument doc,
Change change,
int  coalesceId 
)
pure virtual

This method is called for any other change Just before this change is executed the changes are passed to this method.

You can do what you want with this text change. Just remember you are the owner and if you do nothing. Nothing happens

WARNING: When you do NOT use the changes object you should delete it!!!

When done you can call doc->giveTextChangeWithoutFilter( changes ) for applying the changes

Parameters
doca reference to the document
changesthe multi-text-change that's excuted
coalesceIdthe coalesceId
Returns
this method should returnt the effictive change applied

◆ filterReplaceRangeSet() [1/2]

void edbee::TextDocumentFilter::filterReplaceRangeSet ( TextDocument doc,
TextRangeSet rangeSet,
QString &  str 
)
virtual

makes it possible to modify the range-set that's passed to the document

A filter for single string replacements.

Parameters
docthe textdocument
rangeSetthe rangeSet that's replaced
strthe string that's going to placed at the given ranges

◆ filterReplaceRangeSet() [2/2]

void edbee::TextDocumentFilter::filterReplaceRangeSet ( TextDocument doc,
TextRangeSet rangeSet,
QStringList &  str 
)
virtual

makes it possible to modify the range-set string that's passed to the document

A filter for stringlist replacements {}.

Parameters
docthe textdocument
rangeSetthe rangeSet that's replaced
strthe stringsets that's going to placed at the given ranges

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