#include <QTextDocumentAdapter.h>
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) |
void TextDocumentHighlighter::setDocument | ( | QTextDocumentAdapter * | document | ) |
Sets document.
document | the document |
void TextDocumentHighlighter::setFormat | ( | int | start, | |
int | length, | |||
const QTextCharFormat & | format | |||
) |
Sets the format for the specified text segment.
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.
position | the position | |
charsRemoved | the number of removed characters | |
charsAdded | the number of removed characters |
void TextDocumentHighlighter::highlightBlock | ( | const QString & | text | ) | [protected, virtual] |