<class name="QTextObject" doc="/** <p>The <a href="QTextObject.html#QTextObject(com.trolltech.qt.gui.QTextDocument)"><tt>QTextObject</tt></a> class is a base class for different kinds of objects that can group parts of a <a href="QTextDocument.html"><tt>QTextDocument</tt></a> together.</p> <p>The common grouping text objects are lists (<a href="QTextList.html"><tt>QTextList</tt></a>), frames (<a href="QTextFrame.html"><tt>QTextFrame</tt></a>), and tables (<a href="QTextTable.html"><tt>QTextTable</tt></a>). A text object has an associated <a href="QTextObject.html#format()"><tt>format</tt></a> and <a href="QTextObject.html#document()"><tt>document</tt></a>.</p> <p>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 <a href="QTextBlockGroup.html"><tt>QTextBlockGroup</tt></a>, and the second kind from <a href="QTextFrame.html"><tt>QTextFrame</tt></a>.</p> <p>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.</p> @see <a href="QTextDocument.html"><tt>QTextDocument</tt></a> */"> <method name="protected QTextObject(com.trolltech.qt.gui.QTextDocument doc)" doc="/** <p>Creates a new <a href="QTextObject.html#QTextObject(com.trolltech.qt.gui.QTextDocument)"><tt>QTextObject</tt></a> for the given <tt>doc</tt>.</p> <p><b>Warning:</b> This function should never be called directly, but only from QTextDocument::createObject().</p> */"/> <method name="public final com.trolltech.qt.gui.QTextDocument document()" doc="/** <p>Returns the document this object belongs to.</p> @see <a href="QTextObject.html#format()"><tt>format</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QTextFormat format()" doc="/** <p>Returns the text object's format.</p> @see <a href="QTextObject.html#setFormat(com.trolltech.qt.gui.QTextFormat)"><tt>setFormat</tt></a> @see <a href="QTextObject.html#document()"><tt>document</tt></a> */"/> <method name="public final int formatIndex()" doc="/** <p>Returns the index of the object's format in the document's internal list of formats.</p> @see <tt>QTextDocument::object</tt> */"/> <method name="public final int objectIndex()" doc="/** <p>Returns the object index of this object. This can be used together with QTextFormat::setObjectIndex().</p> */"/> <method name="protected final void setFormat(com.trolltech.qt.gui.QTextFormat format)" doc="/** <p>Sets the text object's <tt>format</tt>.</p> @see <a href="QTextObject.html#format()"><tt>format</tt></a> */"/> </class>