edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
edbee::TextDocumentFilter Class Referenceabstract

#include <textdocumentfilter.h>

+ Collaboration diagram for edbee::TextDocumentFilter:

Public Member Functions

virtual ~TextDocumentFilter ()
 The default virtual constructor.
 
virtual void filterReplaceRangeSet (TextDocument *doc, TextRangeSet &rangeSet, QString &str)
 makes it possible to modify the range-set that's passed to the document
 
virtual void filterReplaceRangeSet (TextDocument *doc, TextRangeSet &rangeSet, QStringList &str)
 makes it possible to modify the range-set string that's passed to the document
 
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.
 

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: