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
|
<?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>QTextOption 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">QTextOption Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QTextOption class provides a description of general rich text properties. <a href="#details">More...</a></p>
<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qtextoption.html#Flag-enum">Flag</a></b> { IncludeTrailingSpaces }</li><li><div class="fn" />class <b><a href="qtextoption-flags.html">Flags</a></b></li><li><div class="fn" />enum <b><a href="qtextoption.html#WrapMode-enum">WrapMode</a></b> { NoWrap, WordWrap, ManualWrap, WrapAnywhere, WrapAtWordBoundaryOrAnywhere }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qtextoption.html#QTextOption">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextoption.html#QTextOption-2">__init__</a></b> (<i>self</i>, Qt.Alignment <i>alignment</i>)</li><li><div class="fn" /><b><a href="qtextoption.html#QTextOption-3">__init__</a></b> (<i>self</i>, QTextOption <i>o</i>)</li><li><div class="fn" />Qt.Alignment <b><a href="qtextoption.html#alignment">alignment</a></b> (<i>self</i>)</li><li><div class="fn" />Flags <b><a href="qtextoption.html#flags">flags</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextoption.html#setAlignment">setAlignment</a></b> (<i>self</i>, Qt.Alignment <i>aalignment</i>)</li><li><div class="fn" /><b><a href="qtextoption.html#setFlags">setFlags</a></b> (<i>self</i>, Flags <i>aflags</i>)</li><li><div class="fn" /><b><a href="qtextoption.html#setTabArray">setTabArray</a></b> (<i>self</i>, float-list <i>tabStops</i>)</li><li><div class="fn" /><b><a href="qtextoption.html#setTabStop">setTabStop</a></b> (<i>self</i>, float <i>atabStop</i>)</li><li><div class="fn" /><b><a href="qtextoption.html#setTextDirection">setTextDirection</a></b> (<i>self</i>, Qt.LayoutDirection <i>aDirection</i>)</li><li><div class="fn" /><b><a href="qtextoption.html#setUseDesignMetrics">setUseDesignMetrics</a></b> (<i>self</i>, bool <i>b</i>)</li><li><div class="fn" /><b><a href="qtextoption.html#setWrapMode">setWrapMode</a></b> (<i>self</i>, WrapMode <i>wrap</i>)</li><li><div class="fn" />float-list <b><a href="qtextoption.html#tabArray">tabArray</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qtextoption.html#tabStop">tabStop</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.LayoutDirection <b><a href="qtextoption.html#textDirection">textDirection</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextoption.html#useDesignMetrics">useDesignMetrics</a></b> (<i>self</i>)</li><li><div class="fn" />WrapMode <b><a href="qtextoption.html#wrapMode">wrapMode</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QTextOption class provides a description of general rich text properties.</p>
<p>QTextOption is used to encapsulate common rich text properties in a single object. It contains information about text alignment, layout direction, word wrapping, and other standard properties associated with text rendering and layout.</p>
<p>See also <a href="qtextedit.html">QTextEdit</a>, <a href="qtextdocument.html">QTextDocument</a>, and <a href="qtextcursor.html">QTextCursor</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Flag-enum" />QTextOption.Flag</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>QTextOption.IncludeTrailingSpaces</tt></td>
<td align="center" valign="top"><tt>0x80000000</tt></td>
</tr>
</table>
<br />
<br />
<p>The Flags type is a typedef for <a href="qflags.html">QFlags</a><Flag>. It stores an OR combination of Flag values.</p>
<h3 class="fn"><a name="WrapMode-enum" />QTextOption.WrapMode</h3><p>This enum describes how text is wrapped in a document.</p>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QTextOption.NoWrap</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top">Text is not wrapped at all.</td>
</tr>
<tr>
<td valign="top"><tt>QTextOption.WordWrap</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top">Text is wrapped at word boundaries.</td>
</tr>
<tr>
<td valign="top"><tt>QTextOption.ManualWrap</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">Wrapping occurs at a manually specified length from the start of the line.</td>
</tr>
<tr>
<td valign="top"><tt>QTextOption.WrapAnywhere</tt></td>
<td align="center" valign="top"><tt>3</tt></td>
<td valign="top">Text can be wrapped at any point on a line, even if it occurs in the middle of a word.</td>
</tr>
<tr>
<td valign="top"><tt>QTextOption.WrapAtWordBoundaryOrAnywhere</tt></td>
<td align="center" valign="top"><tt>4</tt></td>
<td valign="top">If possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.</td>
</tr>
</table>
<br />
<br />
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QTextOption" />QTextOption.__init__ (<i>self</i>)</h3><p>Constructs a text option with default properties for text.</p>
<h3 class="fn"><a name="QTextOption-2" />QTextOption.__init__ (<i>self</i>, <a href="qt-alignment.html">Qt.Alignment</a> <i>alignment</i>)</h3><p>Constructs a text option with the given <i>alignment</i> for text.</p>
<h3 class="fn"><a name="QTextOption-3" />QTextOption.__init__ (<i>self</i>, <a href="qtextoption.html">QTextOption</a> <i>o</i>)</h3><p>Construct a copy of the <i>other</i> text option.</p>
<h3 class="fn"><a name="alignment" /><a href="qt-alignment.html">Qt.Alignment</a> QTextOption.alignment (<i>self</i>)</h3><p>Returns the text alignment defined by the option.</p>
<p>See also <a href="qtextoption.html#setAlignment">setAlignment</a>().</p>
<h3 class="fn"><a name="flags" /><a href="qtextoption-flags.html">Flags</a> QTextOption.flags (<i>self</i>)</h3><p>Returns the flags associated with the option.</p>
<p>See also <a href="qtextoption.html#setFlags">setFlags</a>().</p>
<h3 class="fn"><a name="setAlignment" />QTextOption.setAlignment (<i>self</i>, <a href="qt-alignment.html">Qt.Alignment</a> <i>aalignment</i>)</h3><p>Sets the option's text alignment to the specified <i>alignment</i>.</p>
<p>See also <a href="qtextoption.html#alignment">alignment</a>().</p>
<h3 class="fn"><a name="setFlags" />QTextOption.setFlags (<i>self</i>, <a href="qtextoption-flags.html">Flags</a> <i>aflags</i>)</h3><p>Sets the flags associated with the option to the given <i>flags</i>.</p>
<p>See also <a href="qtextoption.html#flags">flags</a>().</p>
<h3 class="fn"><a name="setTabArray" />QTextOption.setTabArray (<i>self</i>, float-list <i>tabStops</i>)</h3><p>Sets the tab positions for the text layout to those specified by <i>tabStops</i>.</p>
<p>See also <a href="qtextoption.html#tabArray">tabArray</a>() and <a href="qtextoption.html#setTabStop">setTabStop</a>().</p>
<h3 class="fn"><a name="setTabStop" />QTextOption.setTabStop (<i>self</i>, float <i>atabStop</i>)</h3><p>Sets the distance in device units between tab stops to the value specified by <i>tabStop</i>.</p>
<p>See also <a href="qtextoption.html#tabStop">tabStop</a>() and <a href="qtextoption.html#setTabArray">setTabArray</a>().</p>
<h3 class="fn"><a name="setTextDirection" />QTextOption.setTextDirection (<i>self</i>, <a href="qt.html#LayoutDirection-enum">Qt.LayoutDirection</a> <i>aDirection</i>)</h3><p>Sets the direction of the text layout defined by the option to the given <i>direction</i>.</p>
<p>See also <a href="qtextoption.html#textDirection">textDirection</a>().</p>
<h3 class="fn"><a name="setUseDesignMetrics" />QTextOption.setUseDesignMetrics (<i>self</i>, bool <i>b</i>)</h3><p>If <i>enable</i> is true then the layout will use design metrics; otherwise it will use the metrics of the paint device (which is the default behavior).</p>
<p>See also <a href="qtextoption.html#useDesignMetrics">useDesignMetrics</a>().</p>
<h3 class="fn"><a name="setWrapMode" />QTextOption.setWrapMode (<i>self</i>, <a href="qtextoption.html#WrapMode-enum">WrapMode</a> <i>wrap</i>)</h3><p>Sets the option's text wrap mode to the given <i>mode</i>.</p>
<p>See also <a href="qtextoption.html#wrapMode">wrapMode</a>().</p>
<h3 class="fn"><a name="tabArray" />float-list QTextOption.tabArray (<i>self</i>)</h3><p>Returns a list of tab positions defined for the text layout.</p>
<p>See also <a href="qtextoption.html#setTabArray">setTabArray</a>() and <a href="qtextoption.html#tabStop">tabStop</a>().</p>
<h3 class="fn"><a name="tabStop" />float QTextOption.tabStop (<i>self</i>)</h3><p>Returns the distance in device units between tab stops.</p>
<p>See also <a href="qtextoption.html#setTabStop">setTabStop</a>() and <a href="qtextoption.html#tabArray">tabArray</a>().</p>
<h3 class="fn"><a name="textDirection" /><a href="qt.html#LayoutDirection-enum">Qt.LayoutDirection</a> QTextOption.textDirection (<i>self</i>)</h3><p>Returns the direction of the text layout defined by the option.</p>
<p>See also <a href="qtextoption.html#setTextDirection">setTextDirection</a>().</p>
<h3 class="fn"><a name="useDesignMetrics" />bool QTextOption.useDesignMetrics (<i>self</i>)</h3><p>Returns true if the layout uses design rather than device metrics; otherwise returns false.</p>
<p>See also <a href="qtextoption.html#setUseDesignMetrics">setUseDesignMetrics</a>().</p>
<h3 class="fn"><a name="wrapMode" /><a href="qtextoption.html#WrapMode-enum">WrapMode</a> QTextOption.wrapMode (<i>self</i>)</h3><p>Returns the text wrap mode defined by the option.</p>
<p>See also <a href="qtextoption.html#setWrapMode">setWrapMode</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>
|