diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-05-10 22:59:03 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-05-23 10:29:04 +0000 |
commit | c85e6dc99865c591167dd5a9dc2900247064cee6 (patch) | |
tree | 3924f4f4711aff524122f5d4a17e69f29ebac83f /src/gui/text/qtextformat.cpp | |
parent | 28b06fc1a7a4e175c2b802bae518c6dd2305309b (diff) |
Add documentation for the QTextBlockFormat::marker property
Amends 65314b6ce88cdbb28a22be0cab9856ec9bc9604b.
Change-Id: I8f69030accb948055b0081f8a4f1daafbac824ce
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/gui/text/qtextformat.cpp')
-rw-r--r-- | src/gui/text/qtextformat.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp index ca8689c4f4..895b9034e0 100644 --- a/src/gui/text/qtextformat.cpp +++ b/src/gui/text/qtextformat.cpp @@ -2338,6 +2338,50 @@ QList<QTextOption::Tab> QTextBlockFormat::tabPositions() const /*! + \fn void QTextBlockFormat::setMarker(MarkerType marker) + \since 5.14 + + Sets the type of adornment that should be rendered alongside the paragraph to \a marker. + For example, a list item can be adorned with a checkbox, either checked + or unchecked, as a replacement for its bullet. The default is \c NoMarker. + + \sa marker() +*/ + + +/*! + \fn MarkerType QTextBlockFormat::marker() const + \since 5.14 + + Returns the paragraph's marker if one has been set, or \c NoMarker if not. + + \sa setMarker() +*/ + + +/*! + \since 5.14 + \enum QTextBlockFormat::MarkerType + + This enum describes the types of markers a list item can have. + If a list item (a paragraph for which \l QTextBlock::textList() returns the list) + has a marker, it is rendered instead of the normal bullet. + In this way, checkable list items can be mixed with plain list items in the + same list, overriding the type of bullet specified by the + \l QTextListFormat::style() for the entire list. + + \value NoMarker This is the default: the list item's bullet will be shown. + \value Unchecked Instead of the list item's bullet, an unchecked checkbox will be shown. + \value Checked Instead of the list item's bullet, a checked checkbox will be shown. + + In the future, this may be extended to specify other types of paragraph + decorations. + + \sa QTextListFormat::style() +*/ + + +/*! \fn void QTextBlockFormat::setLineHeight(qreal height, int heightType) \since 4.8 |