Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 1179

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QTextFrame Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QTextFrame Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QTextFrame class represents a frame in a <a href="qtextdocument.html">QTextDocument</a>. <a href="#details">More...</a></p>

<p>Inherits <a href="qtextobject.html">QTextObject</a>.</p><p>Inherited by <a href="qtexttable.html">QTextTable</a>.</p><h3>Types</h3><ul><li><div class="fn" />class <b><a href="qtextframe-iterator.html">iterator</a></b></li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qtextframe.html#QTextFrame">__init__</a></b> (<i>self</i>, QTextDocument&#160;<i>doc</i>)</li><li><div class="fn" />iterator <b><a href="qtextframe.html#begin">begin</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-QTextFrame <b><a href="qtextframe.html#childFrames">childFrames</a></b> (<i>self</i>)</li><li><div class="fn" />iterator <b><a href="qtextframe.html#end">end</a></b> (<i>self</i>)</li><li><div class="fn" />QTextCursor <b><a href="qtextframe.html#firstCursorPosition">firstCursorPosition</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtextframe.html#firstPosition">firstPosition</a></b> (<i>self</i>)</li><li><div class="fn" />QTextFrameFormat <b><a href="qtextframe.html#frameFormat">frameFormat</a></b> (<i>self</i>)</li><li><div class="fn" />QTextCursor <b><a href="qtextframe.html#lastCursorPosition">lastCursorPosition</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtextframe.html#lastPosition">lastPosition</a></b> (<i>self</i>)</li><li><div class="fn" />QTextFrame <b><a href="qtextframe.html#parentFrame">parentFrame</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextframe.html#setFrameFormat">setFrameFormat</a></b> (<i>self</i>, QTextFrameFormat&#160;<i>aformat</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QTextFrame class represents a frame in a <a href="qtextdocument.html">QTextDocument</a>.</p>
<p>Text frames provide structure for the text in a document. They
are used as generic containers for other document elements. Frames
are usually created by using <a href="qtextcursor.html#insertFrame">QTextCursor.insertFrame</a>().</p>
<p>Frames can be used to create hierarchical structures in rich
text documents. Each document has a root frame (<a href="qtextdocument.html#rootFrame">QTextDocument.rootFrame</a>()), and
each frame beneath the root frame has a parent frame and a
(possibly empty) list of child frames. The parent frame can be
found with <a href="qtextframe.html#parentFrame">parentFrame</a>(),
and the <a href="qtextframe.html#childFrames">childFrames</a>()
function provides a list of child frames.</p>
<p>Each frame contains at least one text block to enable text
cursors to insert new document elements within. As a result, the
<a href="qtextframe-iterator.html">QTextFrame.iterator</a> class
is used to traverse both the blocks and child frames within a given
frame. The first and last child elements in the frame can be found
with <a href="qtextframe.html#begin">begin</a>() and <a href="qtextframe.html#end">end</a>().</p>
<p>A frame also has a format (specified using <a href="qtextframeformat.html">QTextFrameFormat</a>) which can be set with
<a href="qtextobject.html#setFormat">setFormat</a>() and read with
<a href="qtextobject.html#format">format</a>().</p>
<p>Text cursors can be obtained that point to the first and last
valid cursor positions within a frame; use the <a href="qtextframe.html#firstCursorPosition">firstCursorPosition</a>() and
<a href="qtextframe.html#lastCursorPosition">lastCursorPosition</a>()
functions for this. The frame's extent in the document can be found
with <a href="qtextframe.html#firstPosition">firstPosition</a>()
and <a href="qtextframe.html#lastPosition">lastPosition</a>().</p>
<p>You can iterate over a frame's contents using the <a href="qtextframe-iterator.html">QTextFrame.iterator</a> class: this
provides read-only access to its internal list of text blocks and
child frames.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QTextFrame" />QTextFrame.__init__ (<i>self</i>, <a href="qtextdocument.html">QTextDocument</a>&#160;<i>doc</i>)</h3><p>Creates a new empty frame for the text <i>document</i>.</p>


