File: qtextitem.html

package info (click to toggle)
python-qt4 4.7.3-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,504 kB
  • ctags: 4,680
  • sloc: python: 28,738; cpp: 8,897; sh: 245; xml: 243; makefile: 150
file content (31 lines) | stat: -rw-r--r-- 5,639 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
<?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>QTextItem 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="../pyqt4ref.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">QTextItem Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QTextItem class provides all the information required to draw text in a custom paint engine. <a href="#details">More...</a></p>
<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qtextitem.html#RenderFlag-enum">RenderFlag</a></b> { RightToLeft, Overline, Underline, StrikeOut }</li><li><div class="fn" />class <b><a href="qtextitem-renderflags.html">RenderFlags</a></b></li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qtextitem.html#QTextItem">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextitem.html#QTextItem-2">__init__</a></b> (<i>self</i>, QTextItem)</li><li><div class="fn" />float <b><a href="qtextitem.html#ascent">ascent</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qtextitem.html#descent">descent</a></b> (<i>self</i>)</li><li><div class="fn" />QFont <b><a href="qtextitem.html#font">font</a></b> (<i>self</i>)</li><li><div class="fn" />RenderFlags <b><a href="qtextitem.html#renderFlags">renderFlags</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qtextitem.html#text">text</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qtextitem.html#width">width</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QTextItem class provides all the information required to draw text in a custom paint engine.</p>
<p>When you reimplement your own paint engine, you must reimplement <a href="qpaintengine.html#drawTextItem">QPaintEngine.drawTextItem</a>(), a function that takes a QTextItem as one of its arguments.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="RenderFlag-enum" />QTextItem.RenderFlag</h3><p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QTextItem.RightToLeft</tt></td><td align="center" valign="top"><tt>0x1</tt></td><td valign="top">Render the text from right to left.</td></tr>
<tr><td valign="top"><tt>QTextItem.Overline</tt></td><td align="center" valign="top"><tt>0x10</tt></td><td valign="top">Paint a line above the text.</td></tr>
<tr><td valign="top"><tt>QTextItem.Underline</tt></td><td align="center" valign="top"><tt>0x20</tt></td><td valign="top">Paint a line under the text.</td></tr>
<tr><td valign="top"><tt>QTextItem.StrikeOut</tt></td><td align="center" valign="top"><tt>0x40</tt></td><td valign="top">Paint a line through the text.</td></tr>
</table></p>
<p>The RenderFlags type is a typedef for <a href="qflags.html">QFlags</a>&lt;RenderFlag&gt;. It stores an OR combination of RenderFlag values.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QTextItem" />QTextItem.__init__ (<i>self</i>)</h3><h3 class="fn"><a name="QTextItem-2" />QTextItem.__init__ (<i>self</i>, <a href="qtextitem.html">QTextItem</a>)</h3><h3 class="fn"><a name="ascent" />float QTextItem.ascent (<i>self</i>)</h3><p>Corresponds to the <a href="qfontmetrics.html#ascent">ascent</a> of the piece of text that is drawn.</p>
<a name="//apple_ref/cpp/instm/QTextItem/descent" />
<h3 class="fn"><a name="descent" />float QTextItem.descent (<i>self</i>)</h3><p>Corresponds to the <a href="qfontmetrics.html#descent">descent</a> of the piece of text that is drawn.</p>
<a name="//apple_ref/cpp/instm/QTextItem/font" />
<h3 class="fn"><a name="font" /><a href="qfont.html">QFont</a> QTextItem.font (<i>self</i>)</h3><p>Returns the font that should be used to draw the text.</p>
<a name="//apple_ref/cpp/instm/QTextItem/renderFlags" />
<h3 class="fn"><a name="renderFlags" /><a href="qtextitem-renderflags.html">RenderFlags</a> QTextItem.renderFlags (<i>self</i>)</h3><p>Returns the render flags used.</p>
<a name="//apple_ref/cpp/instm/QTextItem/text" />
<h3 class="fn"><a name="text" />QString QTextItem.text (<i>self</i>)</h3><p>Returns the text that should be drawn.</p>
<a name="//apple_ref/cpp/instm/QTextItem/width" />
<h3 class="fn"><a name="width" />float QTextItem.width (<i>self</i>)</h3><p>Specifies the total width of the text to be drawn.</p>
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.3 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.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.6.2</td></tr></table></div></address></body></html>