#include <QTextDocumentAdapter.h>
Signals | |
void | destroying () |
void | textCleared () |
void | textSet () |
void | textAppended () |
void | selectAllAvailable (bool available) |
Public Member Functions | |
int | length () |
Returns length of the document. | |
void | clear () |
Clears text. | |
void | setDestroying () |
Sets destroying state. | |
void | setUseHighlighter (bool useHighlighter) |
Sets whether or not this document is using the highlighter. | |
void | setFormat (int start, int length, const QTextCharFormat &format) |
Sets the format for the specified text segment. | |
void | highlightBlock (int blockStart, const QString &blockText) |
Highlights the text block of document. | |
virtual QString | getText () const =0 |
virtual void | setText (const QString &text)=0 |
virtual void | appendText (const QString &text)=0 |
Protected Slots | |
void | contentsChangeSlot (int position, int charsRemoved, int charsAdded) |
contentsChange slot. | |
Protected Member Functions | |
QTextDocumentAdapter (TextDocumentBridge *bridge) | |
Constructs new QLabelAdapter object. | |
virtual | ~QTextDocumentAdapter () |
Destructs QTextDocumentAdapter object. | |
Protected Attributes | |
int | m_length |
bool | m_destroying |
TextDocumentBridge * | m_bridge |
TextDocumentHighlighter * | m_highlighter |
QTextDocumentAdapter::QTextDocumentAdapter | ( | TextDocumentBridge * | bridge | ) | [protected] |
int QTextDocumentAdapter::length | ( | ) |
Returns length of the document.
void QTextDocumentAdapter::setUseHighlighter | ( | bool | useHighlighter | ) |
Sets whether or not this document is using the highlighter.
useHighlighter | true if using |
void QTextDocumentAdapter::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 QTextDocumentAdapter::highlightBlock | ( | int | blockStart, | |
const QString & | blockText | |||
) |
Highlights the text block of document.
blockStart | the block start | |
blockText | the block text |
void QTextDocumentAdapter::contentsChangeSlot | ( | int | position, | |
int | charsRemoved, | |||
int | charsAdded | |||
) | [protected, slot] |
contentsChange
slot.
position | the position | |
charsRemoved | the number of removed characters | |
charsAdded | the number of added characters |