Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8e6051afcdb111a0317a58fb64c2abf5 > files > 5271

qt4-doc-4.6.3-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qtextobject.cpp -->
<head>
  <title>Qt 4.6: QTextFrame Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="//apple_ref/cpp/cl//QTextFrame"></a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">QTextFrame Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
</h1>
<p>The QTextFrame class represents a frame in a <a href="qtextdocument.html">QTextDocument</a>. <a href="#details">More...</a></p>
<pre> #include &lt;QTextFrame&gt;</pre><p>Inherits <a href="qtextobject.html">QTextObject</a>.</p>
<p>Inherited by <a href="qtexttable.html">QTextTable</a>.</p>
<p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<ul>
<li><a href="qtextframe-members.html">List of all members, including inherited members</a></li>
</ul>
<hr />
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><b><a href="qtextframe-iterator.html">iterator</a></b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef </td><td class="memItemRight" valign="bottom"><b><a href="qtextframe.html#Iterator-typedef">Iterator</a></b></td></tr>
</table>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtextframe.html#QTextFrame">QTextFrame</a></b> ( QTextDocument * <i>document</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtextframe.html#dtor.QTextFrame">~QTextFrame</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">iterator </td><td class="memItemRight" valign="bottom"><b><a href="qtextframe.html#begin">begin</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QList&lt;QTextFrame *&gt; </td><td class="memItemRight" valign="bottom"><b><a href="qtextframe.html#childFrames">childFrames</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">iterator </td><td class="memItemRight" valign="bottom"><b><a href="qtextframe.html#end">end</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QTextCursor </td><td class="memItemRight" valign="bottom"><b><a href="qtextframe.html#firstCursorPosition">firstCursorPosition</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qtextframe.html#firstPosition">firstPosition</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QTextFrameFormat </td><td class="memItemRight" valign="bottom"><b><a href="qtextframe.html#frameFormat">frameFormat</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QTextCursor </td><td class="memItemRight" valign="bottom"><b><a href="qtextframe.html#lastCursorPosition">lastCursorPosition</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qtextframe.html#lastPosition">lastPosition</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QTextFrame * </td><td class="memItemRight" valign="bottom"><b><a href="qtextframe.html#parentFrame">parentFrame</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtextframe.html#setFrameFormat">setFrameFormat</a></b> ( const QTextFrameFormat &amp; <i>format</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>4 public functions inherited from <a href="qtextobject.html#public-functions">QTextObject</a></li>
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li><div class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li><div class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
<li><div class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"></div>1 protected function inherited from <a href="qtextobject.html#protected-functions">QTextObject</a></li>
<li><div class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<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>
<p>See also <a href="qtextcursor.html">QTextCursor</a> and <a href="qtextdocument.html">QTextDocument</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<a name="//apple_ref/cpp/tdef/QTextFrame/Iterator"></a>
<h3 class="fn"><a name="Iterator-typedef"></a>typedef QTextFrame::Iterator</h3>
<p>Qt-style synonym for <a href="qtextframe-iterator.html">QTextFrame::iterator</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<a name="//apple_ref/cpp/instm/QTextFrame/QTextFrame"></a>
<h3 class="fn"><a name="QTextFrame"></a>QTextFrame::QTextFrame ( <a href="qtextdocument.html">QTextDocument</a> * <i>document</i> )</h3>
<p>Creates a new empty frame for the text <i>document</i>.</p>
<a name="//apple_ref/cpp/instm/QTextFrame/~QTextFrame"></a>
<h3 class="fn"><a name="dtor.QTextFrame"></a>QTextFrame::~QTextFrame ()</h3>
<p>Destroys the frame, and removes it from the document's layout.</p>
<a name="//apple_ref/cpp/instm/QTextFrame/begin"></a>
<h3 class="fn"><a name="begin"></a><a href="qtextframe-iterator.html">iterator</a> QTextFrame::begin () const</h3>
<p>Returns an iterator pointing to the first document element inside the frame.</p>
<p>See also <a href="qtextframe.html#end">end</a>().</p>
<a name="//apple_ref/cpp/instm/QTextFrame/childFrames"></a>
<h3 class="fn"><a name="childFrames"></a><a href="qlist.html">QList</a>&lt;QTextFrame *&gt; QTextFrame::childFrames () const</h3>
<p>Returns a (possibly empty) list of the frame's child frames.</p>
<p>See also <a href="qtextframe.html#parentFrame">parentFrame</a>().</p>
<a name="//apple_ref/cpp/instm/QTextFrame/end"></a>
<h3 class="fn"><a name="end"></a><a href="qtextframe-iterator.html">iterator</a> QTextFrame::end () const</h3>
<p>Returns an iterator pointing to the last document element inside the frame.</p>
<p>See also <a href="qtextframe.html#begin">begin</a>().</p>
<a name="//apple_ref/cpp/instm/QTextFrame/firstCursorPosition"></a>
<h3 class="fn"><a name="firstCursorPosition"></a><a href="qtextcursor.html">QTextCursor</a> QTextFrame::firstCursorPosition () const</h3>
<p>Returns the first cursor position inside the frame.</p>
<p>See also <a href="qtextframe.html#lastCursorPosition">lastCursorPosition</a>(), <a href="qtextframe.html#firstPosition">firstPosition</a>(), and <a href="qtextframe.html#lastPosition">lastPosition</a>().</p>
<a name="//apple_ref/cpp/instm/QTextFrame/firstPosition"></a>
<h3 class="fn"><a name="firstPosition"></a>int QTextFrame::firstPosition () const</h3>
<p>Returns the first document position inside the frame.</p>
<p>See also <a href="qtextframe.html#lastPosition">lastPosition</a>(), <a href="qtextframe.html#firstCursorPosition">firstCursorPosition</a>(), and <a href="qtextframe.html#lastCursorPosition">lastCursorPosition</a>().</p>
<a name="//apple_ref/cpp/instm/QTextFrame/frameFormat"></a>
<h3 class="fn"><a name="frameFormat"></a><a href="qtextframeformat.html">QTextFrameFormat</a> QTextFrame::frameFormat () const</h3>
<p>Returns the frame's format.</p>
<p>See also <a href="qtextframe.html#setFrameFormat">setFrameFormat</a>().</p>
<a name="//apple_ref/cpp/instm/QTextFrame/lastCursorPosition"></a>
<h3 class="fn"><a name="lastCursorPosition"></a><a href="qtextcursor.html">QTextCursor</a> QTextFrame::lastCursorPosition () const</h3>
<p>Returns the last cursor position inside the frame.</p>
<p>See also <a href="qtextframe.html#firstCursorPosition">firstCursorPosition</a>(), <a href="qtextframe.html#firstPosition">firstPosition</a>(), and <a href="qtextframe.html#lastPosition">lastPosition</a>().</p>
<a name="//apple_ref/cpp/instm/QTextFrame/lastPosition"></a>
<h3 class="fn"><a name="lastPosition"></a>int QTextFrame::lastPosition () const</h3>
<p>Returns the last document position inside the frame.</p>
<p>See also <a href="qtextframe.html#firstPosition">firstPosition</a>(), <a href="qtextframe.html#firstCursorPosition">firstCursorPosition</a>(), and <a href="qtextframe.html#lastCursorPosition">lastCursorPosition</a>().</p>
<a name="//apple_ref/cpp/instm/QTextFrame/parentFrame"></a>
<h3 class="fn"><a name="parentFrame"></a>QTextFrame * QTextFrame::parentFrame () const</h3>
<p>Returns the frame's parent frame. If the frame is the root frame of a document, this will return 0.</p>
<p>See also <a href="qtextframe.html#childFrames">childFrames</a>() and <a href="qtextdocument.html#rootFrame">QTextDocument::rootFrame</a>().</p>
<a name="//apple_ref/cpp/instm/QTextFrame/setFrameFormat"></a>
<h3 class="fn"><a name="setFrameFormat"></a>void QTextFrame::setFrameFormat ( const <a href="qtextframeformat.html">QTextFrameFormat</a> &amp; <i>format</i> )</h3>
<p>Sets the frame's <i>format</i>.</p>
<p>See also <a href="qtextframe.html#frameFormat">frameFormat</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.3</div></td>
</tr></table></div></address></body>
</html>