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
|
<?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>QGraphicsPathItem 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">QGraphicsPathItem Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QGraphicsPathItem class provides a path item that you can add to a <a href="qgraphicsscene.html">QGraphicsScene</a>. <a href="#details">More...</a></p>
<p>Inherits <a href="qabstractgraphicsshapeitem.html">QAbstractGraphicsShapeItem</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qgraphicspathitem.html#QGraphicsPathItem">__init__</a></b> (<i>self</i>, QGraphicsItem <i>parent</i> = None, QGraphicsScene <i>scene</i> = None)</li><li><div class="fn" /><b><a href="qgraphicspathitem.html#QGraphicsPathItem-2">__init__</a></b> (<i>self</i>, QPainterPath, QGraphicsItem <i>parent</i> = None, QGraphicsScene <i>scene</i> = None)</li><li><div class="fn" />QRectF <b><a href="qgraphicspathitem.html#boundingRect">boundingRect</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qgraphicspathitem.html#contains">contains</a></b> (<i>self</i>, QPointF)</li><li><div class="fn" />bool <b><a href="qgraphicspathitem.html#isObscuredBy">isObscuredBy</a></b> (<i>self</i>, QGraphicsItem)</li><li><div class="fn" />QPainterPath <b><a href="qgraphicspathitem.html#opaqueArea">opaqueArea</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgraphicspathitem.html#paint">paint</a></b> (<i>self</i>, QPainter, QStyleOptionGraphicsItem, QWidget <i>widget</i> = None)</li><li><div class="fn" />QPainterPath <b><a href="qgraphicspathitem.html#path">path</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgraphicspathitem.html#setPath">setPath</a></b> (<i>self</i>, QPainterPath)</li><li><div class="fn" />QPainterPath <b><a href="qgraphicspathitem.html#shape">shape</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qgraphicspathitem.html#type">type</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QGraphicsPathItem class provides a path item that you can add to a <a href="qgraphicsscene.html">QGraphicsScene</a>.</p>
<p>To set the item's path, pass a <a href="qpainterpath.html">QPainterPath</a> to QGraphicsPathItem's constructor, or call the <a href="qgraphicspathitem.html#setPath">setPath</a>() function. The <a href="qgraphicspathitem.html#pathx">path</a>() function returns the current path.</p>
<p align="center"><img src="images/graphicsview-pathitem.png" /></p><p>QGraphicsPathItem uses the path to provide a reasonable implementation of <a href="qgraphicspathitem.html#boundingRect">boundingRect</a>(), <a href="qgraphicspathitem.html#shape">shape</a>(), and <a href="qgraphicspathitem.html#contains">contains</a>(). The <a href="qgraphicspathitem.html#paint">paint</a>() function draws the path using the item's associated pen and brush, which you can set by calling the <a href="qabstractgraphicsshapeitem.html#setPen">setPen</a>() and <a href="qabstractgraphicsshapeitem.html#setBrush">setBrush</a>() functions.</p>
<p>See also <a href="qgraphicsrectitem.html">QGraphicsRectItem</a>, <a href="qgraphicsellipseitem.html">QGraphicsEllipseItem</a>, <a href="qgraphicspolygonitem.html">QGraphicsPolygonItem</a>, <a href="qgraphicstextitem.html">QGraphicsTextItem</a>, <a href="qgraphicslineitem.html">QGraphicsLineItem</a>, <a href="qgraphicspixmapitem.html">QGraphicsPixmapItem</a>, and <a href="graphicsview.html">The Graphics View Framework</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGraphicsPathItem" />QGraphicsPathItem.__init__ (<i>self</i>, <a href="qgraphicsitem.html">QGraphicsItem</a> <i>parent</i> = None, <a href="qgraphicsscene.html">QGraphicsScene</a> <i>scene</i> = None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>The <i>scene</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a QGraphicsPath. <i>parent</i> is passed to <a href="qabstractgraphicsshapeitem.html">QAbstractGraphicsShapeItem</a>'s constructor.</p>
<p>See also <a href="qgraphicsscene.html#addItem">QGraphicsScene.addItem</a>().</p>
<h3 class="fn"><a name="QGraphicsPathItem-2" />QGraphicsPathItem.__init__ (<i>self</i>, <a href="qpainterpath.html">QPainterPath</a>, <a href="qgraphicsitem.html">QGraphicsItem</a> <i>parent</i> = None, <a href="qgraphicsscene.html">QGraphicsScene</a> <i>scene</i> = None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>The <i>scene</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a QGraphicsPath item using <i>path</i> as the default path. <i>parent</i> is passed to <a href="qabstractgraphicsshapeitem.html">QAbstractGraphicsShapeItem</a>'s constructor.</p>
<p>See also <a href="qgraphicsscene.html#addItem">QGraphicsScene.addItem</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsPathItem/~QGraphicsPathItem" />
<h3 class="fn"><a name="boundingRect" /><a href="qrectf.html">QRectF</a> QGraphicsPathItem.boundingRect (<i>self</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#boundingRect">QGraphicsItem.boundingRect</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsPathItem/contains" />
<h3 class="fn"><a name="contains" />bool QGraphicsPathItem.contains (<i>self</i>, <a href="qpointf.html">QPointF</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#contains">QGraphicsItem.contains</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsPathItem/isObscuredBy" />
<h3 class="fn"><a name="isObscuredBy" />bool QGraphicsPathItem.isObscuredBy (<i>self</i>, <a href="qgraphicsitem.html">QGraphicsItem</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#isObscuredBy">QGraphicsItem.isObscuredBy</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsPathItem/opaqueArea" />
<h3 class="fn"><a name="opaqueArea" /><a href="qpainterpath.html">QPainterPath</a> QGraphicsPathItem.opaqueArea (<i>self</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#opaqueArea">QGraphicsItem.opaqueArea</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsPathItem/paint" />
<h3 class="fn"><a name="paint" />QGraphicsPathItem.paint (<i>self</i>, <a href="qpainter.html">QPainter</a>, <a href="qstyleoptiongraphicsitem.html">QStyleOptionGraphicsItem</a>, <a href="qwidget.html">QWidget</a> <i>widget</i> = None)</h3><p>Reimplemented from <a href="qgraphicsitem.html#paint">QGraphicsItem.paint</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsPathItem/path" />
<h3 class="fn"><a name="path" /><a href="qpainterpath.html">QPainterPath</a> QGraphicsPathItem.path (<i>self</i>)</h3><h3 class="fn"><a name="setPath" />QGraphicsPathItem.setPath (<i>self</i>, <a href="qpainterpath.html">QPainterPath</a>)</h3><p>Sets the item's path to be the given <i>path</i>.</p>
<p>See also <a href="qgraphicspathitem.html#pathx">path</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsPathItem/shape" />
<h3 class="fn"><a name="shape" /><a href="qpainterpath.html">QPainterPath</a> QGraphicsPathItem.shape (<i>self</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#shape">QGraphicsItem.shape</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsPathItem/type" />
<h3 class="fn"><a name="type" />int QGraphicsPathItem.type (<i>self</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#type">QGraphicsItem.type</a>().</p>
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.7.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt 4.6.2</td></tr></table></div></address></body></html>
|