Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

QTextList Class Reference

The QTextList class provides a list in a QTextDocument. More...

#include <QTextList>

Inherits QTextBlockGroup.

List of all members.

Writable Properties

Public Functions

Public Slots

Signals

Static Public Members

Protected Functions


Detailed Description

The QTextList class provides a list in a QTextDocument.

Lists can be created by QTextCursor::createList() and queried with QTextCursor::currentList().

The number of items in a list is given by count(). A cursor positioned at a given list item is returned by item(), and the text of a given list item is returned by itemText(). A list item can be deleted with removeItem(). The list's format is set with setFormat().


Member Function Documentation

int QTextList::count () const

Returns the number of items in the list.

See also isEmpty().

QTextListFormat QTextList::format () const

Returns the list's format.

bool QTextList::isEmpty () const

Returns true if the list has no items; otherwise returns false.

See also count().

QTextBlock QTextList::item ( int i ) const

Returns a QTextCursor positioned at the i-th item in the list.

See also count(), item(), and itemText().

int QTextList::itemNumber ( const QTextBlock & blockIt ) const

Returns the index of the list item at cursor position blockIt.

QString QTextList::itemText ( const QTextBlock & blockIt ) const

Returns the text of the list item at cursor position blockIt.

void QTextList::remove ( const QTextBlock & block )

Removes the block block from the list.

void QTextList::removeItem ( int i )

Removes the item at item position i from the list.

void QTextList::setFormat ( const QTextListFormat & format )

Sets the list's format to format.


Copyright © 2004 Trolltech. Trademarks
Qt 4.0.0-tp1