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
|
<?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">  </td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <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#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" />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#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" />Position <b><a href="qtextframeformat.html#position">position</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setBorder">setBorder</a></b> (<i>self</i>, float <i>aborder</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setHeight">setHeight</a></b> (<i>self</i>, float <i>aheight</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setHeight-2">setHeight</a></b> (<i>self</i>, QTextLength <i>aheight</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setMargin">setMargin</a></b> (<i>self</i>, float <i>amargin</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setPadding">setPadding</a></b> (<i>self</i>, float <i>apadding</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setPosition">setPosition</a></b> (<i>self</i>, Position <i>f</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setWidth">setWidth</a></b> (<i>self</i>, QTextLength <i>length</i>)</li><li><div class="fn" /><b><a href="qtextframeformat.html#setWidth-2">setWidth</a></b> (<i>self</i>, float <i>awidth</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 align="center"><img 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>
<p>See also <a href="qtextframe.html">QTextFrame</a> and <a href="qtextblockformat.html">QTextBlockFormat</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Position-enum" />QTextFrameFormat.Position</h3><table border="1" cellpadding="2" cellspacing="1" width="40%">
<tr>
<th width="60%">Constant</th>
<th width="40%">Value</th>
</tr>
<tr>
<td valign="top"><tt>QTextFrameFormat.InFlow</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
</tr>
<tr>
<td valign="top"><tt>QTextFrameFormat.FloatLeft</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
</tr>
<tr>
<td valign="top"><tt>QTextFrameFormat.FloatRight</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
</tr>
</table>
<br />
<br />
<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>See also <a href="qtextframeformat.html#setBorder">setBorder</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>See also <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="margin" />float QTextFrameFormat.margin (<i>self</i>)</h3><p>Returns the width of the frame's external margin in pixels.</p>
<p>See also <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>See also <a href="qtextframeformat.html#setPadding">setPadding</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>See also <a href="qtextframeformat.html#setPosition">setPosition</a>().</p>
<h3 class="fn"><a name="setBorder" />QTextFrameFormat.setBorder (<i>self</i>, float <i>aborder</i>)</h3><p>Sets the <i>width</i> (in pixels) of the frame's border.</p>
<p>See also <a href="qtextframeformat.html#border">border</a>().</p>
<h3 class="fn"><a name="setHeight" />QTextFrameFormat.setHeight (<i>self</i>, float <i>aheight</i>)</h3><p>Sets the frame's <i>height</i>.</p>
<p>See also <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> <i>aheight</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>Sets the frame's <i>height</i>.</p>
<h3 class="fn"><a name="setMargin" />QTextFrameFormat.setMargin (<i>self</i>, float <i>amargin</i>)</h3><p>Sets the frame's <i>margin</i> in pixels.</p>
<p>See also <a href="qtextframeformat.html#margin">margin</a>().</p>
<h3 class="fn"><a name="setPadding" />QTextFrameFormat.setPadding (<i>self</i>, float <i>apadding</i>)</h3><p>Sets the <i>width</i> of the frame's internal padding in pixels.</p>
<p>See also <a href="qtextframeformat.html#padding">padding</a>().</p>
<h3 class="fn"><a name="setPosition" />QTextFrameFormat.setPosition (<i>self</i>, <a href="qtextframeformat.html#Position-enum">Position</a> <i>f</i>)</h3><p>Sets the <i>policy</i> for positioning frames with this frame format.</p>
<p>See also <a href="qtextframeformat.html#position">position</a>().</p>
<h3 class="fn"><a name="setWidth" />QTextFrameFormat.setWidth (<i>self</i>, <a href="qtextlength.html">QTextLength</a> <i>length</i>)</h3><p>Sets the frame's border rectangle's <i>width</i>.</p>
<p>See also <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 <i>awidth</i>)</h3><p>This is an overloaded member function, provided for convenience.</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="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>See also <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 width="25%">PyQt 4.0.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.trolltech.com">Trolltech AS</a> 2006</td><td align="right" width="25%">Qt 4.1.4</td></tr></table></div></address></body></html>
|