Skip to content

Commit

Permalink
Document the QTextBlockFormat::headingLevel property
Browse files Browse the repository at this point in the history
Followup to 310daae

Change-Id: Ib0b4330e2201991fa28b297e26edb3a8dd493577
Reviewed-by: Martin Smith <[email protected]>
Reviewed-by: Friedemann Kleint <[email protected]>
  • Loading branch information
ec1oud committed Mar 29, 2018
1 parent 9976a1c commit db7c644
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/gui/text/qtextformat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,8 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &stream, QTextFormat &fmt)
\value LineHeightType
\value BlockNonBreakableLines
\value BlockTrailingHorizontalRulerWidth The width of a horizontal ruler element.
\value HeadingLevel The level of a heading, for example 1 corresponds to an HTML H1 tag; otherwise 0.
This enum value has been added in Qt 5.12.
Character properties
Expand Down Expand Up @@ -2245,6 +2247,34 @@ QList<QTextOption::Tab> QTextBlockFormat::tabPositions() const
*/


/*!
\fn void QTextBlockFormat::setHeadingLevel(int level)
\since 5.12
Sets the paragraph's heading level, where 1 is the highest-level heading
type (usually with the largest possible heading font size), and increasing
values are progressively deeper into the document (and usually with smaller
font sizes). For example when reading an HTML H1 tag, the heading level is
set to 1. Setting the heading level does not automatically change the font
size; however QTextDocumentFragment::fromHtml() sets both the heading level
and the font size simultaneously.
If the paragraph is not a heading, the level should be set to 0 (the default).
\sa headingLevel()
*/


/*!
\fn int QTextBlockFormat::headingLevel() const
\since 5.12
Returns the paragraph's heading level if it is a heading, or 0 if not.
\sa setHeadingLevel()
*/


/*!
\fn void QTextBlockFormat::setLineHeight(qreal height, int heightType)
\since 4.8
Expand Down

0 comments on commit db7c644

Please sign in to comment.