Qt:Документация 4.3.2/qtextobject

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

QTextObject Class Reference
[модуль QtGui ]

The QTextObject class is a base class for different kinds of objects that can group parts of a QTextDocument together. Далее...

 #include <QTextObject>

Inherits QObject.

Inherited by QTextBlockGroup and QTextFrame.

Открытые функции

  • 29 открытых функций, унаследованных от QObject

Защищенные функции

  • 7 защищенных функций, унаследованных от QObject

Дополнительные унаследованные члены

  • 1 свойство, унаследованное от QObject
  • 1 открытый слот, унаследованный от QObject
  • 1 сигнал, унаследованный от QObject
  • 5 статических открытых членов, унаследованных от QObject

Подробное описание

The QTextObject class is a base class for different kinds of objects that can group parts of a QTextDocument together.

The common grouping text objects are lists ( QTextList), frames ( QTextFrame), and tables ( QTextTable). A text object has an associated format() and document().

There are essentially two kinds of text objects: those that are used with blocks (block formats), and those that are used with characters (character formats). The first kind are derived from QTextBlockGroup, and the second kind from QTextFrame.

You rarely need to use this class directly. When creating custom text objects, you will also need to reimplement QTextDocument::createObject() which acts as a factory method for creating text objects.

See also QTextDocument.


Описание функций-членов

QTextObject::QTextObject ( QTextDocument * document ) [protected]

Creates a new QTextObject for the given document.

Warning: This function should never be called directly, but only from QTextDocument::createObject().

QTextObject::~QTextObject () [protected]

Destroys the text object.

Warning: Text objects are owned by the document, so you should never destroy them yourself.

QTextDocument * QTextObject::document () const

Returns the document this object belongs to.

See also format().

QTextFormat QTextObject::format () const

Returns the text object's format.

See also setFormat() and document().

int QTextObject::formatIndex () const

Returns the index of the object's format in the document's internal list of formats.

See also QTextDocument::object().

int QTextObject::objectIndex () const

Returns the object index of this object. This can be used together with QTextFormat::setObjectIndex().

void QTextObject::setFormat ( const QTextFormat & format ) [protected]

Sets the text object's format.

See also format().



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2