Home · All Namespaces · All Classes · Main Classes · Grouped Classes · Modules · Functions

QTextListFormat Class Reference
[QtGui module]

The QTextListFormat class provides formatting information for lists in a QTextDocument. More...

 #include <QTextListFormat>

Inherits QTextFormat.

Note: All the functions in this class are reentrant.

Public Types

Public Functions


Detailed Description

The QTextListFormat class provides formatting information for lists in a QTextDocument.

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.

See also QTextList.


Member Type Documentation

enum QTextListFormat::Style

This enum describes the symbols used to decorate list items:

ConstantValueDescription
QTextListFormat::ListDisc-1a filled circle
QTextListFormat::ListCircle-2an empty circle
QTextListFormat::ListSquare-3a filled square
QTextListFormat::ListDecimal-4decimal values in ascending order
QTextListFormat::ListLowerAlpha-5lower case Latin characters in alphabetical order
QTextListFormat::ListUpperAlpha-6upper case Latin characters in alphabetical order


Member Function Documentation

QTextListFormat::QTextListFormat ()

Constructs a new list format object.

int QTextListFormat::indent () const

Returns the list format's indentation. The indentation is multiplied by the QTextDocument::indentWidth property to get the effective indent in pixels.

See also setIndent().

bool QTextListFormat::isValid () const

Returns true if this list format is valid; otherwise returns false.

void QTextListFormat::setIndent ( int indentation )

Sets the list format's indentation. The indentation is multiplied by the QTextDocument::indentWidth property to get the effective indent in pixels.

See also indent().

void QTextListFormat::setStyle ( Style style )

Sets the list format's style. See Style for the available styles.

See also style().

Style QTextListFormat::style () const

Returns the list format's style. See Style.

See also setStyle().


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt 4.5.1