TextDocumentHighlighter Class Reference

TextDocument Highlighter. More...

#include <QTextDocumentAdapter.h>

List of all members.

Public Member Functions

 TextDocumentHighlighter ()
 Constructs new TextDocumentHighlighter object.
void setDocument (QTextDocumentAdapter *document)
 Sets document.
void setFormat (int start, int length, const QTextCharFormat &format)
 Sets the format for the specified text segment.

Protected Slots

void contentsChangeSlot (int position, int charsRemoved, int charsAdded)
 contentsChange slot.

Protected Member Functions

virtual void highlightBlock (const QString &text)


Detailed Description

TextDocument Highlighter.

Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)
Version:
0.2.0

Member Function Documentation

void TextDocumentHighlighter::setDocument ( QTextDocumentAdapter document  ) 

Sets document.

Parameters:
document the document

void TextDocumentHighlighter::setFormat ( int  start,
int  length,
const QTextCharFormat &  format 
)

Sets the format for the specified text segment.

Parameters:
start the start of the segment
length the length of the segment
format the format

void TextDocumentHighlighter::contentsChangeSlot ( int  position,
int  charsRemoved,
int  charsAdded 
) [protected, slot]

contentsChange slot.

Parameters:
position the position
charsRemoved the number of removed characters
charsAdded the number of removed characters

void TextDocumentHighlighter::highlightBlock ( const QString &  text  )  [protected, virtual]


Copyright © 2007 ETF and contributors. All Rights Reserved.