File: qtextframeformat.html

package info (click to toggle)
python-qt4 4.11.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 40,148 kB
  • ctags: 6,150
  • sloc: python: 125,936; cpp: 12,628; xml: 292; makefile: 259; php: 27; sh: 2
file content (264 lines) | stat: -rw-r--r-- 19,185 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<?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>QTextFrameFormat 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">QTextFrameFormat Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QTextFrameFormat class provides formatting information for
frames in a <a href="qtextdocument.html">QTextDocument</a>.
<a href="#details">More...</a></p>

<p>Inherits <a href="qtextformat.html">QTextFormat</a>.</p><p>Inherited by <a href="qtexttableformat.html">QTextTableFormat</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qtextframeformat.html#BorderStyle-enum">BorderStyle</a></b> { BorderStyle_None, BorderStyle_Dotted, BorderStyle_Dashed, BorderStyle_Solid, ..., BorderStyle_Outset }</li><li><div class="fn" />enum <b><a href="qtextframeformat.html#Position-enum">Position</a></b> { InFlow, FloatLeft, FloatRight }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qtextframeformat.html#QTextFrameFormat">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#QTextFrameFormat-2">__init__</a></b> (<i>self</i>, QTextFrameFormat)</li><li><div class="fn" />float <b><a href="qtextframeformat.html#border">border</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qtextframeformat.html#borderBrush">borderBrush</a></b> (<i>self</i>)</li><li><div class="fn" />BorderStyle <b><a href="qtextframeformat.html#borderStyle">borderStyle</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qtextframeformat.html#bottomMargin">bottomMargin</a></b> (<i>self</i>)</li><li><div class="fn" />QTextLength <b><a href="qtextframeformat.html#height">height</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextframeformat.html#isValid">isValid</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qtextframeformat.html#leftMargin">leftMargin</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qtextframeformat.html#margin">margin</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qtextframeformat.html#padding">padding</a></b> (<i>self</i>)</li><li><div class="fn" />QTextFormat.PageBreakFlags <b><a href="qtextframeformat.html#pageBreakPolicy">pageBreakPolicy</a></b> (<i>self</i>)</li><li><div class="fn" />Position <b><a href="qtextframeformat.html#position">position</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qtextframeformat.html#rightMargin">rightMargin</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setBorder">setBorder</a></b> (<i>self</i>, float&#160;<i>aborder</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setBorderBrush">setBorderBrush</a></b> (<i>self</i>, QBrush&#160;<i>brush</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setBorderStyle">setBorderStyle</a></b> (<i>self</i>, BorderStyle&#160;<i>style</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setBottomMargin">setBottomMargin</a></b> (<i>self</i>, float&#160;<i>amargin</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setHeight">setHeight</a></b> (<i>self</i>, float&#160;<i>aheight</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setHeight-2">setHeight</a></b> (<i>self</i>, QTextLength&#160;<i>aheight</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setLeftMargin">setLeftMargin</a></b> (<i>self</i>, float&#160;<i>amargin</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setMargin">setMargin</a></b> (<i>self</i>, float&#160;<i>amargin</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setPadding">setPadding</a></b> (<i>self</i>, float&#160;<i>apadding</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setPageBreakPolicy">setPageBreakPolicy</a></b> (<i>self</i>, QTextFormat.PageBreakFlags&#160;<i>flags</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setPosition">setPosition</a></b> (<i>self</i>, Position&#160;<i>f</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setRightMargin">setRightMargin</a></b> (<i>self</i>, float&#160;<i>amargin</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setTopMargin">setTopMargin</a></b> (<i>self</i>, float&#160;<i>amargin</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setWidth">setWidth</a></b> (<i>self</i>, QTextLength&#160;<i>length</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setWidth-2">setWidth</a></b> (<i>self</i>, float&#160;<i>awidth</i>)</li><li><div class="fn" />float <b><a href="qtextframeformat.html#topMargin">topMargin</a></b> (<i>self</i>)</li><li><div class="fn" />QTextLength <b><a href="qtextframeformat.html#width">width</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QTextFrameFormat class provides formatting information for
frames in a <a href="qtextdocument.html">QTextDocument</a>.</p>
<p>A text frame groups together one or more blocks of text,
providing a layer of structure larger than the paragraph. The
format of a frame specifies how it is rendered and positioned on
the screen. It does not directly specify the behavior of the text
formatting within, but provides constraints on the layout of its
children.</p>
<p>The frame format defines the <a href="qtextframeformat.html#width">width</a>() and <a href="qtextframeformat.html#height">height</a>() of the frame on the
screen. Each frame can have a <a href="qtextframeformat.html#border">border</a>() that surrounds its
contents with a rectangular box. The border is surrounded by a
<a href="qtextframeformat.html#margin">margin</a>() around the
frame, and the contents of the frame are kept separate from the
border by the frame's <a href="qtextframeformat.html#padding">padding</a>(). This scheme is
similar to the box model used by Cascading Style Sheets for HTML
pages.</p>
<p class="centerAlign"><img alt="" src="images/qtextframe-style.png" /></p>
<p>The <a href="qtextframeformat.html#position">position</a>() of a
frame is set using <a href="qtextframeformat.html#setPosition">setPosition</a>() and
determines how it is located relative to the surrounding text.</p>
<p>The validity of a QTextFrameFormat object can be determined with
the <a href="qtextframeformat.html#isValid">isValid</a>()
function.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="BorderStyle-enum" />QTextFrameFormat.BorderStyle</h3><p>This enum describes different border styles for the text
frame.</p>
<table class="valuelist">
<tr>
<th class="tblConst">Constant</th>
<th class="tblVal">Value</th>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFrameFormat.BorderStyle_None</tt></td>
<td class="topAlign"><tt>0</tt></td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFrameFormat.BorderStyle_Dotted</tt></td>
<td class="topAlign"><tt>1</tt></td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFrameFormat.BorderStyle_Dashed</tt></td>
<td class="topAlign"><tt>2</tt></td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFrameFormat.BorderStyle_Solid</tt></td>
<td class="topAlign"><tt>3</tt></td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFrameFormat.BorderStyle_Double</tt></td>
<td class="topAlign"><tt>4</tt></td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFrameFormat.BorderStyle_DotDash</tt></td>
<td class="topAlign"><tt>5</tt></td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFrameFormat.BorderStyle_DotDotDash</tt></td>
<td class="topAlign"><tt>6</tt></td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFrameFormat.BorderStyle_Groove</tt></td>
<td class="topAlign"><tt>7</tt></td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFrameFormat.BorderStyle_Ridge</tt></td>
<td class="topAlign"><tt>8</tt></td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFrameFormat.BorderStyle_Inset</tt></td>
<td class="topAlign"><tt>9</tt></td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFrameFormat.BorderStyle_Outset</tt></td>
<td class="topAlign"><tt>10</tt></td>
</tr>
</table>
<p>This enum was introduced or modified in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextframeformat.html#borderStyle">borderStyle</a>() and <a href="qtextformat.html#Property-enum">FrameBorderStyle</a>.</p>


