QTextListFormat Class ReferenceThe QTextListFormat class provides formatting information for lists in a QTextDocument. Далее... #include <QTextListFormat> Inherits: QTextFormat. Замечание: Все функции в этом классе реентерабельны. Открытые типы
Открытые функции
Подробное описание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. 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.: QTextListFormat listFormat; listFormat.setStyle(QTextListFormat::ListDecimal); listFormat.setNumberPrefix("("); listFormat.setNumberSuffix(")"); cursor.insertList(listFormat); See also QTextList. Описание типов-членовenum QTextListFormat::StyleThis enum describes the symbols used to decorate list items:
Описание функций-членовQTextListFormat::QTextListFormat ()Constructs a new list format object. int QTextListFormat::indent () constReturns 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 () constReturns true if this list format is valid; otherwise returns false. QString QTextListFormat::numberPrefix () constReturns the list format's number prefix. Эта функция была введена в Qt 4.8. See also setNumberPrefix(). QString QTextListFormat::numberSuffix () constReturns the list format's number suffix. Эта функция была введена в Qt 4.8. See also setNumberSuffix(). 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::setNumberPrefix ( const QString & numberPrefix )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. Эта функция была введена в Qt 4.8. See also numberPrefix(). void QTextListFormat::setNumberSuffix ( const QString & numberSuffix )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 ".". Эта функция была введена в Qt 4.8. See also numberSuffix(). void QTextListFormat::setStyle ( Style style )Sets the list format's style. Style QTextListFormat::style () constReturns the list format's style. |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |