From c85e6dc99865c591167dd5a9dc2900247064cee6 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 10 May 2019 22:59:03 +0200 Subject: Add documentation for the QTextBlockFormat::marker property Amends 65314b6ce88cdbb28a22be0cab9856ec9bc9604b. Change-Id: I8f69030accb948055b0081f8a4f1daafbac824ce Reviewed-by: Paul Wicking --- src/gui/text/qtextformat.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'src/gui/text') 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 @@ -2337,6 +2337,50 @@ QList 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 -- cgit v1.2.3