<h3 class="fn"><a name="Position-enum" />QTextFrameFormat.Position</h3><p>This enum describes how a frame is located relative to the
surrounding text.</p>
<table class="valuelist">
<tr>
<th class="tblConst">Constant</th>
<th class="tblVal">Value</th>
</tr>
<tr>
<td class="topAlign"><tt>QTextFrameFormat.InFlow</tt></td>
<td class="topAlign"><tt>0</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFrameFormat.FloatLeft</tt></td>
<td class="topAlign"><tt>1</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFrameFormat.FloatRight</tt></td>
<td class="topAlign"><tt>2</tt></td>
</tr>
</table>
<p><b>See also</b> <a href="qtextframeformat.html#position">position</a>() and <a href="qtextformat.html#Property-enum">CssFloat</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QTextFrameFormat" />QTextFrameFormat.__init__ (<i>self</i>)</h3><p>Constructs a text frame format object with the default
properties.</p>


<h3 class="fn"><a name="QTextFrameFormat-2" />QTextFrameFormat.__init__ (<i>self</i>, <a href="qtextframeformat.html">QTextFrameFormat</a>)</h3><h3 class="fn"><a name="border" />float QTextFrameFormat.border (<i>self</i>)</h3><p>Returns the width of the border in pixels.</p>
<p><b>See also</b> <a href="qtextframeformat.html#setBorder">setBorder</a>().</p>


<h3 class="fn"><a name="borderBrush" /><a href="qbrush.html">QBrush</a> QTextFrameFormat.borderBrush (<i>self</i>)</h3><p>Returns the brush used for the frame's border.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextframeformat.html#setBorderBrush">setBorderBrush</a>().</p>


