diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-03-28 16:43:49 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-03-29 08:26:53 +0000 |
commit | db7c644cd634cce3b309fb63978f466456e0f559 (patch) | |
tree | d98756feb3136d17fcb1e9c40d07a86373b9d3e1 /src/gui/text/qtextformat.cpp | |
parent | 9976a1c76d5f93d2f2bbb43a5a2ed427bcd5bac8 (diff) |
Document the QTextBlockFormat::headingLevel property
Followup to 310daae53926628f80c08e4415b94b90ad525c8f
Change-Id: Ib0b4330e2201991fa28b297e26edb3a8dd493577
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui/text/qtextformat.cpp')
-rw-r--r-- | src/gui/text/qtextformat.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp index b3f4800787..749a287941 100644 --- a/src/gui/text/qtextformat.cpp +++ b/src/gui/text/qtextformat.cpp @@ -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 @@ -2246,6 +2248,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 |