~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qtextframe.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/text/qtextobject.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QTextFrame Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<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="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QTextFrame Class Reference</h1>
 
21
<p>The QTextFrame class represents a frame in a <a href="qtextdocument.html">QTextDocument</a>. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QTextFrame&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<p>Inherits <a href="qtextobject.html">QTextObject</a>.</p>
 
24
<p>Inherited by <a href="qtexttable.html">QTextTable</a>.</p>
 
25
<ul>
 
26
<li><a href="qtextframe-members.html">List of all members, including inherited members</a></li>
 
27
</ul>
 
28
<a name="public-types"></a>
 
29
<h3>Public Types</h3>
 
30
<ul>
 
31
<li><div class="fn"/>class <b><a href="qtextframe-iterator.html">iterator</a></b></li>
 
32
<li><div class="fn"/>typedef <b><a href="qtextframe.html#Iterator-typedef">Iterator</a></b></li>
 
33
</ul>
 
34
<a name="public-functions"></a>
 
35
<h3>Public Functions</h3>
 
36
<ul>
 
37
<li><div class="fn"/><b><a href="qtextframe.html#QTextFrame">QTextFrame</a></b> ( QTextDocument * <i>document</i> )</li>
 
38
<li><div class="fn"/><b><a href="qtextframe.html#dtor.QTextFrame">~QTextFrame</a></b> ()</li>
 
39
<li><div class="fn"/>iterator <b><a href="qtextframe.html#begin">begin</a></b> () const</li>
 
40
<li><div class="fn"/>QList&lt;QTextFrame *&gt; <b><a href="qtextframe.html#childFrames">childFrames</a></b> () const</li>
 
41
<li><div class="fn"/>iterator <b><a href="qtextframe.html#end">end</a></b> () const</li>
 
42
<li><div class="fn"/>QTextCursor <b><a href="qtextframe.html#firstCursorPosition">firstCursorPosition</a></b> () const</li>
 
43
<li><div class="fn"/>int <b><a href="qtextframe.html#firstPosition">firstPosition</a></b> () const</li>
 
44
<li><div class="fn"/>QTextFrameFormat <b><a href="qtextframe.html#frameFormat">frameFormat</a></b> () const</li>
 
45
<li><div class="fn"/>QTextCursor <b><a href="qtextframe.html#lastCursorPosition">lastCursorPosition</a></b> () const</li>
 
46
<li><div class="fn"/>int <b><a href="qtextframe.html#lastPosition">lastPosition</a></b> () const</li>
 
47
<li><div class="fn"/>QTextFrame * <b><a href="qtextframe.html#parentFrame">parentFrame</a></b> () const</li>
 
48
<li><div class="fn"/>void <b><a href="qtextframe.html#setFrameFormat">setFrameFormat</a></b> ( const QTextFrameFormat &amp; <i>format</i> )</li>
 
49
</ul>
 
50
<ul>
 
51
<li><div class="fn"/>4 public functions inherited from <a href="qtextobject.html#public-functions">QTextObject</a></li>
 
52
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
53
</ul>
 
54
<h3>Additional Inherited Members</h3>
 
55
<ul>
 
56
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
57
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
58
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
59
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
60
<li><div class="fn"/>1 protected function inherited from <a href="qtextobject.html#protected-functions">QTextObject</a></li>
 
61
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
62
</ul>
 
63
<a name="details"></a>
 
64
<hr />
 
65
<h2>Detailed Description</h2>
 
66
<p>The QTextFrame class represents a frame in a <a href="qtextdocument.html">QTextDocument</a>.</p>
 
67
<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>
 
68
<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>
 
69
<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>
 
70
<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>
 
71
<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>
 
72
<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>
 
73
<p>See also <a href="qtextcursor.html">QTextCursor</a> and <a href="qtextdocument.html">QTextDocument</a>.</p>
 
74
<hr />
 
75
<h2>Member Type Documentation</h2>
 
76
<h3 class="fn"><a name="Iterator-typedef"></a>typedef QTextFrame::Iterator</h3>
 
77
<p>Qt-style synonym for <a href="qtextframe-iterator.html">QTextFrame::iterator</a>.</p>
 
78
<hr />
 
79
<h2>Member Function Documentation</h2>
 
80
<h3 class="fn"><a name="QTextFrame"></a>QTextFrame::QTextFrame ( <a href="qtextdocument.html">QTextDocument</a> * <i>document</i> )</h3>
 
81
<p>Creates a new empty frame for the text <i>document</i>.</p>
 
82
<h3 class="fn"><a name="dtor.QTextFrame"></a>QTextFrame::~QTextFrame ()</h3>
 
83
<p>Destroys the frame, and removes it from the document's layout.</p>
 
84
<h3 class="fn"><a name="begin"></a><a href="qtextframe-iterator.html">iterator</a> QTextFrame::begin () const</h3>
 
85
<p>Returns an iterator pointing to the first document element inside the frame.</p>
 
86
<p>See also <a href="qtextframe.html#end">end</a>().</p>
 
87
<h3 class="fn"><a name="childFrames"></a><a href="qlist.html">QList</a>&lt;QTextFrame *&gt; QTextFrame::childFrames () const</h3>
 
88
<p>Returns a (possibly empty) list of the frame's child frames.</p>
 
89
<p>See also <a href="qtextframe.html#parentFrame">parentFrame</a>().</p>
 
90
<h3 class="fn"><a name="end"></a><a href="qtextframe-iterator.html">iterator</a> QTextFrame::end () const</h3>
 
91
<p>Returns an iterator pointing to the last document element inside the frame.</p>
 
92
<p>See also <a href="qtextframe.html#begin">begin</a>().</p>
 
93
<h3 class="fn"><a name="firstCursorPosition"></a><a href="qtextcursor.html">QTextCursor</a> QTextFrame::firstCursorPosition () const</h3>
 
94
<p>Returns the first cursor position inside the frame.</p>
 
95
<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>
 
96
<h3 class="fn"><a name="firstPosition"></a>int QTextFrame::firstPosition () const</h3>
 
97
<p>Returns the first document position inside the frame.</p>
 
98
<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>
 
99
<h3 class="fn"><a name="frameFormat"></a><a href="qtextframeformat.html">QTextFrameFormat</a> QTextFrame::frameFormat () const</h3>
 
100
<p>Returns the frame's format.</p>
 
101
<p>See also <a href="qtextframe.html#setFrameFormat">setFrameFormat</a>().</p>
 
102
<h3 class="fn"><a name="lastCursorPosition"></a><a href="qtextcursor.html">QTextCursor</a> QTextFrame::lastCursorPosition () const</h3>
 
103
<p>Returns the last cursor position inside the frame.</p>
 
104
<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>
 
105
<h3 class="fn"><a name="lastPosition"></a>int QTextFrame::lastPosition () const</h3>
 
106
<p>Returns the last document position inside the frame.</p>
 
107
<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>
 
108
<h3 class="fn"><a name="parentFrame"></a>QTextFrame * QTextFrame::parentFrame () const</h3>
 
109
<p>Returns the frame's parent frame. If the frame is the root frame of a document, this will return 0.</p>
 
110
<p>See also <a href="qtextframe.html#childFrames">childFrames</a>() and <a href="qtextdocument.html#rootFrame">QTextDocument::rootFrame</a>().</p>
 
111
<h3 class="fn"><a name="setFrameFormat"></a>void QTextFrame::setFrameFormat ( const <a href="qtextframeformat.html">QTextFrameFormat</a> &amp; <i>format</i> )</h3>
 
112
<p>Sets the frame's <i>format</i>.</p>
 
113
<p>See also <a href="qtextframe.html#frameFormat">frameFormat</a>().</p>
 
114
<p /><address><hr /><div align="center">
 
115
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
116
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
117
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
118
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
119
</tr></table></div></address></body>
 
120
</html>