QtBase
v6.3.1
|
The QTextListFormat class provides formatting information for lists in a QTextDocument. \inmodule QtGui. More...
#include <qtextformat.h>
Protected Member Functions | |
QTextListFormat (const QTextFormat &fmt) | |
Friends | |
class | QTextFormat |
The QTextListFormat class provides formatting information for lists in a QTextDocument. \inmodule QtGui.
\reentrant
A list is composed of one or more items, represented as text blocks. The list's format specifies the appearance of items in the list. In particular, it determines the indentation and the style of each item.
The indentation of the items is an integer value that causes each item to be offset from the left margin by a certain amount. This value is read with indent() and set with setIndent().
The style used to decorate each item is set with setStyle() and can be read with the style() function. The style controls the type of bullet points and numbering scheme used for items in the list. Note that lists that use the decimal numbering scheme begin counting at 1 rather than 0.
Style properties can be set to further configure the appearance of list items; for example, the ListNumberPrefix and ListNumberSuffix properties can be used to customize the numbers used in an ordered list so that they appear as (1), (2), (3), etc.:
Definition at line 756 of file qtextformat.h.
This enum describes the symbols used to decorate list items:
\value ListDisc a filled circle \value ListCircle an empty circle \value ListSquare a filled square \value ListDecimal decimal values in ascending order \value ListLowerAlpha lower case Latin characters in alphabetical order \value ListUpperAlpha upper case Latin characters in alphabetical order \value ListLowerRoman lower case roman numerals (supports up to 4999 items only) \value ListUpperRoman upper case roman numerals (supports up to 4999 items only) \omitvalue ListStyleUndefined
Enumerator | |
---|---|
ListDisc | |
ListCircle | |
ListSquare | |
ListDecimal | |
ListLowerAlpha | |
ListUpperAlpha | |
ListLowerRoman | |
ListUpperRoman | |
ListStyleUndefined |
Definition at line 763 of file qtextformat.h.
QTextListFormat::QTextListFormat | ( | ) |
Constructs a new list format object.
Definition at line 2681 of file qtextformat.cpp.
|
explicitprotected |
Definition at line 2694 of file qtextformat.cpp.
|
inline |
Returns the list format's indentation. The indentation is multiplied by the QTextDocument::indentWidth property to get the effective indent in pixels.
Definition at line 780 of file qtextformat.h.
|
inline |
Returns true
if this list format is valid; otherwise returns false
.
Definition at line 761 of file qtextformat.h.
|
inline |
Returns the list format's number prefix.
Definition at line 784 of file qtextformat.h.
|
inline |
Returns the list format's number suffix.
Definition at line 788 of file qtextformat.h.
|
inline |
Sets the list format's indentation. The indentation is multiplied by the QTextDocument::indentWidth property to get the effective indent in pixels.
Definition at line 801 of file qtextformat.h.
Sets the list format's number prefix to the string specified by numberPrefix. This can be used with all sorted list types. It does not have any effect on unsorted list types.
The default prefix is an empty string.
Definition at line 804 of file qtextformat.h.
Sets the list format's number suffix to the string specified by numberSuffix. This can be used with all sorted list types. It does not have any effect on unsorted list types.
The default suffix is ".".
Definition at line 807 of file qtextformat.h.
Sets the list format's style.
Definition at line 798 of file qtextformat.h.
|
inline |
Returns the list format's style.
Definition at line 776 of file qtextformat.h.
|
friend |
Definition at line 793 of file qtextformat.h.