Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QAbstractTextDocumentLayout::Selection Class Reference

\variable QAbstractTextDocumentLayout::PaintContext::cursorPosition More...

#include <qabstracttextdocumentlayout.h>

+ Collaboration diagram for QAbstractTextDocumentLayout::Selection:

Public Attributes

QTextCursor cursor
 
QTextCharFormat format
 

Detailed Description

\variable QAbstractTextDocumentLayout::PaintContext::cursorPosition

the position within the document, where the cursor line should be drawn.

The default value is -1.

\variable QAbstractTextDocumentLayout::PaintContext::palette

the default color that is used for the text, when no color is specified.

The default value is the application's default palette.

\variable QAbstractTextDocumentLayout::PaintContext::clip

a hint to the layout specifying the area around paragraphs, frames or text require painting.

Everything outside of this rectangle does not need to be painted.

Specifying a clip rectangle can speed up drawing of large documents significantly. Note that the clip rectangle is in document coordinates (not in viewport coordinates). It is not a substitute for a clip region set on the painter but merely a hint.

The default value is a null rectangle indicating everything needs to be painted.

\variable QAbstractTextDocumentLayout::PaintContext::selections

the collection of selections that will be rendered when passing this paint context to QAbstractTextDocumentLayout's draw() function.

The default value is an empty list indicating no selection.

\reentrant \inmodule QtGui

The QAbstractTextDocumentLayout::Selection class is a convenience class defining the parameters of a selection.

A selection can be used to specify a part of a document that should be highlighted when drawing custom layouts for QTextDocuments with the QAbstractTextDocumentLayout::draw() function. It is specified using \l cursor and a \l format.

See also
QAbstractTextDocumentLayout, PaintContext

Definition at line 31 of file qabstracttextdocumentlayout.h.

Member Data Documentation

◆ cursor

QTextCursor QAbstractTextDocumentLayout::Selection::cursor

Definition at line 33 of file qabstracttextdocumentlayout.h.

◆ format

QTextCharFormat QAbstractTextDocumentLayout::Selection::format

Definition at line 34 of file qabstracttextdocumentlayout.h.


The documentation for this class was generated from the following file: