Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions | ![]() |
The QTextFrame class represents a frame in a QTextDocument. More...
#include <QTextFrame>
Inherits QTextObject.
Inherited by QTextTable.
The QTextFrame class represents a frame in a QTextDocument.
Text frames provide structure for the text in a document.
Each frame in a document consists of a frame start character, QChar(0xFDD0), followed by the frame's contents, followed by a frame end character, QChar(0xFDD1). The character formats of the start and end character contain a reference to the frame object's objectIndex.
Frames can be used to create hierarchical documents. Each document has a root frame (QTextDocument::rootFrame()), and each frame (except for the root frame), has a parentFrame() and a (possibly empty) list of child frames. In addition to containing childFrames(), a frame can also contain QTextBlocks. A frame also has a format (setFormat(), format()). The positions in a frame are available from firstCursorPosition() and lastCursorPosition(), and the frame's position in the document from firstPosition() and lastPosition().
Frames are usually created using QTextCursor::insertFrame().
You can iterate over frame's contents using the QTextFrame::iterator class: this provides read-only access to a frame's list of blocks and child frames.
See also QTextCursor and QTextDocument.
Qt-style synonym for QTextFrame::iterator.
Creates a new empty frame for the text document.
Destroys this frame and removes it from the document's layout.
Returns an iterator pointing to the first child frame inside this frame.
See also end().
Returns a (possibly empty) list of this frame's child frames.
See also parentFrame().
Returns an iterator pointing to the last child frame inside this frame.
See also begin().
Returns the first cursor position inside the frame.
See also lastCursorPosition(), firstPosition(), and lastPosition().
Returns the first document position inside the frame.
See also lastPosition(), firstCursorPosition(), and lastCursorPosition().
Returns the frame's format.
See also setFormat().
Returns the last cursor position inside the frame.
See also firstCursorPosition(), firstPosition(), and lastPosition().
Returns the last document position inside the frame.
See also firstPosition(), firstCursorPosition(), and lastCursorPosition().
Returns this frame's parent frame (which will be 0 if this frame is the QTextDocument::rootFrame()).
See also childFrames().
Sets the frame's format.
See also format().
Copyright © 2004 Trolltech. | Trademarks | Qt 4.0.0-tp2 |