<h3 class="fn"><a name="borderStyle" /><a href="qtextframeformat.html#BorderStyle-enum">BorderStyle</a> QTextFrameFormat.borderStyle (<i>self</i>)</h3><p>Returns the style of the frame's border.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextframeformat.html#setBorderStyle">setBorderStyle</a>().</p>


<h3 class="fn"><a name="bottomMargin" />float QTextFrameFormat.bottomMargin (<i>self</i>)</h3><p>Returns the width of the frame's bottom margin in pixels.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextframeformat.html#setBottomMargin">setBottomMargin</a>().</p>


<h3 class="fn"><a name="height" /><a href="qtextlength.html">QTextLength</a> QTextFrameFormat.height (<i>self</i>)</h3><p>Returns the height of the frame's border rectangle.</p>
<p><b>See also</b> <a href="qtextframeformat.html#setHeight">setHeight</a>().</p>


<h3 class="fn"><a name="isValid" />bool QTextFrameFormat.isValid (<i>self</i>)</h3><p>Returns true if the format description is valid; otherwise
returns false.</p>


<h3 class="fn"><a name="leftMargin" />float QTextFrameFormat.leftMargin (<i>self</i>)</h3><p>Returns the width of the frame's left margin in pixels.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextframeformat.html#setLeftMargin">setLeftMargin</a>().</p>


<h3 class="fn"><a name="margin" />float QTextFrameFormat.margin (<i>self</i>)</h3><p>Returns the width of the frame's external margin in pixels.</p>
<p><b>See also</b> <a href="qtextframeformat.html#setMargin">setMargin</a>().</p>


<h3 class="fn"><a name="padding" />float QTextFrameFormat.padding (<i>self</i>)</h3><p>Returns the width of the frame's internal padding in pixels.</p>
<p><b>See also</b> <a href="qtextframeformat.html#setPadding">setPadding</a>().</p>


<h3 class="fn"><a name="pageBreakPolicy" /><a href="qtextformat-pagebreakflags.html">QTextFormat.PageBreakFlags</a> QTextFrameFormat.pageBreakPolicy (<i>self</i>)</h3><p>Returns the currently set page break policy for the frame/table.
The default is <a href="qtextformat.html#PageBreakFlag-enum">QTextFormat.PageBreak_Auto</a>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qtextframeformat.html#setPageBreakPolicy">setPageBreakPolicy</a>().</p>


<h3 class="fn"><a name="position" /><a href="qtextframeformat.html#Position-enum">Position</a> QTextFrameFormat.position (<i>self</i>)</h3><p>Returns the positioning policy for frames with this frame
format.</p>
<p><b>See also</b> <a href="qtextframeformat.html#setPosition">setPosition</a>().</p>


<h3 class="fn"><a name="rightMargin" />float QTextFrameFormat.rightMargin (<i>self</i>)</h3><p>Returns the width of the frame's right margin in pixels.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextframeformat.html#setRightMargin">setRightMargin</a>().</p>


