Qt 4.8
|
The QTextLayout class is used to lay out and render text. More...
#include <qtextlayout.h>
Classes | |
class | FormatRange |
The QTextLayout::FormatRange structure is used to apply extra formatting information for a specified area in the text layout's content. More... | |
Public Types | |
enum | CursorMode { SkipCharacters, SkipWords } |
Public Functions | |
QList< FormatRange > | additionalFormats () const |
Returns the list of additional formats supported by the text layout. More... | |
void | beginLayout () |
Begins the layout process. More... | |
QRectF | boundingRect () const |
The smallest rectangle that contains all the lines in the layout. More... | |
bool | cacheEnabled () const |
Returns true if the complete layout information is cached; otherwise returns false. More... | |
void | clearAdditionalFormats () |
Clears the list of additional formats supported by the text layout. More... | |
void | clearLayout () |
Clears the line information in the layout. More... | |
QTextLine | createLine () |
Returns a new text line to be laid out if there is text to be inserted into the layout; otherwise returns an invalid text line. More... | |
Qt::CursorMoveStyle | cursorMoveStyle () const |
The cursor movement style of this QTextLayout. More... | |
void | draw (QPainter *p, const QPointF &pos, const QVector< FormatRange > &selections=QVector< FormatRange >(), const QRectF &clip=QRectF()) const |
Draws the whole layout on the painter p at the position specified by pos. More... | |
void | drawCursor (QPainter *p, const QPointF &pos, int cursorPosition) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Draws a text cursor with the current pen at the given position using the painter specified. More... | |
void | drawCursor (QPainter *p, const QPointF &pos, int cursorPosition, int width) const |
Draws a text cursor with the current pen and the specified width at the given position using the painter specified. More... | |
void | endLayout () |
Ends the layout process. More... | |
QTextEngine * | engine () const |
QFont | font () const |
Returns the current font that is used for the layout, or a default font if none is set. More... | |
QList< QGlyphRun > | glyphRuns () const |
Returns the glyph indexes and positions for all glyphs in this QTextLayout. More... | |
bool | isValidCursorPosition (int pos) const |
/ Returns true if position pos is a valid cursor position. More... | |
int | leftCursorPosition (int oldPos) const |
Returns the cursor position to the left of oldPos, next to it. More... | |
QTextLine | lineAt (int i) const |
Returns the {i}-th line of text in this text layout. More... | |
int | lineCount () const |
Returns the number of lines in this text layout. More... | |
QTextLine | lineForTextPosition (int pos) const |
Returns the line that contains the cursor position specified by pos. More... | |
qreal | maximumWidth () const |
The maximum width the layout could expand to; this is essentially the width of the entire text. More... | |
qreal | minimumWidth () const |
The minimum width the layout needs. More... | |
int | nextCursorPosition (int oldPos, CursorMode mode=SkipCharacters) const |
Returns the next valid cursor position after oldPos that respects the given cursor mode. More... | |
QPointF | position () const |
The global position of the layout. More... | |
int | preeditAreaPosition () const |
Returns the position of the area in the text layout that will be processed before editing occurs. More... | |
QString | preeditAreaText () const |
Returns the text that is inserted in the layout before editing occurs. More... | |
int | previousCursorPosition (int oldPos, CursorMode mode=SkipCharacters) const |
Returns the first valid cursor position before oldPos that respects the given cursor mode. More... | |
QTextLayout () | |
Constructs an empty text layout. More... | |
QTextLayout (const QString &text) | |
Constructs a text layout to lay out the given text. More... | |
QTextLayout (const QString &text, const QFont &font, QPaintDevice *paintdevice=0) | |
Constructs a text layout to lay out the given text with the specified font. More... | |
QTextLayout (const QTextBlock &b) | |
Constructs a text layout to lay out the given block. More... | |
int | rightCursorPosition (int oldPos) const |
Returns the cursor position to the right of oldPos, next to it. More... | |
void | setAdditionalFormats (const QList< FormatRange > &overrides) |
Sets the additional formats supported by the text layout to formatList. More... | |
void | setCacheEnabled (bool enable) |
Enables caching of the complete layout information if enable is true; otherwise disables layout caching. More... | |
void | setCursorMoveStyle (Qt::CursorMoveStyle style) |
Set the cursor movement style. More... | |
void | setFlags (int flags) |
void | setFont (const QFont &f) |
Sets the layout's font to the given font. More... | |
void | setPosition (const QPointF &p) |
Moves the text layout to point p. More... | |
void | setPreeditArea (int position, const QString &text) |
Sets the position and text of the area in the layout that is processed before editing occurs. More... | |
void | setText (const QString &string) |
Sets the layout's text to the given string. More... | |
void | setTextOption (const QTextOption &option) |
Sets the text option structure that controls the layout process to the given option. More... | |
QString | text () const |
Returns the layout's text. More... | |
QTextOption | textOption () const |
Returns the current text option used to control the layout process. More... | |
~QTextLayout () | |
Destructs the layout. More... | |
Private Functions | |
QTextLayout (QTextEngine *e) | |
Properties | |
QTextEngine * | d |
Friends | |
class | QGraphicsSimpleTextItem |
class | QGraphicsSimpleTextItemPrivate |
class | QPainter |
class | QPSPrinter |
void | qt_format_text (const QFont &font, const QRectF &_r, int tf, const QTextOption *, const QString &str, QRectF *brect, int tabstops, int *tabarray, int tabarraylen, QPainter *painter) |
The QTextLayout class is used to lay out and render text.
It offers many features expected from a modern text layout engine, including Unicode compliant rendering, line breaking and handling of cursor positioning. It can also produce and render device independent layout, something that is important for WYSIWYG applications.
The class has a rather low level API and unless you intend to implement your own text rendering for some specialized widget, you probably won't need to use it directly.
QTextLayout can be used with both plain and rich text.
QTextLayout can be used to create a sequence of QTextLine instances with given widths and can position them independently on the screen. Once the layout is done, these lines can be drawn on a paint device.
The text to be laid out can be provided in the constructor or set with setText().
The layout can be seen as a sequence of QTextLine objects; use createLine() to create a QTextLine instance, and lineAt() or lineForTextPosition() to retrieve created lines.
Here is a code snippet that demonstrates the layout phase:
The text can then be rendered by calling the layout's draw() function:
For a given position in the text you can find a valid cursor position with isValidCursorPosition(), nextCursorPosition(), and previousCursorPosition().
The QTextLayout itself can be positioned with setPosition(); it has a boundingRect(), and a minimumWidth() and a maximumWidth().
Definition at line 105 of file qtextlayout.h.
Enumerator | |
---|---|
SkipCharacters | |
SkipWords |
Definition at line 153 of file qtextlayout.h.
QTextLayout::QTextLayout | ( | ) |
Constructs an empty text layout.
Definition at line 344 of file qtextlayout.cpp.
QTextLayout::QTextLayout | ( | const QString & | text | ) |
Constructs a text layout to lay out the given text.
Definition at line 350 of file qtextlayout.cpp.
QTextLayout::QTextLayout | ( | const QString & | text, |
const QFont & | font, | ||
QPaintDevice * | paintdevice = 0 |
||
) |
Constructs a text layout to lay out the given text with the specified font.
All the metric and layout calculations will be done in terms of the paint device, paintdevice. If paintdevice is 0 the calculations will be done in screen metrics.
Definition at line 364 of file qtextlayout.cpp.
QTextLayout::QTextLayout | ( | const QTextBlock & | block | ) |
Constructs a text layout to lay out the given block.
Definition at line 379 of file qtextlayout.cpp.
QTextLayout::~QTextLayout | ( | ) |
|
inlineprivate |
Definition at line 183 of file qtextlayout.h.
QList< QTextLayout::FormatRange > QTextLayout::additionalFormats | ( | ) | const |
Returns the list of additional formats supported by the text layout.
Definition at line 551 of file qtextlayout.cpp.
Referenced by QSyntaxHighlighterPrivate::applyFormatChanges().
void QTextLayout::beginLayout | ( | ) |
Begins the layout process.
Definition at line 645 of file qtextlayout.cpp.
Referenced by QPainterPath::addText(), QDeclarativeTextLayout::beginLayout(), QCommandLinkButtonPrivate::descriptionHeight(), QItemDelegatePrivate::doTextLayout(), QSvgText::draw(), QTextDocumentLayoutPrivate::drawListItem(), QRawFont::fromFont(), QPlainTextDocumentLayout::layoutBlock(), QTextDocumentLayoutPrivate::layoutBlock(), QStaticTextPrivate::paintText(), qt_format_text(), setupTextLayout(), QLineControl::updateDisplayText(), QCommonStylePrivate::viewItemSize(), and viewItemTextLayout().
QRectF QTextLayout::boundingRect | ( | ) | const |
The smallest rectangle that contains all the lines in the layout.
Definition at line 934 of file qtextlayout.cpp.
Referenced by QTextDocumentLayout::blockBoundingRect(), QPlainTextDocumentLayout::blockBoundingRect(), QTextDocumentLayoutPrivate::drawBlock(), QTextDocumentLayoutPrivate::hitTest(), QTextDocumentLayoutPrivate::layoutBlock(), QTextDocumentLayoutPrivate::layoutFlow(), and QStaticTextPrivate::paintText().
bool QTextLayout::cacheEnabled | ( | ) | const |
Returns true if the complete layout information is cached; otherwise returns false.
Definition at line 601 of file qtextlayout.cpp.
void QTextLayout::clearAdditionalFormats | ( | ) |
Clears the list of additional formats supported by the text layout.
Definition at line 575 of file qtextlayout.cpp.
void QTextLayout::clearLayout | ( | ) |
Clears the line information in the layout.
After having called this function, lineCount() returns 0.
Definition at line 690 of file qtextlayout.cpp.
Referenced by QDeclarativeTextLayout::clearLayout(), QTextBlock::clearLayout(), and QPlainTextDocumentLayoutPrivate::relayout().
QTextLine QTextLayout::createLine | ( | ) |
Returns a new text line to be laid out if there is text to be inserted into the layout; otherwise returns an invalid text line.
The text layout creates a new line object that starts after the last line in the layout, or at the beginning if the layout is empty. The layout maintains an internal cursor, and each line is filled with text from the cursor position onwards when the QTextLine::setLineWidth() function is called.
Once QTextLine::setLineWidth() is called, a new line can be created and filled with text. Repeating this process will lay out the whole block of text contained in the QTextLayout. If there is no text left to be inserted into the layout, the QTextLine returned will not be valid (isValid() will return false).
Definition at line 842 of file qtextlayout.cpp.
Referenced by QPainterPath::addText(), QCommandLinkButtonPrivate::descriptionHeight(), QItemDelegatePrivate::doTextLayout(), QSvgText::draw(), QTextDocumentLayoutPrivate::drawListItem(), QRawFont::fromFont(), QPlainTextDocumentLayout::layoutBlock(), QTextDocumentLayoutPrivate::layoutBlock(), QStaticTextPrivate::paintText(), qt_format_text(), setupTextLayout(), QLineControl::updateDisplayText(), QCommonStylePrivate::viewItemSize(), and viewItemTextLayout().
Qt::CursorMoveStyle QTextLayout::cursorMoveStyle | ( | ) | const |
The cursor movement style of this QTextLayout.
The default is Qt::LogicalMoveStyle.
Definition at line 635 of file qtextlayout.cpp.
void QTextLayout::draw | ( | QPainter * | p, |
const QPointF & | pos, | ||
const QVector< FormatRange > & | selections = QVector<FormatRange>() , |
||
const QRectF & | clip = QRectF() |
||
) | const |
Draws the whole layout on the painter p at the position specified by pos.
The rendered layout includes the given selections and is clipped within the rectangle specified by clip.
Definition at line 1074 of file qtextlayout.cpp.
Referenced by QDeclarativeTextLayout::draw(), QSvgText::draw(), QLineControl::draw(), QTextDocumentLayoutPrivate::drawBlock(), QTextDocumentLayoutPrivate::drawListItem(), QGraphicsSimpleTextItem::paint(), QPlainTextEdit::paintEvent(), QStaticTextPrivate::paintText(), and QDeclarativeTextLayout::prepare().
void QTextLayout::drawCursor | ( | QPainter * | painter, |
const QPointF & | position, | ||
int | cursorPosition | ||
) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Draws a text cursor with the current pen at the given position using the painter specified.
The corresponding position within the text is specified by cursorPosition.
Definition at line 1252 of file qtextlayout.cpp.
Referenced by QLineControl::draw(), QTextDocumentLayoutPrivate::drawBlock(), QTextDocumentLayoutPrivate::drawFrame(), and QPlainTextEdit::paintEvent().
void QTextLayout::drawCursor | ( | QPainter * | painter, |
const QPointF & | position, | ||
int | cursorPosition, | ||
int | width | ||
) | const |
Draws a text cursor with the current pen and the specified width at the given position using the painter specified.
The corresponding position within the text is specified by cursorPosition.
Definition at line 1264 of file qtextlayout.cpp.
void QTextLayout::endLayout | ( | ) |
Ends the layout process.
Definition at line 664 of file qtextlayout.cpp.
Referenced by QPainterPath::addText(), QCommandLinkButtonPrivate::descriptionHeight(), QItemDelegatePrivate::doTextLayout(), QSvgText::draw(), QTextDocumentLayoutPrivate::drawListItem(), QRawFont::fromFont(), QPlainTextDocumentLayout::layoutBlock(), QTextDocumentLayoutPrivate::layoutBlock(), QStaticTextPrivate::paintText(), qt_format_text(), setupTextLayout(), QLineControl::updateDisplayText(), QCommonStylePrivate::viewItemSize(), and viewItemTextLayout().
|
inline |
Returns the text engine used to render the text layout.
Definition at line 180 of file qtextlayout.h.
Referenced by QPainterPath::addText(), QTextBlockData::invalidate(), QTextCursorPrivate::movePosition(), and qt_format_text().
QFont QTextLayout::font | ( | ) | const |
Returns the current font that is used for the layout, or a default font if none is set.
Definition at line 412 of file qtextlayout.cpp.
Referenced by QDeclarativeTextLayout::prepare(), and QTextControlPrivate::rectForPosition().
Returns the glyph indexes and positions for all glyphs in this QTextLayout.
This is an expensive function, and should not be called in a time sensitive context.
Definition at line 1059 of file qtextlayout.cpp.
Referenced by QRawFont::fromFont().
bool QTextLayout::isValidCursorPosition | ( | int | pos | ) | const |
/ Returns true if position pos is a valid cursor position.
In a Unicode context some positions in the text are not valid cursor positions, because the position is inside a Unicode surrogate or a grapheme cluster.
A grapheme cluster is a sequence of two or more Unicode characters that form one indivisible entity on the screen. For example the latin character `' can be represented in Unicode by two characters, `A' (0x41), and the combining diaresis (0x308). A text cursor can only validly be positioned before or after these two characters, never between them since that wouldn't make sense. In indic languages every syllable forms a grapheme cluster.
Definition at line 818 of file qtextlayout.cpp.
int QTextLayout::leftCursorPosition | ( | int | oldPos | ) | const |
Returns the cursor position to the left of oldPos, next to it.
The position is dependent on the visual position of characters, after bi-directional reordering.
Definition at line 796 of file qtextlayout.cpp.
Referenced by QTextDocumentPrivate::leftCursorPosition().
QTextLine QTextLayout::lineAt | ( | int | i | ) | const |
Returns the {i}-th line of text in this text layout.
Definition at line 889 of file qtextlayout.cpp.
Referenced by QPlainTextEditPrivate::_q_adjustScrollbars(), QPlainTextDocumentLayout::blockBoundingRect(), QPlainTextDocumentLayout::blockWidth(), QLineControl::cursorRect(), QSvgText::draw(), QTextDocumentLayoutPrivate::drawListItem(), flowPosition(), QTextFragment::glyphRuns(), QPlainTextEditControl::hitTest(), QTextDocumentLayoutPrivate::hitTest(), QTextDocumentLayoutPrivate::layoutBlock(), QTextDocumentLayoutPrivate::layoutFlow(), QTextCursorPrivate::movePosition(), QPlainTextEditPrivate::pageUpDown(), QTextDocumentLayout::positionInlineObject(), qt_format_text(), setupTextLayout(), QPlainTextEditPrivate::verticalOffset(), QCommonStylePrivate::viewItemDrawText(), and QLineControl::xToPos().
int QTextLayout::lineCount | ( | ) | const |
Returns the number of lines in this text layout.
Definition at line 879 of file qtextlayout.cpp.
Referenced by QPlainTextEditPrivate::_q_adjustScrollbars(), QPlainTextDocumentLayout::blockBoundingRect(), QTextCursorPrivate::blockLayout(), QPlainTextDocumentLayout::blockWidth(), QTextCursor::columnNumber(), QTextControlPrivate::cursorMoveKeyEvent(), QPlainTextDocumentLayout::documentChanged(), QSvgText::draw(), QTextDocumentLayoutPrivate::drawListItem(), QPlainTextDocumentLayout::ensureBlockLayout(), flowPosition(), QTextFragment::glyphRuns(), QPlainTextEditControl::hitTest(), QTextDocumentLayoutPrivate::hitTest(), QPlainTextDocumentLayout::layoutBlock(), QTextDocumentLayoutPrivate::layoutBlock(), QTextCursorPrivate::movePosition(), QPlainTextEditPrivate::pageUpDown(), QTextDocumentLayout::positionInlineObject(), qt_format_text(), QTextControl::selectionRect(), setupTextLayout(), QDeclarativeTextEdit::updateTotalLines(), and QCommonStylePrivate::viewItemDrawText().
QTextLine QTextLayout::lineForTextPosition | ( | int | pos | ) | const |
Returns the line that contains the cursor position specified by pos.
Definition at line 899 of file qtextlayout.cpp.
Referenced by QAccessibleTextWidget::characterRect(), QTextCursor::columnNumber(), currentTextLine(), QTextDocumentLayoutPrivate::drawBlock(), QTextCursorPrivate::movePosition(), QPlainTextEdit::paintEvent(), QTextControlPrivate::rectForPosition(), QTextControl::selectionRect(), and QTextCursorPrivate::setX().
qreal QTextLayout::maximumWidth | ( | ) | const |
The maximum width the layout could expand to; this is essentially the width of the entire text.
Definition at line 978 of file qtextlayout.cpp.
Referenced by QTextDocumentLayoutPrivate::layoutBlock().
qreal QTextLayout::minimumWidth | ( | ) | const |
The minimum width the layout needs.
This is the width of the layout's smallest non-breakable substring.
Definition at line 964 of file qtextlayout.cpp.
Referenced by QTextDocumentLayoutPrivate::layoutBlock().
int QTextLayout::nextCursorPosition | ( | int | oldPos, |
CursorMode | mode = SkipCharacters |
||
) | const |
Returns the next valid cursor position after oldPos that respects the given cursor mode.
Returns value of oldPos, if oldPos is not a valid cursor position.
Definition at line 702 of file qtextlayout.cpp.
Referenced by QLineControl::del(), QTextDocumentPrivate::nextCursorPosition(), and QLineControl::selectWordAtPos().
QPointF QTextLayout::position | ( | ) | const |
The global position of the layout.
This is independent of the bounding rectangle and of the layout process.
Definition at line 916 of file qtextlayout.cpp.
Referenced by QTextDocumentLayout::blockBoundingRect(), QAccessibleTextWidget::characterRect(), QTextDocumentLayoutPrivate::drawBlock(), QTextDocumentLayoutPrivate::drawListItem(), flowPosition(), QTextDocumentLayoutPrivate::hitTest(), QTextDocumentLayoutPrivate::layoutBlock(), and QTextDocumentLayoutPrivate::layoutFlow().
int QTextLayout::preeditAreaPosition | ( | ) | const |
Returns the position of the area in the text layout that will be processed before editing occurs.
Definition at line 500 of file qtextlayout.cpp.
Referenced by QSyntaxHighlighterPrivate::applyFormatChanges(), QTextDocumentLayoutPrivate::drawBlock(), QPlainTextEdit::paintEvent(), and QTextControlPrivate::rectForPosition().
QString QTextLayout::preeditAreaText | ( | ) | const |
Returns the text that is inserted in the layout before editing occurs.
Definition at line 510 of file qtextlayout.cpp.
Referenced by QSyntaxHighlighterPrivate::applyFormatChanges(), QTextDocumentLayoutPrivate::drawBlock(), QTextDocumentLayout::hitTest(), QPlainTextEdit::paintEvent(), QDeclarativeTextEdit::positionAt(), QTextControlPrivate::rectForPosition(), and QTextControlPrivate::sendMouseEventToInputContext().
int QTextLayout::previousCursorPosition | ( | int | oldPos, |
CursorMode | mode = SkipCharacters |
||
) | const |
Returns the first valid cursor position before oldPos that respects the given cursor mode.
Returns value of oldPos, if oldPos is not a valid cursor position.
Definition at line 738 of file qtextlayout.cpp.
Referenced by QTextDocumentPrivate::previousCursorPosition(), and QLineControl::selectWordAtPos().
int QTextLayout::rightCursorPosition | ( | int | oldPos | ) | const |
Returns the cursor position to the right of oldPos, next to it.
The position is dependent on the visual position of characters, after bi-directional reordering.
Definition at line 777 of file qtextlayout.cpp.
Referenced by QTextDocumentPrivate::rightCursorPosition().
void QTextLayout::setAdditionalFormats | ( | const QList< FormatRange > & | formatList | ) |
Sets the additional formats supported by the text layout to formatList.
Definition at line 521 of file qtextlayout.cpp.
Referenced by QSyntaxHighlighterPrivate::applyFormatChanges(), QSvgText::draw(), QTextControlPrivate::inputMethodEvent(), QGraphicsSimpleTextItem::paint(), and QLineControl::processInputMethodEvent().
void QTextLayout::setCacheEnabled | ( | bool | enable | ) |
Enables caching of the complete layout information if enable is true; otherwise disables layout caching.
Usually QTextLayout throws most of the layouting information away after a call to endLayout() to reduce memory consumption. If you however want to draw the laid out text directly afterwards enabling caching might speed up drawing significantly.
Definition at line 590 of file qtextlayout.cpp.
Referenced by QPainterPath::addText(), QTextDocumentLayoutPrivate::drawListItem(), qt_format_text(), and setupTextLayout().
void QTextLayout::setCursorMoveStyle | ( | Qt::CursorMoveStyle | style | ) |
Set the cursor movement style.
If the QTextLayout is backed by a document, you can ignore this and use the option in QTextDocument, this option is for widgets like QLineEdit or custom widgets without a QTextDocument. Default value is Qt::LogicalMoveStyle.
Definition at line 619 of file qtextlayout.cpp.
void QTextLayout::setFlags | ( | int | flags | ) |
Definition at line 987 of file qtextlayout.cpp.
void QTextLayout::setFont | ( | const QFont & | font | ) |
Sets the layout's font to the given font.
The layout is invalidated and must be laid out again.
Definition at line 400 of file qtextlayout.cpp.
Referenced by QCommandLinkButtonPrivate::descriptionHeight(), QStaticTextPrivate::paintText(), QCommonStylePrivate::viewItemDrawText(), and QCommonStylePrivate::viewItemSize().
void QTextLayout::setPosition | ( | const QPointF & | p | ) |
Moves the text layout to point p.
Definition at line 926 of file qtextlayout.cpp.
Referenced by QTextDocumentLayoutPrivate::drawListItem(), QTextDocumentLayoutPrivate::layoutBlock(), and QTextDocumentLayoutPrivate::layoutFlow().
void QTextLayout::setPreeditArea | ( | int | position, |
const QString & | text | ||
) |
Sets the position and text of the area in the layout that is processed before editing occurs.
Definition at line 470 of file qtextlayout.cpp.
Referenced by QTextControlPrivate::inputMethodEvent().
void QTextLayout::setText | ( | const QString & | string | ) |
Sets the layout's text to the given string.
The layout is invalidated and must be laid out again.
Notice that when using this QTextLayout as part of a QTextDocument this method will have no effect.
Definition at line 426 of file qtextlayout.cpp.
Referenced by QStaticTextPrivate::paintText(), QLineControl::updateDisplayText(), QCommonStylePrivate::viewItemDrawText(), and QCommonStylePrivate::viewItemSize().
void QTextLayout::setTextOption | ( | const QTextOption & | option | ) |
Sets the text option structure that controls the layout process to the given option.
Definition at line 449 of file qtextlayout.cpp.
Referenced by QSvgText::draw(), QTextDocumentLayoutPrivate::drawListItem(), QPlainTextDocumentLayout::layoutBlock(), QTextDocumentLayoutPrivate::layoutBlock(), QStaticTextPrivate::paintText(), QLineControl::updateDisplayText(), QCommonStylePrivate::viewItemDrawText(), and QCommonStylePrivate::viewItemSize().
QString QTextLayout::text | ( | ) | const |
Returns the layout's text.
Definition at line 438 of file qtextlayout.cpp.
Referenced by QGraphicsSimpleTextItem::paint(), QLineControl::updateDisplayText(), and QCommonStylePrivate::viewItemDrawText().
QTextOption QTextLayout::textOption | ( | ) | const |
Returns the current text option used to control the layout process.
Definition at line 459 of file qtextlayout.cpp.
Referenced by QSvgText::draw(), and QTextDocumentLayoutPrivate::layoutFlow().
|
friend |
Definition at line 189 of file qtextlayout.h.
|
friend |
Definition at line 188 of file qtextlayout.h.
Definition at line 186 of file qtextlayout.h.
|
friend |
Definition at line 187 of file qtextlayout.h.
|
friend |
Definition at line 8458 of file qpainter.cpp.
|
private |
Definition at line 193 of file qtextlayout.h.