<h3 class="fn"><a name="begin" /><a href="qtextframe-iterator.html">iterator</a> QTextFrame.begin (<i>self</i>)</h3><p>Returns an iterator pointing to the first document element
inside the frame. Please see the document <a href="containers.html#stl-style-iterators">STL-style-Iterators</a> for
more information.</p>
<p><b>See also</b> <a href="qtextframe.html#end">end</a>().</p>


<h3 class="fn"><a name="childFrames" />list-of-QTextFrame QTextFrame.childFrames (<i>self</i>)</h3><p>Returns a (possibly empty) list of the frame's child frames.</p>
<p><b>See also</b> <a href="qtextframe.html#parentFrame">parentFrame</a>().</p>


<h3 class="fn"><a name="end" /><a href="qtextframe-iterator.html">iterator</a> QTextFrame.end (<i>self</i>)</h3><p>Returns an iterator pointing to the position past the last
document element inside the frame. Please see the document <a href="containers.html#stl-style-iterators">STL-Style Iterators</a> for
more information.</p>
<p><b>See also</b> <a href="qtextframe.html#begin">begin</a>().</p>


<h3 class="fn"><a name="firstCursorPosition" /><a href="qtextcursor.html">QTextCursor</a> QTextFrame.firstCursorPosition (<i>self</i>)</h3><p>Returns the first cursor position inside the frame.</p>
<p><b>See also</b> <a href="qtextframe.html#lastCursorPosition">lastCursorPosition</a>(),
<a href="qtextframe.html#firstPosition">firstPosition</a>(), and
<a href="qtextframe.html#lastPosition">lastPosition</a>().</p>


<h3 class="fn"><a name="firstPosition" />int QTextFrame.firstPosition (<i>self</i>)</h3><p>Returns the first document position inside the frame.</p>
<p><b>See also</b> <a href="qtextframe.html#lastPosition">lastPosition</a>(), <a href="qtextframe.html#firstCursorPosition">firstCursorPosition</a>(),
and <a href="qtextframe.html#lastCursorPosition">lastCursorPosition</a>().</p>


<h3 class="fn"><a name="frameFormat" /><a href="qtextframeformat.html">QTextFrameFormat</a> QTextFrame.frameFormat (<i>self</i>)</h3><p>Returns the frame's format.</p>
<p><b>See also</b> <a href="qtextframe.html#setFrameFormat">setFrameFormat</a>().</p>


<h3 class="fn"><a name="lastCursorPosition" /><a href="qtextcursor.html">QTextCursor</a> QTextFrame.lastCursorPosition (<i>self</i>)</h3><p>Returns the last cursor position inside the frame.</p>
<p><b>See also</b> <a href="qtextframe.html#firstCursorPosition">firstCursorPosition</a>(),
<a href="qtextframe.html#firstPosition">firstPosition</a>(), and
<a href="qtextframe.html#lastPosition">lastPosition</a>().</p>


<h3 class="fn"><a name="lastPosition" />int QTextFrame.lastPosition (<i>self</i>)</h3><p>Returns the last document position inside the frame.</p>
<p><b>See also</b> <a href="qtextframe.html#firstPosition">firstPosition</a>(), <a href="qtextframe.html#firstCursorPosition">firstCursorPosition</a>(),
and <a href="qtextframe.html#lastCursorPosition">lastCursorPosition</a>().</p>


<h3 class="fn"><a name="parentFrame" /><a href="qtextframe.html">QTextFrame</a> QTextFrame.parentFrame (<i>self</i>)</h3><p>Returns the frame's parent frame. If the frame is the root frame
of a document, this will return 0.</p>
<p><b>See also</b> <a href="qtextframe.html#childFrames">childFrames</a>() and <a href="qtextdocument.html#rootFrame">QTextDocument.rootFrame</a>().</p>


<h3 class="fn"><a name="setFrameFormat" />QTextFrame.setFrameFormat (<i>self</i>, <a href="qtextframeformat.html">QTextFrameFormat</a>&#160;<i>aformat</i>)</h3><p>Sets the frame's <i>format</i>.</p>
<p><b>See also</b> <a href="qtextframe.html#frameFormat">frameFormat</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>