<h3 class="fn"><a name="setBorder" />QTextFrameFormat.setBorder (<i>self</i>, float&#160;<i>aborder</i>)</h3><p>Sets the <i>width</i> (in pixels) of the frame's border.</p>
<p><b>See also</b> <a href="qtextframeformat.html#border">border</a>().</p>


<h3 class="fn"><a name="setBorderBrush" />QTextFrameFormat.setBorderBrush (<i>self</i>, <a href="qbrush.html">QBrush</a>&#160;<i>brush</i>)</h3><p>Sets the <i>brush</i> used for the frame's border.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextframeformat.html#borderBrush">borderBrush</a>().</p>


<h3 class="fn"><a name="setBorderStyle" />QTextFrameFormat.setBorderStyle (<i>self</i>, <a href="qtextframeformat.html#BorderStyle-enum">BorderStyle</a>&#160;<i>style</i>)</h3><p>Sets the <i>style</i> of the frame's border.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextframeformat.html#borderStyle">borderStyle</a>().</p>


<h3 class="fn"><a name="setBottomMargin" />QTextFrameFormat.setBottomMargin (<i>self</i>, float&#160;<i>amargin</i>)</h3><p>Sets the frame's bottom <i>margin</i> in pixels.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextframeformat.html#bottomMargin">bottomMargin</a>().</p>


<h3 class="fn"><a name="setHeight" />QTextFrameFormat.setHeight (<i>self</i>, float&#160;<i>aheight</i>)</h3><p>Sets the frame's <i>height</i>.</p>
<p><b>See also</b> <a href="qtextframeformat.html#height">height</a>().</p>


<h3 class="fn"><a name="setHeight-2" />QTextFrameFormat.setHeight (<i>self</i>, <a href="qtextlength.html">QTextLength</a>&#160;<i>aheight</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the frame's <i>height</i>.</p>


<h3 class="fn"><a name="setLeftMargin" />QTextFrameFormat.setLeftMargin (<i>self</i>, float&#160;<i>amargin</i>)</h3><p>Sets the frame's left <i>margin</i> in pixels.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextframeformat.html#leftMargin">leftMargin</a>().</p>


<h3 class="fn"><a name="setMargin" />QTextFrameFormat.setMargin (<i>self</i>, float&#160;<i>amargin</i>)</h3><p>Sets the frame's <i>margin</i> in pixels. This method also sets
the left, right, top and bottom margins of the frame to the same
value. The individual margins override the general margin.</p>
<p><b>See also</b> <a href="qtextframeformat.html#margin">margin</a>().</p>


<h3 class="fn"><a name="setPadding" />QTextFrameFormat.setPadding (<i>self</i>, float&#160;<i>apadding</i>)</h3><p>Sets the <i>width</i> of the frame's internal padding in
pixels.</p>
<p><b>See also</b> <a href="qtextframeformat.html#padding">padding</a>().</p>


<h3 class="fn"><a name="setPageBreakPolicy" />QTextFrameFormat.setPageBreakPolicy (<i>self</i>, <a href="qtextformat-pagebreakflags.html">QTextFormat.PageBreakFlags</a>&#160;<i>flags</i>)</h3><p>Sets the page break policy for the frame/table to
<i>policy</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qtextframeformat.html#pageBreakPolicy">pageBreakPolicy</a>().</p>


<h3 class="fn"><a name="setPosition" />QTextFrameFormat.setPosition (<i>self</i>, <a href="qtextframeformat.html#Position-enum">Position</a>&#160;<i>f</i>)</h3><p>Sets the <i>policy</i> for positioning frames with this frame
format.</p>
<p><b>See also</b> <a href="qtextframeformat.html#position">position</a>().</p>


<h3 class="fn"><a name="setRightMargin" />QTextFrameFormat.setRightMargin (<i>self</i>, float&#160;<i>amargin</i>)</h3><p>Sets the frame's right <i>margin</i> in pixels.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextframeformat.html#rightMargin">rightMargin</a>().</p>


<h3 class="fn"><a name="setTopMargin" />QTextFrameFormat.setTopMargin (<i>self</i>, float&#160;<i>amargin</i>)</h3><p>Sets the frame's top <i>margin</i> in pixels.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextframeformat.html#topMargin">topMargin</a>().</p>


<h3 class="fn"><a name="setWidth" />QTextFrameFormat.setWidth (<i>self</i>, <a href="qtextlength.html">QTextLength</a>&#160;<i>length</i>)</h3><p>Sets the frame's border rectangle's <i>width</i>.</p>
<p><b>See also</b> <a href="qtextframeformat.html#width">width</a>() and <a href="qtextlength.html">QTextLength</a>.</p>


<h3 class="fn"><a name="setWidth-2" />QTextFrameFormat.setWidth (<i>self</i>, float&#160;<i>awidth</i>)</h3><p>This is an overloaded function.</p>
<p>Convenience method that sets the width of the frame's border
rectangle's width to the specified fixed <i>width</i>.</p>


<h3 class="fn"><a name="topMargin" />float QTextFrameFormat.topMargin (<i>self</i>)</h3><p>Returns the width of the frame's top margin in pixels.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextframeformat.html#setTopMargin">setTopMargin</a>().</p>


<h3 class="fn"><a name="width" /><a href="qtextlength.html">QTextLength</a> QTextFrameFormat.width (<i>self</i>)</h3><p>Returns the width of the frame's border rectangle.</p>
<p><b>See also</b> <a href="qtextframeformat.html#setWidth">setWidth</a>() and <a href="qtextlength.html">QTextLength</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.11.4 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.qt.io">The Qt Company</a> 2015</td><td align="right" width="25%">Qt&#160;4.8.7</td></tr></table></div></address></body></html>