QTextDocumentAdapter Class Reference

QTextDocument Adapter. More...

#include <QTextDocumentAdapter.h>

Inheritance diagram for QTextDocumentAdapter:

PlainDocument StyledDocument

List of all members.

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
TextDocumentBridgem_bridge
TextDocumentHighlighterm_highlighter


Detailed Description

QTextDocument Adapter.

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

Constructor & Destructor Documentation

QTextDocumentAdapter::QTextDocumentAdapter ( TextDocumentBridge bridge  )  [protected]

Constructs new QLabelAdapter object.

Parameters:
bridge the document bridge


Member Function Documentation

int QTextDocumentAdapter::length (  ) 

Returns length of the document.

Returns:
length of the document.

void QTextDocumentAdapter::setUseHighlighter ( bool  useHighlighter  ) 

Sets whether or not this document is using the highlighter.

Parameters:
useHighlighter true if using

void QTextDocumentAdapter::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 QTextDocumentAdapter::highlightBlock ( int  blockStart,
const QString &  blockText 
)

Highlights the text block of document.

Parameters:
blockStart the block start
blockText the block text

void QTextDocumentAdapter::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 added characters


Copyright © 2007 ETF and contributors. All Rights Reserved.