The QPlainTextDocumentLayout class implements a plain text layout for QTextDocument More...
#include <QPlainTextDocumentLayout>
Inherits: QAbstractTextDocumentLayout.
This class was introduced in Qt 4.4.
QPlainTextDocumentLayout ( QTextDocument * document ) | |
~QPlainTextDocumentLayout () | |
int | cursorWidth () const |
void | ensureBlockLayout ( const QTextBlock & block ) const |
void | requestUpdate () |
void | setCursorWidth ( int width ) |
virtual QRectF | blockBoundingRect ( const QTextBlock & block ) const |
virtual QSizeF | documentSize () const |
virtual void | draw ( QPainter *, const PaintContext & ) |
virtual QRectF | frameBoundingRect ( QTextFrame * ) const |
virtual int | hitTest ( const QPointF &, Qt::HitTestAccuracy ) const |
virtual int | pageCount () const |
virtual void | documentChanged ( int from, int charsRemoved, int charsAdded ) |
The QPlainTextDocumentLayout class implements a plain text layout for QTextDocument
A QPlainTextDocumentLayout is required for text documents that can be display or edited in a QPlainTextEdit. See QTextDocument::setDocumentLayout().
QPlainTextDocumentLayout uses the QAbstractTextDocumentLayout API that QTextDocument requires, but redefines it partially in order to support plain text better. For instances, it does not operate on vertical pixels, but on paragraphs (called blocks) instead. The height of a document is identical to the number of paragraphs it contains. The layout also doesn't support tables or nested frames, or any sort of advanced text layout that goes beyond a list of paragraphs with syntax highlighting.
This property specifies the width of the cursor in pixels. The default value is 1.
Access functions:
int | cursorWidth () const |
void | setCursorWidth ( int width ) |
Constructs a plain text document layout for the text document.
Destructs a plain text document layout.
Reimplemented from QAbstractTextDocumentLayout::blockBoundingRect().
Reimplemented from QAbstractTextDocumentLayout::documentChanged().
Reimplemented from QAbstractTextDocumentLayout::documentSize().
Reimplemented from QAbstractTextDocumentLayout::draw().
Ensures that block has a valid layout
Reimplemented from QAbstractTextDocumentLayout::frameBoundingRect().
Reimplemented from QAbstractTextDocumentLayout::hitTest().
Reimplemented from QAbstractTextDocumentLayout::pageCount().
Requests a complete update on all views.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.