Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8e6051afcdb111a0317a58fb64c2abf5 > files > 4164

qt4-doc-4.6.3-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qgraphicsitem.cpp -->
<head>
  <title>Qt 4.6: QGraphicsItem Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="//apple_ref/cpp/cl//QGraphicsItem"></a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">QGraphicsItem Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
</h1>
<p>The QGraphicsItem class is the base class for all graphical items in a <a href="qgraphicsscene.html">QGraphicsScene</a>. <a href="#details">More...</a></p>
<pre> #include &lt;QGraphicsItem&gt;</pre><p>Inherited by <a href="qabstractgraphicsshapeitem.html">QAbstractGraphicsShapeItem</a>, <a href="qgraphicsitemgroup.html">QGraphicsItemGroup</a>, <a href="qgraphicslineitem.html">QGraphicsLineItem</a>, <a href="qgraphicsobject.html">QGraphicsObject</a>, and <a href="qgraphicspixmapitem.html">QGraphicsPixmapItem</a>.</p>
<p>This class was introduced in Qt 4.2.</p>
<ul>
<li><a href="qgraphicsitem-members.html">List of all members, including inherited members</a></li>
<li><a href="qgraphicsitem-obsolete.html">Obsolete members</a></li>
</ul>
<hr />
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#CacheMode-enum">CacheMode</a></b> { NoCache, ItemCoordinateCache, DeviceCoordinateCache }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#GraphicsItemChange-enum">GraphicsItemChange</a></b> { ItemEnabledChange, ItemEnabledHasChanged, ItemMatrixChange, ItemPositionChange, ..., ItemScenePositionHasChanged }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#GraphicsItemFlag-enum">GraphicsItemFlag</a></b> { ItemIsMovable, ItemIsSelectable, ItemIsFocusable, ItemClipsToShape, ..., ItemSendsScenePositionChanges }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">flags </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#GraphicsItemFlag-enum">GraphicsItemFlags</a></b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#PanelModality-enum">PanelModality</a></b> { NonModal, PanelModal, SceneModal }</td></tr>
</table>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#QGraphicsItem">QGraphicsItem</a></b> ( QGraphicsItem * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#dtor.QGraphicsItem">~QGraphicsItem</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#acceptDrops">acceptDrops</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#acceptHoverEvents">acceptHoverEvents</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#acceptTouchEvents">acceptTouchEvents</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::MouseButtons </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#acceptedMouseButtons">acceptedMouseButtons</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#advance">advance</a></b> ( int <i>phase</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#boundingRect">boundingRect</a></b> () const = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRegion </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#boundingRegion">boundingRegion</a></b> ( const QTransform &amp; <i>itemToDeviceTransform</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">qreal </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#boundingRegionGranularity">boundingRegionGranularity</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">CacheMode </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#cacheMode">cacheMode</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QList&lt;QGraphicsItem *&gt; </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#childItems">childItems</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#childrenBoundingRect">childrenBoundingRect</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#clearFocus">clearFocus</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPainterPath </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#clipPath">clipPath</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#collidesWithItem">collidesWithItem</a></b> ( const QGraphicsItem * <i>other</i>, Qt::ItemSelectionMode <i>mode</i> = Qt::IntersectsItemShape ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#collidesWithPath">collidesWithPath</a></b> ( const QPainterPath &amp; <i>path</i>, Qt::ItemSelectionMode <i>mode</i> = Qt::IntersectsItemShape ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QList&lt;QGraphicsItem *&gt; </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#collidingItems">collidingItems</a></b> ( Qt::ItemSelectionMode <i>mode</i> = Qt::IntersectsItemShape ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsItem * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#commonAncestorItem">commonAncestorItem</a></b> ( const QGraphicsItem * <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#contains">contains</a></b> ( const QPointF &amp; <i>point</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QCursor </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#cursor">cursor</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QVariant </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#data">data</a></b> ( int <i>key</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QTransform </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#deviceTransform">deviceTransform</a></b> ( const QTransform &amp; <i>viewportTransform</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">qreal </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#effectiveOpacity">effectiveOpacity</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#ensureVisible">ensureVisible</a></b> ( const QRectF &amp; <i>rect</i> = QRectF(), int <i>xmargin</i> = 50, int <i>ymargin</i> = 50 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#ensureVisible-2">ensureVisible</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i>, int <i>xmargin</i> = 50, int <i>ymargin</i> = 50 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#filtersChildEvents">filtersChildEvents</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">GraphicsItemFlags </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#flags">flags</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsItem * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#focusItem">focusItem</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsItem * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#focusProxy">focusProxy</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#grabKeyboard">grabKeyboard</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#grabMouse">grabMouse</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsEffect * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#graphicsEffect">graphicsEffect</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsItemGroup * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#group">group</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#hasCursor">hasCursor</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#hasFocus">hasFocus</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#hide">hide</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::InputMethodHints </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#inputMethodHints">inputMethodHints</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#installSceneEventFilter">installSceneEventFilter</a></b> ( QGraphicsItem * <i>filterItem</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isActive">isActive</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isAncestorOf">isAncestorOf</a></b> ( const QGraphicsItem * <i>child</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isBlockedByModalPanel">isBlockedByModalPanel</a></b> ( QGraphicsItem ** <i>blockingPanel</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isClipped">isClipped</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isEnabled">isEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isObscured">isObscured</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isObscured-2">isObscured</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isObscured-3">isObscured</a></b> ( const QRectF &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isObscuredBy">isObscuredBy</a></b> ( const QGraphicsItem * <i>item</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isPanel">isPanel</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isSelected">isSelected</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isUnderMouse">isUnderMouse</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isVisible">isVisible</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isVisibleTo">isVisibleTo</a></b> ( const QGraphicsItem * <i>parent</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isWidget">isWidget</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#isWindow">isWindow</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QTransform </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#itemTransform">itemTransform</a></b> ( const QGraphicsItem * <i>other</i>, bool * <i>ok</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPointF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromItem">mapFromItem</a></b> ( const QGraphicsItem * <i>item</i>, const QPointF &amp; <i>point</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromItem-2">mapFromItem</a></b> ( const QGraphicsItem * <i>item</i>, const QRectF &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromItem-3">mapFromItem</a></b> ( const QGraphicsItem * <i>item</i>, const QPolygonF &amp; <i>polygon</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPainterPath </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromItem-4">mapFromItem</a></b> ( const QGraphicsItem * <i>item</i>, const QPainterPath &amp; <i>path</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromItem-5">mapFromItem</a></b> ( const QGraphicsItem * <i>item</i>, qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPointF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromItem-6">mapFromItem</a></b> ( const QGraphicsItem * <i>item</i>, qreal <i>x</i>, qreal <i>y</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPointF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromParent">mapFromParent</a></b> ( const QPointF &amp; <i>point</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromParent-2">mapFromParent</a></b> ( const QRectF &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromParent-3">mapFromParent</a></b> ( const QPolygonF &amp; <i>polygon</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPainterPath </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromParent-4">mapFromParent</a></b> ( const QPainterPath &amp; <i>path</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromParent-5">mapFromParent</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPointF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromParent-6">mapFromParent</a></b> ( qreal <i>x</i>, qreal <i>y</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPointF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromScene">mapFromScene</a></b> ( const QPointF &amp; <i>point</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromScene-2">mapFromScene</a></b> ( const QRectF &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromScene-3">mapFromScene</a></b> ( const QPolygonF &amp; <i>polygon</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPainterPath </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromScene-4">mapFromScene</a></b> ( const QPainterPath &amp; <i>path</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromScene-5">mapFromScene</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPointF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapFromScene-6">mapFromScene</a></b> ( qreal <i>x</i>, qreal <i>y</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapRectFromItem">mapRectFromItem</a></b> ( const QGraphicsItem * <i>item</i>, const QRectF &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapRectFromItem-2">mapRectFromItem</a></b> ( const QGraphicsItem * <i>item</i>, qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapRectFromParent">mapRectFromParent</a></b> ( const QRectF &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapRectFromParent-2">mapRectFromParent</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapRectFromScene">mapRectFromScene</a></b> ( const QRectF &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapRectFromScene-2">mapRectFromScene</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapRectToItem">mapRectToItem</a></b> ( const QGraphicsItem * <i>item</i>, const QRectF &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapRectToItem-2">mapRectToItem</a></b> ( const QGraphicsItem * <i>item</i>, qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapRectToParent">mapRectToParent</a></b> ( const QRectF &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapRectToParent-2">mapRectToParent</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapRectToScene">mapRectToScene</a></b> ( const QRectF &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapRectToScene-2">mapRectToScene</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPointF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToItem">mapToItem</a></b> ( const QGraphicsItem * <i>item</i>, const QPointF &amp; <i>point</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToItem-2">mapToItem</a></b> ( const QGraphicsItem * <i>item</i>, const QRectF &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToItem-3">mapToItem</a></b> ( const QGraphicsItem * <i>item</i>, const QPolygonF &amp; <i>polygon</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPainterPath </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToItem-4">mapToItem</a></b> ( const QGraphicsItem * <i>item</i>, const QPainterPath &amp; <i>path</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToItem-5">mapToItem</a></b> ( const QGraphicsItem * <i>item</i>, qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPointF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToItem-6">mapToItem</a></b> ( const QGraphicsItem * <i>item</i>, qreal <i>x</i>, qreal <i>y</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPointF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToParent">mapToParent</a></b> ( const QPointF &amp; <i>point</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToParent-2">mapToParent</a></b> ( const QRectF &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToParent-3">mapToParent</a></b> ( const QPolygonF &amp; <i>polygon</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPainterPath </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToParent-4">mapToParent</a></b> ( const QPainterPath &amp; <i>path</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToParent-5">mapToParent</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPointF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToParent-6">mapToParent</a></b> ( qreal <i>x</i>, qreal <i>y</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPointF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToScene">mapToScene</a></b> ( const QPointF &amp; <i>point</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToScene-2">mapToScene</a></b> ( const QRectF &amp; <i>rect</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToScene-3">mapToScene</a></b> ( const QPolygonF &amp; <i>polygon</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPainterPath </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToScene-4">mapToScene</a></b> ( const QPainterPath &amp; <i>path</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPolygonF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToScene-5">mapToScene</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPointF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mapToScene-6">mapToScene</a></b> ( qreal <i>x</i>, qreal <i>y</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#moveBy">moveBy</a></b> ( qreal <i>dx</i>, qreal <i>dy</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">qreal </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#opacity">opacity</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QPainterPath </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#opaqueArea">opaqueArea</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#paint">paint</a></b> ( QPainter * <i>painter</i>, const QStyleOptionGraphicsItem * <i>option</i>, QWidget * <i>widget</i> = 0 ) = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsItem * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#panel">panel</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">PanelModality </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#panelModality">panelModality</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsItem * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#parentItem">parentItem</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsObject * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#parentObject">parentObject</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#parentWidget">parentWidget</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPointF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#pos">pos</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#removeSceneEventFilter">removeSceneEventFilter</a></b> ( QGraphicsItem * <i>filterItem</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#resetTransform">resetTransform</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">qreal </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#rotation">rotation</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">qreal </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#scale">scale</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsScene * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#scene">scene</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#sceneBoundingRect">sceneBoundingRect</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPointF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#scenePos">scenePos</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QTransform </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#sceneTransform">sceneTransform</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#scroll">scroll</a></b> ( qreal <i>dx</i>, qreal <i>dy</i>, const QRectF &amp; <i>rect</i> = QRectF() )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setAcceptDrops">setAcceptDrops</a></b> ( bool <i>on</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setAcceptHoverEvents">setAcceptHoverEvents</a></b> ( bool <i>enabled</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setAcceptTouchEvents">setAcceptTouchEvents</a></b> ( bool <i>enabled</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setAcceptedMouseButtons">setAcceptedMouseButtons</a></b> ( Qt::MouseButtons <i>buttons</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setActive">setActive</a></b> ( bool <i>active</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setBoundingRegionGranularity">setBoundingRegionGranularity</a></b> ( qreal <i>granularity</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setCacheMode">setCacheMode</a></b> ( CacheMode <i>mode</i>, const QSize &amp; <i>logicalCacheSize</i> = QSize() )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setCursor">setCursor</a></b> ( const QCursor &amp; <i>cursor</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setData">setData</a></b> ( int <i>key</i>, const QVariant &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setEnabled">setEnabled</a></b> ( bool <i>enabled</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setFiltersChildEvents">setFiltersChildEvents</a></b> ( bool <i>enabled</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setFlag">setFlag</a></b> ( GraphicsItemFlag <i>flag</i>, bool <i>enabled</i> = true )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setFlags">setFlags</a></b> ( GraphicsItemFlags <i>flags</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setFocus">setFocus</a></b> ( Qt::FocusReason <i>focusReason</i> = Qt::OtherFocusReason )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setFocusProxy">setFocusProxy</a></b> ( QGraphicsItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setGraphicsEffect">setGraphicsEffect</a></b> ( QGraphicsEffect * <i>effect</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setGroup">setGroup</a></b> ( QGraphicsItemGroup * <i>group</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setInputMethodHints">setInputMethodHints</a></b> ( Qt::InputMethodHints <i>hints</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setOpacity">setOpacity</a></b> ( qreal <i>opacity</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setPanelModality">setPanelModality</a></b> ( PanelModality <i>panelModality</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setParentItem">setParentItem</a></b> ( QGraphicsItem * <i>newParent</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setPos">setPos</a></b> ( const QPointF &amp; <i>pos</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setPos-2">setPos</a></b> ( qreal <i>x</i>, qreal <i>y</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setRotation">setRotation</a></b> ( qreal <i>angle</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setScale">setScale</a></b> ( qreal <i>factor</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setSelected">setSelected</a></b> ( bool <i>selected</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setToolTip">setToolTip</a></b> ( const QString &amp; <i>toolTip</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setTransform">setTransform</a></b> ( const QTransform &amp; <i>matrix</i>, bool <i>combine</i> = false )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setTransformOriginPoint">setTransformOriginPoint</a></b> ( const QPointF &amp; <i>origin</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setTransformOriginPoint-2">setTransformOriginPoint</a></b> ( qreal <i>x</i>, qreal <i>y</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setTransformations">setTransformations</a></b> ( const QList&lt;QGraphicsTransform *&gt; &amp; <i>transformations</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setVisible">setVisible</a></b> ( bool <i>visible</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setX">setX</a></b> ( qreal <i>x</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setY">setY</a></b> ( qreal <i>y</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#setZValue">setZValue</a></b> ( qreal <i>z</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QPainterPath </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#shape">shape</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#show">show</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#stackBefore">stackBefore</a></b> ( const QGraphicsItem * <i>sibling</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsObject * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#toGraphicsObject">toGraphicsObject</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const QGraphicsObject * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#toGraphicsObject-2">toGraphicsObject</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#toolTip">toolTip</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsItem * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#topLevelItem">topLevelItem</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#topLevelWidget">topLevelWidget</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QTransform </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#transform">transform</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPointF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#transformOriginPoint">transformOriginPoint</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QList&lt;QGraphicsTransform *&gt; </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#transformations">transformations</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#type">type</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#ungrabKeyboard">ungrabKeyboard</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#ungrabMouse">ungrabMouse</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#unsetCursor">unsetCursor</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#update">update</a></b> ( const QRectF &amp; <i>rect</i> = QRectF() )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#update-2">update</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>width</i>, qreal <i>height</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#window">window</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">qreal </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#x">x</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">qreal </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#y">y</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">qreal </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#zValue">zValue</a></b> () const</td></tr>
</table>
<hr />
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">const int </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#Type-var">Type</a></b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const int </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#UserType-var">UserType</a></b></td></tr>
</table>
<hr />
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#contextMenuEvent">contextMenuEvent</a></b> ( QGraphicsSceneContextMenuEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#dragEnterEvent">dragEnterEvent</a></b> ( QGraphicsSceneDragDropEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#dragLeaveEvent">dragLeaveEvent</a></b> ( QGraphicsSceneDragDropEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#dragMoveEvent">dragMoveEvent</a></b> ( QGraphicsSceneDragDropEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#dropEvent">dropEvent</a></b> ( QGraphicsSceneDragDropEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#focusInEvent">focusInEvent</a></b> ( QFocusEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#focusOutEvent">focusOutEvent</a></b> ( QFocusEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#hoverEnterEvent">hoverEnterEvent</a></b> ( QGraphicsSceneHoverEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#hoverLeaveEvent">hoverLeaveEvent</a></b> ( QGraphicsSceneHoverEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#hoverMoveEvent">hoverMoveEvent</a></b> ( QGraphicsSceneHoverEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#inputMethodEvent">inputMethodEvent</a></b> ( QInputMethodEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QVariant </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#inputMethodQuery">inputMethodQuery</a></b> ( Qt::InputMethodQuery <i>query</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QVariant </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#itemChange">itemChange</a></b> ( GraphicsItemChange <i>change</i>, const QVariant &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#keyPressEvent">keyPressEvent</a></b> ( QKeyEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#keyReleaseEvent">keyReleaseEvent</a></b> ( QKeyEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b> ( QGraphicsSceneMouseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mouseMoveEvent">mouseMoveEvent</a></b> ( QGraphicsSceneMouseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mousePressEvent">mousePressEvent</a></b> ( QGraphicsSceneMouseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#mouseReleaseEvent">mouseReleaseEvent</a></b> ( QGraphicsSceneMouseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#prepareGeometryChange">prepareGeometryChange</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#sceneEvent">sceneEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#sceneEventFilter">sceneEventFilter</a></b> ( QGraphicsItem * <i>watched</i>, QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#wheelEvent">wheelEvent</a></b> ( QGraphicsSceneWheelEvent * <i>event</i> )</td></tr>
</table>
<hr />
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">T </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsitem.html#qgraphicsitem_cast">qgraphicsitem_cast</a></b> ( QGraphicsItem * <i>item</i> )</td></tr>
</table>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QGraphicsItem class is the base class for all graphical items in a <a href="qgraphicsscene.html">QGraphicsScene</a>.</p>
<p>It provides a light-weight foundation for writing your own custom items. This includes defining the item's geometry, collision detection, its painting implementation and item interaction through its event handlers. QGraphicsItem is part of <a href="graphicsview.html">The Graphics View Framework</a></p>
<p align="center"><img src="images/graphicsview-items.png" /></p><p>For convenience, Qt provides a set of standard graphics items for the most common shapes. These are:</p>
<ul>
<li><a href="qgraphicsellipseitem.html">QGraphicsEllipseItem</a> provides an ellipse item</li>
<li><a href="qgraphicslineitem.html">QGraphicsLineItem</a> provides a line item</li>
<li><a href="qgraphicspathitem.html">QGraphicsPathItem</a> provides an arbitrary path item</li>
<li><a href="qgraphicspixmapitem.html">QGraphicsPixmapItem</a> provides a pixmap item</li>
<li><a href="qgraphicspolygonitem.html">QGraphicsPolygonItem</a> provides a polygon item</li>
<li><a href="qgraphicsrectitem.html">QGraphicsRectItem</a> provides a rectangular item</li>
<li><a href="qgraphicssimpletextitem.html">QGraphicsSimpleTextItem</a> provides a simple text label item</li>
<li><a href="qgraphicstextitem.html">QGraphicsTextItem</a> provides an advanced text browser item</li>
</ul>
<p>All of an item's geometric information is based on its local coordinate system. The item's position, <a href="qgraphicsitem.html#pos">pos</a>(), is the only function that does not operate in local coordinates, as it returns a position in parent coordinates. <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a> describes the coordinate system in detail.</p>
<p>You can set whether an item should be visible (i.e&#x2e;, drawn, and accepting events), by calling <a href="qgraphicsitem.html#setVisible">setVisible</a>(). Hiding an item will also hide its children. Similarly, you can enable or disable an item by calling <a href="qgraphicsitem.html#setEnabled">setEnabled</a>(). If you disable an item, all its children will also be disabled. By default, items are both visible and enabled. To toggle whether an item is selected or not, first enable selection by setting the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsSelectable</a> flag, and then call <a href="qgraphicsitem.html#setSelected">setSelected</a>(). Normally, selection is toggled by the scene, as a result of user interaction.</p>
<p>To write your own graphics item, you first create a subclass of QGraphicsItem, and then start by implementing its two pure virtual public functions: <a href="qgraphicsitem.html#boundingRect">boundingRect</a>(), which returns an estimate of the area painted by the item, and <a href="qgraphicsitem.html#paint">paint</a>(), which implements the actual painting. For example:</p>
<pre> class SimpleItem : public QGraphicsItem
 {
 public:
     QRectF boundingRect() const
     {
         qreal penWidth = 1;
         return QRectF(-10 - penWidth / 2, -10 - penWidth / 2,
                       20 + penWidth, 20 + penWidth);
     }

     void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
                QWidget *widget)
     {
         painter-&gt;drawRoundedRect(-10, -10, 20, 20, 5, 5);
     }
 };</pre>
<p>The <a href="qgraphicsitem.html#boundingRect">boundingRect</a>() function has many different purposes. <a href="qgraphicsscene.html">QGraphicsScene</a> bases its item index on <a href="qgraphicsitem.html#boundingRect">boundingRect</a>(), and <a href="qgraphicsview.html">QGraphicsView</a> uses it both for culling invisible items, and for determining the area that needs to be recomposed when drawing overlapping items. In addition, QGraphicsItem's collision detection mechanisms use <a href="qgraphicsitem.html#boundingRect">boundingRect</a>() to provide an efficient cut-off. The fine grained collision algorithm in <a href="qgraphicsitem.html#collidesWithItem">collidesWithItem</a>() is based on calling <a href="qgraphicsitem.html#shape">shape</a>(), which returns an accurate outline of the item's shape as a <a href="qpainterpath.html">QPainterPath</a>.</p>
<p><a href="qgraphicsscene.html">QGraphicsScene</a> expects all items <a href="qgraphicsitem.html#boundingRect">boundingRect</a>() and <a href="qgraphicsitem.html#shape">shape</a>() to remain unchanged unless it is notified. If you want to change an item's geometry in any way, you must first call <a href="qgraphicsitem.html#prepareGeometryChange">prepareGeometryChange</a>() to allow <a href="qgraphicsscene.html">QGraphicsScene</a> to update its bookkeeping.</p>
<p>Collision detection can be done in two ways:</p>
<ol type="1">
<li>Reimplement <a href="qgraphicsitem.html#shape">shape</a>() to return an accurate shape for your item, and rely on the default implementation of <a href="qgraphicsitem.html#collidesWithItem">collidesWithItem</a>() to do shape-shape intersection. This can be rather expensive if the shapes are complex.</li>
<li>Reimplement <a href="qgraphicsitem.html#collidesWithItem">collidesWithItem</a>() to provide your own custom item and shape collision algorithm.</li>
</ol>
<p>The <a href="qgraphicsitem.html#contains">contains</a>() function can be called to determine whether the item <i>contains</i> a point or not. This function can also be reimplemented by the item. The default behavior of <a href="qgraphicsitem.html#contains">contains</a>() is based on calling <a href="qgraphicsitem.html#shape">shape</a>().</p>
<p>Items can contain other items, and also be contained by other items. All items can have a parent item and a list of children. Unless the item has no parent, its position is in <i>parent</i> coordinates (i.e&#x2e;, the parent's local coordinates). Parent items propagate both their position and their transformation to all children.</p>
<p align="center"><img src="images/graphicsview-parentchild.png" /></p><a name="transformation"></a>
<h3>Transformation</h3>
<p>QGraphicsItem supports projective transformations in addition to its base position, <a href="qgraphicsitem.html#pos">pos</a>(). There are several ways to change an item's transformation. For simple transformations, you can call either of the convenience functions <a href="qgraphicsitem.html#setRotation">setRotation</a>() or <a href="qgraphicsitem.html#setScale">setScale</a>(), or you can pass any transformation matrix to <a href="qgraphicsitem.html#setTransform">setTransform</a>(). For advanced transformation control you also have the option of setting several combined transformations by calling <a href="qgraphicsitem.html#setTransformations">setTransformations</a>().</p>
<p>Item transformations accumulate from parent to child, so if both a parent and child item are rotated 90 degrees, the child's total transformation will be 180 degrees. Similarly, if the item's parent is scaled to 2x its original size, its children will also be twice as large. An item's transformation does not affect its own local geometry; all geometry functions (e.g&#x2e;, <a href="qgraphicsitem.html#contains">contains</a>(), <a href="qgraphicsitem.html#update">update</a>(), and all the mapping functions) still operate in local coordinates. For convenience, QGraphicsItem provides the functions <a href="qgraphicsitem.html#sceneTransform">sceneTransform</a>(), which returns the item's total transformation matrix (including its position and all parents' positions and transformations), and <a href="qgraphicsitem.html#scenePos">scenePos</a>(), which returns its position in scene coordinates. To reset an item's matrix, call <a href="qgraphicsitem.html#resetTransform">resetTransform</a>().</p>
<p>Certain transformation operations produce a different outcome depending on the order in which they are applied. For example, if you scale an transform, and then rotate it, you may get a different result than if the transform was rotated first. However, the order you set the transformation properties on QGraphicsItem does not affect the resulting transformation; QGraphicsItem always applies the properties in a fixed, defined order:</p>
<ul>
<li>The item's base transform is applied (<a href="qgraphicsitem.html#transform">transform</a>())</li>
<li>The item's transformations list is applied in order (<a href="qgraphicsitem.html#transformations">transformations</a>())</li>
<li>The item is rotated relative to its transform origin point (<a href="qgraphicsitem.html#rotation">rotation</a>(), <a href="qgraphicsitem.html#transformOriginPoint">transformOriginPoint</a>())</li>
<li>The item is scaled relative to its transform origin point (<a href="qgraphicsitem.html#scale">scale</a>(), <a href="qgraphicsitem.html#transformOriginPoint">transformOriginPoint</a>())</li>
</ul>
<a name="painting"></a>
<h3>Painting</h3>
<p>The <a href="qgraphicsitem.html#paint">paint</a>() function is called by <a href="qgraphicsview.html">QGraphicsView</a> to paint the item's contents. The item has no background or default fill of its own; whatever is behind the item will shine through all areas that are not explicitly painted in this function. You can call <a href="qgraphicsitem.html#update">update</a>() to schedule a repaint, optionally passing the rectangle that needs a repaint. Depending on whether or not the item is visible in a view, the item may or may not be repainted; there is no equivalent to <a href="qwidget.html#repaint">QWidget::repaint</a>() in QGraphicsItem.</p>
<p>Items are painted by the view, starting with the parent items and then drawing children, in ascending stacking order. You can set an item's stacking order by calling <a href="qgraphicsitem.html#setZValue">setZValue</a>(), and test it by calling <a href="qgraphicsitem.html#zValue">zValue</a>(), where items with low z-values are painted before items with high z-values. Stacking order applies to sibling items; parents are always drawn before their children.</p>
<a name="sorting"></a>
<h3>Sorting</h3>
<p>All items are drawn in a defined, stable order, and this same order decides which items will receive mouse input first when you click on the scene. Normally you don't have to worry about sorting, as the items follow a &quot;natural order&quot;, following the logical structure of the scene.</p>
<p>An item's children are stacked on top of the parent, and sibling items are stacked by insertion order (i.e&#x2e;, in the same order that they were either added to the scene, or added to the same parent). If you add item A, and then B, then B will be on top of A. If you then add C, the items' stacking order will be A, then B, then C.</p>
<p align="center"><img src="images/graphicsview-zorder.png" /></p><p>This example shows the stacking order of all limbs of the robot from the <a href="graphicsview-dragdroprobot.html">Drag and Drop Robot</a> example. The torso is the root item (all other items are children or descendants of the torso), so it is drawn first. Next, the head is drawn, as it is the first item in the torso's list of children. Then the upper left arm is drawn. As the lower arm is a child of the upper arm, the lower arm is then drawn, followed by the upper arm's next sibling, which is the upper right arm, and so on.</p>
<p>For advanced users, there are ways to alter how your items are sorted:</p>
<ul>
<li>You can call <a href="qgraphicsitem.html#setZValue">setZValue</a>() on an item to explicitly stack it on top of, or under, other sibling items. The default Z value for an item is 0. Items with the same Z value are stacked by insertion order.</li>
<li>You can call <a href="qgraphicsitem.html#stackBefore">stackBefore</a>() to reorder the list of children. This will directly modify the insertion order.</li>
<li>You can set the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemStacksBehindParent</a> flag to stack a child item behind its parent.</li>
</ul>
<p>The stacking order of two sibling items also counts for each item's children and descendant items. So if one item is on top of another, then all its children will also be on top of all the other item's children as well.</p>
<a name="events"></a>
<h3>Events</h3>
<p>QGraphicsItem receives events from <a href="qgraphicsscene.html">QGraphicsScene</a> through the virtual function <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>(). This function distributes the most common events to a set of convenience event handlers:</p>
<ul>
<li><a href="qgraphicsitem.html#contextMenuEvent">contextMenuEvent</a>() handles context menu events</li>
<li><a href="qgraphicsitem.html#focusInEvent">focusInEvent</a>() and <a href="qgraphicsitem.html#focusOutEvent">focusOutEvent</a>() handle focus in and out events</li>
<li><a href="qgraphicsitem.html#hoverEnterEvent">hoverEnterEvent</a>(), <a href="qgraphicsitem.html#hoverMoveEvent">hoverMoveEvent</a>(), and <a href="qgraphicsitem.html#hoverLeaveEvent">hoverLeaveEvent</a>() handles hover enter, move and leave events</li>
<li><a href="qgraphicsitem.html#inputMethodEvent">inputMethodEvent</a>() handles input events, for accessibility support</li>
<li><a href="qgraphicsitem.html#keyPressEvent">keyPressEvent</a>() and <a href="qgraphicsitem.html#keyReleaseEvent">keyReleaseEvent</a>() handle key press and release events</li>
<li><a href="qgraphicsitem.html#mousePressEvent">mousePressEvent</a>(), <a href="qgraphicsitem.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qgraphicsitem.html#mouseReleaseEvent">mouseReleaseEvent</a>(), and <a href="qgraphicsitem.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>() handles mouse press, move, release, click and doubleclick events</li>
</ul>
<p>You can filter events for any other item by installing event filters. This functionality is separate from Qt's regular event filters (see <a href="qobject.html#installEventFilter">QObject::installEventFilter</a>()), which only work on subclasses of <a href="qobject.html">QObject</a>. After installing your item as an event filter for another item by calling <a href="qgraphicsitem.html#installSceneEventFilter">installSceneEventFilter</a>(), the filtered events will be received by the virtual function <a href="qgraphicsitem.html#sceneEventFilter">sceneEventFilter</a>(). You can remove item event filters by calling <a href="qgraphicsitem.html#removeSceneEventFilter">removeSceneEventFilter</a>().</p>
<a name="custom-data"></a>
<h3>Custom Data</h3>
<p>Sometimes it's useful to register custom data with an item, be it a custom item, or a standard item. You can call <a href="qgraphicsitem.html#setData">setData</a>() on any item to store data in it using a key-value pair (the key being an integer, and the value is a <a href="qvariant.html">QVariant</a>). To get custom data from an item, call <a href="qgraphicsitem.html#data">data</a>(). This functionality is completely untouched by Qt itself; it is provided for the user's convenience.</p>
<p>See also <a href="qgraphicsscene.html">QGraphicsScene</a>, <a href="qgraphicsview.html">QGraphicsView</a>, and <a href="graphicsview.html">The Graphics View Framework</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<a name="//apple_ref/cpp/tag/QGraphicsItem/CacheMode"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/NoCache"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemCoordinateCache"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/DeviceCoordinateCache"></a>
<h3 class="fn"><a name="CacheMode-enum"></a>enum QGraphicsItem::CacheMode</h3>
<p>This enum describes <a href="qgraphicsitem.html">QGraphicsItem</a>'s cache modes. Caching is used to speed up rendering by allocating and rendering to an off-screen pixel buffer, which can be reused when the item requires redrawing. For some paint devices, the cache is stored directly in graphics memory, which makes rendering very quick.</p>
<p><table class="valuelist" 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>QGraphicsItem::NoCache</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The default; all item caching is disabled. <a href="qgraphicsitem.html#paint">QGraphicsItem::paint</a>() is called every time the item needs redrawing.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemCoordinateCache</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Caching is enabled for the item's logical (local) coordinate system. <a href="qgraphicsitem.html">QGraphicsItem</a> creates an off-screen pixel buffer with a configurable size / resolution that you can pass to <a href="qgraphicsitem.html#setCacheMode">QGraphicsItem::setCacheMode</a>(). Rendering quality will typically degrade, depending on the resolution of the cache and the item transformation. The first time the item is redrawn, it will render itself into the cache, and the cache is then reused for every subsequent expose. The cache is also reused as the item is transformed. To adjust the resolution of the cache, you can call <a href="qgraphicsitem.html#setCacheMode">setCacheMode</a>() again.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::DeviceCoordinateCache</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Caching is enabled at the paint device level, in device coordinates. This mode is for items that can move, but are not rotated, scaled or sheared. If the item is transformed directly or indirectly, the cache will be regenerated automatically. Unlike ItemCoordinateCacheMode, DeviceCoordinateCache always renders at maximum quality.</td></tr>
</table></p>
<p>This enum was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#setCacheMode">QGraphicsItem::setCacheMode</a>().</p>
<a name="//apple_ref/cpp/tag/QGraphicsItem/GraphicsItemChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemEnabledChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemEnabledHasChanged"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemMatrixChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemPositionChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemPositionHasChanged"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemTransformChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemTransformHasChanged"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemSelectedChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemSelectedHasChanged"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemVisibleChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemVisibleHasChanged"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemParentChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemParentHasChanged"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemChildAddedChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemChildRemovedChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemSceneChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemSceneHasChanged"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemCursorChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemCursorHasChanged"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemToolTipChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemToolTipHasChanged"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemFlagsChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemFlagsHaveChanged"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemZValueChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemZValueHasChanged"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemOpacityChange"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemOpacityHasChanged"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemScenePositionHasChanged"></a>
<h3 class="fn"><a name="GraphicsItemChange-enum"></a>enum QGraphicsItem::GraphicsItemChange</h3>
<p>This enum describes the state changes that are notified by <a href="qgraphicsitem.html#itemChange">QGraphicsItem::itemChange</a>(). The notifications are sent as the state changes, and in some cases, adjustments can be made (see the documentation for each change for details).</p>
<p>Note: Be careful with calling functions on the <a href="qgraphicsitem.html">QGraphicsItem</a> itself inside <a href="qgraphicsitem.html#itemChange">itemChange</a>(), as certain function calls can lead to unwanted recursion. For example, you cannot call <a href="qgraphicsitem.html#setPos">setPos</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() on an ItemPositionChange notification, as the <a href="qgraphicsitem.html#setPos">setPos</a>() function will again call itemChange(ItemPositionChange). Instead, you can return the new, adjusted position from <a href="qgraphicsitem.html#itemChange">itemChange</a>().</p>
<p><table class="valuelist" 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>QGraphicsItem::ItemEnabledChange</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">The item's enabled state changes. If the item is presently enabled, it will become disabled, and vice verca. The value argument is the new enabled state (i.e&#x2e;, true or false). Do not call <a href="qgraphicsitem.html#setEnabled">setEnabled</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered. Instead, you can return the new state from <a href="qgraphicsitem.html#itemChange">itemChange</a>().</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemEnabledHasChanged</tt></td><td align="center" valign="top"><tt>13</tt></td><td valign="top">The item's enabled state has changed. The value argument is the new enabled state (i.e&#x2e;, true or false). Do not call <a href="qgraphicsitem.html#setEnabled">setEnabled</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered. The return value is ignored.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemMatrixChange</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The item's affine transformation matrix is changing. This value is obsolete; you can use ItemTransformChange instead.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemPositionChange</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The item's position changes. This notification is sent if the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemSendsGeometryChanges</a> flag is enabled, and when the item's local position changes, relative to its parent (i.e&#x2e;, as a result of calling <a href="qgraphicsitem.html#setPos">setPos</a>() or <a href="qgraphicsitem.html#moveBy">moveBy</a>()). The value argument is the new position (i.e&#x2e;, a <a href="qpointf.html">QPointF</a>). You can call <a href="qgraphicsitem.html#pos">pos</a>() to get the original position. Do not call <a href="qgraphicsitem.html#setPos">setPos</a>() or <a href="qgraphicsitem.html#moveBy">moveBy</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered; instead, you can return the new, adjusted position from <a href="qgraphicsitem.html#itemChange">itemChange</a>(). After this notification, <a href="qgraphicsitem.html">QGraphicsItem</a> immediately sends the ItemPositionHasChanged notification if the position changed.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemPositionHasChanged</tt></td><td align="center" valign="top"><tt>9</tt></td><td valign="top">The item's position has changed. This notification is sent if the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemSendsGeometryChanges</a> flag is enabled, and after the item's local position, relative to its parent, has changed. The value argument is the new position (the same as <a href="qgraphicsitem.html#pos">pos</a>()), and <a href="qgraphicsitem.html">QGraphicsItem</a> ignores the return value for this notification (i.e&#x2e;, a read-only notification).</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemTransformChange</tt></td><td align="center" valign="top"><tt>8</tt></td><td valign="top">The item's transformation matrix changes. This notification is send if the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemSendsGeometryChanges</a> flag is enabled, and when the item's local transformation matrix changes (i.e&#x2e;, as a result of calling <a href="qgraphicsitem.html#setTransform">setTransform</a>(). The value argument is the new matrix (i.e&#x2e;, a <a href="qtransform.html">QTransform</a>); to get the old matrix, call <a href="qgraphicsitem.html#transform">transform</a>(). Do not call <a href="qgraphicsitem.html#setTransform">setTransform</a>() or set any of the transformation properties in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered; instead, you can return the new matrix from <a href="qgraphicsitem.html#itemChange">itemChange</a>(). This notification is not sent if you change the transformation properties.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemTransformHasChanged</tt></td><td align="center" valign="top"><tt>10</tt></td><td valign="top">The item's transformation matrix has changed either because setTransform is called, or one of the transformation properties is changed. This notification is sent if the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemSendsGeometryChanges</a> flag is enabled, and after the item's local transformation matrix has changed. The value argument is the new matrix (same as <a href="qgraphicsitem.html#transform">transform</a>()), and <a href="qgraphicsitem.html">QGraphicsItem</a> ignores the return value for this notification (i.e&#x2e;, a read-only notification).</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemSelectedChange</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">The item's selected state changes. If the item is presently selected, it will become unselected, and vice verca. The value argument is the new selected state (i.e&#x2e;, true or false). Do not call <a href="qgraphicsitem.html#setSelected">setSelected</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered; instead, you can return the new selected state from <a href="qgraphicsitem.html#itemChange">itemChange</a>().</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemSelectedHasChanged</tt></td><td align="center" valign="top"><tt>14</tt></td><td valign="top">The item's selected state has changed. The value argument is the new selected state (i.e&#x2e;, true or false). Do not call <a href="qgraphicsitem.html#setSelected">setSelected</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered. The return value is ignored.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemVisibleChange</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The item's visible state changes. If the item is presently visible, it will become invisible, and vice verca. The value argument is the new visible state (i.e&#x2e;, true or false). Do not call <a href="qgraphicsitem.html#setVisible">setVisible</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered; instead, you can return the new visible state from <a href="qgraphicsitem.html#itemChange">itemChange</a>().</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemVisibleHasChanged</tt></td><td align="center" valign="top"><tt>12</tt></td><td valign="top">The item's visible state has changed. The value argument is the new visible state (i.e&#x2e;, true or false). Do not call <a href="qgraphicsitem.html#setVisible">setVisible</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered. The return value is ignored.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemParentChange</tt></td><td align="center" valign="top"><tt>5</tt></td><td valign="top">The item's parent changes. The value argument is the new parent item (i.e&#x2e;, a <a href="qgraphicsitem.html">QGraphicsItem</a> pointer). Do not call <a href="qgraphicsitem.html#setParentItem">setParentItem</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered; instead, you can return the new parent from <a href="qgraphicsitem.html#itemChange">itemChange</a>().</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemParentHasChanged</tt></td><td align="center" valign="top"><tt>15</tt></td><td valign="top">The item's parent has changed. The value argument is the new parent (i.e&#x2e;, a pointer to a <a href="qgraphicsitem.html">QGraphicsItem</a>). Do not call <a href="qgraphicsitem.html#setParentItem">setParentItem</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered. The return value is ignored.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemChildAddedChange</tt></td><td align="center" valign="top"><tt>6</tt></td><td valign="top">A child is added to this item. The value argument is the new child item (i.e&#x2e;, a <a href="qgraphicsitem.html">QGraphicsItem</a> pointer). Do not pass this item to any item's <a href="qgraphicsitem.html#setParentItem">setParentItem</a>() function as this notification is delivered. The return value is unused; you cannot adjust anything in this notification. Note that the new child might not be fully constructed when this notification is sent; calling pure virtual functions on the child can lead to a crash.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemChildRemovedChange</tt></td><td align="center" valign="top"><tt>7</tt></td><td valign="top">A child is removed from this item. The value argument is the child item that is about to be removed (i.e&#x2e;, a <a href="qgraphicsitem.html">QGraphicsItem</a> pointer). The return value is unused; you cannot adjust anything in this notification.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemSceneChange</tt></td><td align="center" valign="top"><tt>11</tt></td><td valign="top">The item is moved to a new scene. This notification is also sent when the item is added to its initial scene, and when it is removed. The value argument is the new scene (i.e&#x2e;, a <a href="qgraphicsscene.html">QGraphicsScene</a> pointer), or a null pointer if the item is removed from a scene. Do not override this change by passing this item to <a href="qgraphicsscene.html#addItem">QGraphicsScene::addItem</a>() as this notification is delivered; instead, you can return the new scene from <a href="qgraphicsitem.html#itemChange">itemChange</a>(). Use this feature with caution; objecting to a scene change can quickly lead to unwanted recursion.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemSceneHasChanged</tt></td><td align="center" valign="top"><tt>16</tt></td><td valign="top">The item's scene has changed. The value argument is the new scene (i.e&#x2e;, a pointer to a <a href="qgraphicsscene.html">QGraphicsScene</a>). Do not call setScene() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered. The return value is ignored.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemCursorChange</tt></td><td align="center" valign="top"><tt>17</tt></td><td valign="top">The item's cursor changes. The value argument is the new cursor (i.e&#x2e;, a <a href="qcursor.html">QCursor</a>). Do not call <a href="qgraphicsitem.html#setCursor">setCursor</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered. Instead, you can return a new cursor from <a href="qgraphicsitem.html#itemChange">itemChange</a>().</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemCursorHasChanged</tt></td><td align="center" valign="top"><tt>18</tt></td><td valign="top">The item's cursor has changed. The value argument is the new cursor (i.e&#x2e;, a <a href="qcursor.html">QCursor</a>). Do not call <a href="qgraphicsitem.html#setCursor">setCursor</a>() as this notification is delivered. The return value is ignored.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemToolTipChange</tt></td><td align="center" valign="top"><tt>19</tt></td><td valign="top">The item's tooltip changes. The value argument is the new tooltip (i.e&#x2e;, a <a href="qtooltip.html">QToolTip</a>). Do not call <a href="qgraphicsitem.html#setToolTip">setToolTip</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered. Instead, you can return a new tooltip from <a href="qgraphicsitem.html#itemChange">itemChange</a>().</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemToolTipHasChanged</tt></td><td align="center" valign="top"><tt>20</tt></td><td valign="top">The item's tooltip has changed. The value argument is the new tooltip (i.e&#x2e;, a <a href="qtooltip.html">QToolTip</a>). Do not call <a href="qgraphicsitem.html#setToolTip">setToolTip</a>() as this notification is delivered. The return value is ignored.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemFlagsChange</tt></td><td align="center" valign="top"><tt>21</tt></td><td valign="top">The item's flags change. The value argument is the new flags (i.e&#x2e;, a quint32). Do not call <a href="qgraphicsitem.html#setFlags">setFlags</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered. Instead, you can return the new flags from <a href="qgraphicsitem.html#itemChange">itemChange</a>().</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemFlagsHaveChanged</tt></td><td align="center" valign="top"><tt>22</tt></td><td valign="top">The item's flags have changed. The value argument is the new flags (i.e&#x2e;, a quint32). Do not call <a href="qgraphicsitem.html#setFlags">setFlags</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered. The return value is ignored.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemZValueChange</tt></td><td align="center" valign="top"><tt>23</tt></td><td valign="top">The item's Z-value changes. The value argument is the new Z-value (i.e&#x2e;, a double). Do not call <a href="qgraphicsitem.html#setZValue">setZValue</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered. Instead, you can return a new Z-value from <a href="qgraphicsitem.html#itemChange">itemChange</a>().</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemZValueHasChanged</tt></td><td align="center" valign="top"><tt>24</tt></td><td valign="top">The item's Z-value has changed. The value argument is the new Z-value (i.e&#x2e;, a double). Do not call <a href="qgraphicsitem.html#setZValue">setZValue</a>() as this notification is delivered. The return value is ignored.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemOpacityChange</tt></td><td align="center" valign="top"><tt>25</tt></td><td valign="top">The item's opacity changes. The value argument is the new opacity (i.e&#x2e;, a double). Do not call <a href="qgraphicsitem.html#setOpacity">setOpacity</a>() in <a href="qgraphicsitem.html#itemChange">itemChange</a>() as this notification is delivered. Instead, you can return a new opacity from <a href="qgraphicsitem.html#itemChange">itemChange</a>().</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemOpacityHasChanged</tt></td><td align="center" valign="top"><tt>26</tt></td><td valign="top">The item's opacity has changed. The value argument is the new opacity (i.e&#x2e;, a double). Do not call <a href="qgraphicsitem.html#setOpacity">setOpacity</a>() as this notification is delivered. The return value is ignored.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemScenePositionHasChanged</tt></td><td align="center" valign="top"><tt>27</tt></td><td valign="top">The item's scene position has changed. This notification is sent if the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemSendsScenePositionChanges</a> flag is enabled, and after the item's scene position has changed (i.e&#x2e;, the position or transformation of the item itself or the position or transformation of any ancestor has changed). The value argument is the new scene position (the same as <a href="qgraphicsitem.html#scenePos">scenePos</a>()), and <a href="qgraphicsitem.html">QGraphicsItem</a> ignores the return value for this notification (i.e&#x2e;, a read-only notification).</td></tr>
</table></p>
<a name="//apple_ref/cpp/tag/QGraphicsItem/GraphicsItemFlag"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemIsMovable"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemIsSelectable"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemIsFocusable"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemClipsToShape"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemClipsChildrenToShape"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemIgnoresTransformations"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemIgnoresParentOpacity"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemDoesntPropagateOpacityToChildren"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemStacksBehindParent"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemUsesExtendedStyleOption"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemHasNoContents"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemSendsGeometryChanges"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemAcceptsInputMethod"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemNegativeZStacksBehindParent"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemIsPanel"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemIsFocusScope"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/ItemSendsScenePositionChanges"></a>
<a name="//apple_ref/cpp/tdef/QGraphicsItem/GraphicsItemFlags"></a>
<h3 class="flags"><a name="GraphicsItemFlag-enum"></a>enum QGraphicsItem::GraphicsItemFlag<br />flags QGraphicsItem::GraphicsItemFlags</h3>
<p>This enum describes different flags that you can set on an item to toggle different features in the item's behavior.</p>
<p>All flags are disabled by default.</p>
<p><table class="valuelist" 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>QGraphicsItem::ItemIsMovable</tt></td><td align="center" valign="top"><tt>0x1</tt></td><td valign="top">The item supports interactive movement using the mouse. By clicking on the item and then dragging, the item will move together with the mouse cursor. If the item has children, all children are also moved. If the item is part of a selection, all selected items are also moved. This feature is provided as a convenience through the base implementation of <a href="qgraphicsitem.html">QGraphicsItem</a>'s mouse event handlers.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemIsSelectable</tt></td><td align="center" valign="top"><tt>0x2</tt></td><td valign="top">The item supports selection. Enabling this feature will enable <a href="qgraphicsitem.html#setSelected">setSelected</a>() to toggle selection for the item. It will also let the item be selected automatically as a result of calling <a href="qgraphicsscene.html#setSelectionArea">QGraphicsScene::setSelectionArea</a>(), by clicking on an item, or by using rubber band selection in <a href="qgraphicsview.html">QGraphicsView</a>.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemIsFocusable</tt></td><td align="center" valign="top"><tt>0x4</tt></td><td valign="top">The item supports keyboard input focus (i.e&#x2e;, it is an input item). Enabling this flag will allow the item to accept focus, which again allows the delivery of key events to <a href="qgraphicsitem.html#keyPressEvent">QGraphicsItem::keyPressEvent</a>() and <a href="qgraphicsitem.html#keyReleaseEvent">QGraphicsItem::keyReleaseEvent</a>().</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemClipsToShape</tt></td><td align="center" valign="top"><tt>0x8</tt></td><td valign="top">The item clips to its own shape. The item cannot draw or receive mouse, tablet, drag and drop or hover events outside its shape. It is disabled by default. This behavior is enforced by <a href="qgraphicsview-obsolete.html#drawItems" class="obsolete">QGraphicsView::drawItems</a>() or <a href="qgraphicsscene-obsolete.html#drawItems" class="obsolete">QGraphicsScene::drawItems</a>(). This flag was introduced in Qt 4.3&#x2e;</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemClipsChildrenToShape</tt></td><td align="center" valign="top"><tt>0x10</tt></td><td valign="top">The item clips the painting of all its descendants to its own shape. Items that are either direct or indirect children of this item cannot draw outside this item's shape. By default, this flag is disabled; children can draw anywhere. This behavior is enforced by <a href="qgraphicsview-obsolete.html#drawItems" class="obsolete">QGraphicsView::drawItems</a>() or <a href="qgraphicsscene-obsolete.html#drawItems" class="obsolete">QGraphicsScene::drawItems</a>(). This flag was introduced in Qt 4.3&#x2e;</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemIgnoresTransformations</tt></td><td align="center" valign="top"><tt>0x20</tt></td><td valign="top">The item ignores inherited transformations (i.e&#x2e;, its position is still anchored to its parent, but the parent or view rotation, zoom or shear transformations are ignored). This flag is useful for keeping text label items horizontal and unscaled, so they will still be readable if the view is transformed. When set, the item's view geometry and scene geometry will be maintained separately. You must call <a href="qgraphicsitem.html#deviceTransform">deviceTransform</a>() to map coordinates and detect collisions in the view. By default, this flag is disabled. This flag was introduced in Qt 4.3&#x2e; <b>Note:</b> With this flag set you can still scale the item itself, and that scale transformation will influence the item's children.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemIgnoresParentOpacity</tt></td><td align="center" valign="top"><tt>0x40</tt></td><td valign="top">The item ignores its parent's opacity. The item's effective opacity is the same as its own; it does not combine with the parent's opacity. This flags allows your item to keep its absolute opacity even if the parent is semitransparent. This flag was introduced in Qt 4.5&#x2e;</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemDoesntPropagateOpacityToChildren</tt></td><td align="center" valign="top"><tt>0x80</tt></td><td valign="top">The item doesn't propagate its opacity to its children. This flag allows you to create a semitransparent item that does not affect the opacity of its children. This flag was introduced in Qt 4.5&#x2e;</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemStacksBehindParent</tt></td><td align="center" valign="top"><tt>0x100</tt></td><td valign="top">The item is stacked behind its parent. By default, child items are stacked on top of the parent item. But setting this flag, the child will be stacked behind it. This flag is useful for drop shadow effects and for decoration objects that follow the parent item's geometry without drawing on top of it. This flag was introduced in Qt 4.5&#x2e;</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemUsesExtendedStyleOption</tt></td><td align="center" valign="top"><tt>0x200</tt></td><td valign="top">The item makes use of either <a href="qstyleoptiongraphicsitem.html#exposedRect-var">exposedRect</a> or <a href="qstyleoptiongraphicsitem-obsolete.html#matrix-var" class="obsolete">matrix<sup>(obsolete)</sup></a> in <a href="qstyleoptiongraphicsitem.html">QStyleOptionGraphicsItem</a>. By default, the <a href="qstyleoptiongraphicsitem.html#exposedRect-var">exposedRect</a> is initialized to the item's <a href="qgraphicsitem.html#boundingRect">boundingRect</a>() and the <a href="qstyleoptiongraphicsitem-obsolete.html#matrix-var" class="obsolete">matrix<sup>(obsolete)</sup></a> is untransformed. You can enable this flag for the style options to be set up with more fine-grained values. Note that <a href="qstyleoptiongraphicsitem-obsolete.html#levelOfDetail-var" class="obsolete">QStyleOptionGraphicsItem::levelOfDetail<sup>(obsolete)</sup></a> is unaffected by this flag and always initialized to 1. Use <a href="qstyleoptiongraphicsitem.html#levelOfDetailFromTransform">QStyleOptionGraphicsItem::levelOfDetailFromTransform</a>() if you need a higher value. This flag was introduced in Qt 4.6&#x2e;</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemHasNoContents</tt></td><td align="center" valign="top"><tt>0x400</tt></td><td valign="top">The item does not paint anything (i.e&#x2e;, calling <a href="qgraphicsitem.html#paint">paint</a>() on the item has no effect). You should set this flag on items that do not need to be painted to ensure that Graphics View avoids unnecessary painting preparations. This flag was introduced in Qt 4.6&#x2e;</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemSendsGeometryChanges</tt></td><td align="center" valign="top"><tt>0x800</tt></td><td valign="top">The item enables <a href="qgraphicsitem.html#itemChange">itemChange</a>() notifications for <a href="qgraphicsitem.html#GraphicsItemChange-enum">ItemPositionChange</a>, <a href="qgraphicsitem.html#GraphicsItemChange-enum">ItemPositionHasChanged</a>, <a href="qgraphicsitem.html#GraphicsItemChange-enum">ItemMatrixChange</a>, <a href="qgraphicsitem.html#GraphicsItemChange-enum">ItemTransformChange</a>, and <a href="qgraphicsitem.html#GraphicsItemChange-enum">ItemTransformHasChanged</a>. For performance reasons, these notifications are disabled by default. You must enable this flag to receive notifications for position and transform changes. This flag was introduced in Qt 4.6&#x2e;</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemAcceptsInputMethod</tt></td><td align="center" valign="top"><tt>0x1000</tt></td><td valign="top">The item supports input methods typically used for Asian languages. This flag was introduced in Qt 4.6&#x2e;</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemNegativeZStacksBehindParent</tt></td><td align="center" valign="top"><tt>0x2000</tt></td><td valign="top">The item automatically stacks behind it's parent if it's z-value is negative. This flag enables <a href="qgraphicsitem.html#setZValue">setZValue</a>() to toggle ItemStacksBehindParent. This flag was introduced in Qt 4.6&#x2e;</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemIsPanel</tt></td><td align="center" valign="top"><tt>0x4000</tt></td><td valign="top">The item is a panel. A panel provides activation and contained focus handling. Only one panel can be active at a time (see <a href="qgraphicsitem.html#isActive">QGraphicsItem::isActive</a>()). When no panel is active, <a href="qgraphicsscene.html">QGraphicsScene</a> activates all non-panel items. Window items (i.e&#x2e;, <a href="qgraphicsitem.html#isWindow">QGraphicsItem::isWindow</a>() returns true) are panels. This flag was introduced in Qt 4.6&#x2e;</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::ItemSendsScenePositionChanges</tt></td><td align="center" valign="top"><tt>0x10000</tt></td><td valign="top">The item enables <a href="qgraphicsitem.html#itemChange">itemChange</a>() notifications for <a href="qgraphicsitem.html#GraphicsItemChange-enum">ItemScenePositionHasChanged</a>. For performance reasons, these notifications are disabled by default. You must enable this flag to receive notifications for scene position changes. This flag was introduced in Qt 4.6&#x2e;</td></tr>
</table></p>
<p>The GraphicsItemFlags type is a typedef for <a href="qflags.html">QFlags</a>&lt;GraphicsItemFlag&gt;. It stores an OR combination of GraphicsItemFlag values.</p>
<a name="//apple_ref/cpp/tag/QGraphicsItem/PanelModality"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/NonModal"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/PanelModal"></a>
<a name="//apple_ref/cpp/econst/QGraphicsItem/SceneModal"></a>
<h3 class="fn"><a name="PanelModality-enum"></a>enum QGraphicsItem::PanelModality</h3>
<p>This enum specifies the behavior of a modal panel. A modal panel is one that blocks input to other panels. Note that items that are children of a modal panel are not blocked.</p>
<p>The values are:</p>
<p><table class="valuelist" 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>QGraphicsItem::NonModal</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The panel is not modal and does not block input to other panels. This is the default value for panels.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::PanelModal</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The panel is modal to a single item hierarchy and blocks input to its parent pane, all grandparent panels, and all siblings of its parent and grandparent panels.</td></tr>
<tr><td valign="top"><tt>QGraphicsItem::SceneModal</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The window is modal to the entire scene and blocks input to all panels.</td></tr>
</table></p>
<p>This enum was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#setPanelModality">QGraphicsItem::setPanelModality</a>(), <a href="qgraphicsitem.html#panelModality">QGraphicsItem::panelModality</a>(), and <a href="qgraphicsitem.html#GraphicsItemFlag-enum">QGraphicsItem::ItemIsPanel</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<a name="//apple_ref/cpp/instm/QGraphicsItem/QGraphicsItem"></a>
<h3 class="fn"><a name="QGraphicsItem"></a>QGraphicsItem::QGraphicsItem ( QGraphicsItem * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qgraphicsitem.html">QGraphicsItem</a> with the given <i>parent</i> item. It does not modify the parent object returned by <a href="qobject.html#parent">QObject::parent</a>().</p>
<p>If <i>parent</i> is 0, you can add the item to a scene by calling <a href="qgraphicsscene.html#addItem">QGraphicsScene::addItem</a>(). The item will then become a top-level item.</p>
<p>See also <a href="qgraphicsscene.html#addItem">QGraphicsScene::addItem</a>() and <a href="qgraphicsitem.html#setParentItem">setParentItem</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/~QGraphicsItem"></a>
<h3 class="fn"><a name="dtor.QGraphicsItem"></a>QGraphicsItem::~QGraphicsItem ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Destroys the <a href="qgraphicsitem.html">QGraphicsItem</a> and all its children. If this item is currently associated with a scene, the item will be removed from the scene before it is deleted.</p>
<p><b>Note:</b> It is more efficient to remove the item from the <a href="qgraphicsscene.html">QGraphicsScene</a> before destroying the item.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/acceptDrops"></a>
<h3 class="fn"><a name="acceptDrops"></a>bool QGraphicsItem::acceptDrops () const</h3>
<p>Returns true if this item can accept drag and drop events; otherwise, returns false. By default, items do not accept drag and drop events; items are transparent to drag and drop.</p>
<p>See also <a href="qgraphicsitem.html#setAcceptDrops">setAcceptDrops</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/acceptHoverEvents"></a>
<h3 class="fn"><a name="acceptHoverEvents"></a>bool QGraphicsItem::acceptHoverEvents () const</h3>
<p>Returns true if an item accepts hover events (<a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a>); otherwise, returns false. By default, items do not accept hover events.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#setAcceptHoverEvents">setAcceptHoverEvents</a>() and <a href="qgraphicsitem.html#setAcceptedMouseButtons">setAcceptedMouseButtons</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/acceptTouchEvents"></a>
<h3 class="fn"><a name="acceptTouchEvents"></a>bool QGraphicsItem::acceptTouchEvents () const</h3>
<p>Returns true if an item accepts <a href="qtouchevent.html">touch events</a>; otherwise, returns false. By default, items do not accept touch events.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#setAcceptTouchEvents">setAcceptTouchEvents</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/acceptedMouseButtons"></a>
<h3 class="fn"><a name="acceptedMouseButtons"></a><a href="qt.html#MouseButton-enum">Qt::MouseButtons</a> QGraphicsItem::acceptedMouseButtons () const</h3>
<p>Returns the mouse buttons that this item accepts mouse events for. By default, all mouse buttons are accepted.</p>
<p>If an item accepts a mouse button, it will become the mouse grabber item when a mouse press event is delivered for that mouse button. However, if the item does not accept the button, <a href="qgraphicsscene.html">QGraphicsScene</a> will forward the mouse events to the first item beneath it that does.</p>
<p>See also <a href="qgraphicsitem.html#setAcceptedMouseButtons">setAcceptedMouseButtons</a>() and <a href="qgraphicsitem.html#mousePressEvent">mousePressEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/advance"></a>
<h3 class="fn"><a name="advance"></a>void QGraphicsItem::advance ( int <i>phase</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>This virtual function is called twice for all items by the <a href="qgraphicsscene.html#advance">QGraphicsScene::advance</a>() slot. In the first phase, all items are called with <i>phase</i> == 0, indicating that items on the scene are about to advance, and then all items are called with <i>phase</i> == 1. Reimplement this function to update your item if you need simple scene-controlled animation.</p>
<p>The default implementation does nothing.</p>
<p>For individual item animation, an alternative to this function is to either use <a href="qgraphicsitemanimation.html">QGraphicsItemAnimation</a>, or to multiple-inherit from <a href="qobject.html">QObject</a> and <a href="qgraphicsitem.html">QGraphicsItem</a>, and animate your item using <a href="qobject.html#startTimer">QObject::startTimer</a>() and <a href="qobject.html#timerEvent">QObject::timerEvent</a>().</p>
<p>See also <a href="qgraphicsitemanimation.html">QGraphicsItemAnimation</a> and <a href="qtimeline.html">QTimeLine</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/boundingRect"></a>
<h3 class="fn"><a name="boundingRect"></a><a href="qrectf.html">QRectF</a> QGraphicsItem::boundingRect () const&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
<p>This pure virtual function defines the outer bounds of the item as a rectangle; all painting must be restricted to inside an item's bounding rect. <a href="qgraphicsview.html">QGraphicsView</a> uses this to determine whether the item requires redrawing.</p>
<p>Although the item's shape can be arbitrary, the bounding rect is always rectangular, and it is unaffected by the items' transformation.</p>
<p>If you want to change the item's bounding rectangle, you must first call <a href="qgraphicsitem.html#prepareGeometryChange">prepareGeometryChange</a>(). This notifies the scene of the imminent change, so that its can update its item geometry index; otherwise, the scene will be unaware of the item's new geometry, and the results are undefined (typically, rendering artifacts are left around in the view).</p>
<p>Reimplement this function to let <a href="qgraphicsview.html">QGraphicsView</a> determine what parts of the widget, if any, need to be redrawn.</p>
<p>Note: For shapes that paint an outline / stroke, it is important to include half the pen width in the bounding rect. It is not necessary to compensate for antialiasing, though.</p>
<p>Example:</p>
<pre> QRectF CircleItem::boundingRect() const
 {
     qreal penWidth = 1;
     return QRectF(-radius - penWidth / 2, -radius - penWidth / 2,
                   diameter + penWidth, diameter + penWidth);
 }</pre>
<p>See also <a href="qgraphicsitem.html#boundingRegion">boundingRegion</a>(), <a href="qgraphicsitem.html#shape">shape</a>(), <a href="qgraphicsitem.html#contains">contains</a>(), <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>, and <a href="qgraphicsitem.html#prepareGeometryChange">prepareGeometryChange</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/boundingRegion"></a>
<h3 class="fn"><a name="boundingRegion"></a><a href="qregion.html">QRegion</a> QGraphicsItem::boundingRegion ( const <a href="qtransform.html">QTransform</a> &amp; <i>itemToDeviceTransform</i> ) const</h3>
<p>Returns the bounding region for this item. The coordinate space of the returned region depends on <i>itemToDeviceTransform</i>. If you pass an identity <a href="qtransform.html">QTransform</a> as a parameter, this function will return a local coordinate region.</p>
<p>The bounding region describes a coarse outline of the item's visual contents. Although it's expensive to calculate, it's also more precise than <a href="qgraphicsitem.html#boundingRect">boundingRect</a>(), and it can help to avoid unnecessary repainting when an item is updated. This is particularily efficient for thin items (e.g&#x2e;, lines or simple polygons). You can tune the granularity for the bounding region by calling <a href="qgraphicsitem.html#setBoundingRegionGranularity">setBoundingRegionGranularity</a>(). The default granularity is 0; in which the item's bounding region is the same as its bounding rect.</p>
<p><i>itemToDeviceTransform</i> is the transformation from item coordinates to device coordinates. If you want this function to return a <a href="qregion.html">QRegion</a> in scene coordinates, you can pass <a href="qgraphicsitem.html#sceneTransform">sceneTransform</a>() as an argument.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#boundingRegionGranularity">boundingRegionGranularity</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/boundingRegionGranularity"></a>
<h3 class="fn"><a name="boundingRegionGranularity"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QGraphicsItem::boundingRegionGranularity () const</h3>
<p>Returns the item's bounding region granularity; a value between and including 0 and 1. The default value is 0 (i.e&#x2e;, the lowest granularity, where the bounding region corresponds to the item's bounding rectangle).</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#setBoundingRegionGranularity">setBoundingRegionGranularity</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/cacheMode"></a>
<h3 class="fn"><a name="cacheMode"></a><a href="qgraphicsitem.html#CacheMode-enum">CacheMode</a> QGraphicsItem::cacheMode () const</h3>
<p>Returns the cache mode for this item. The default mode is <a href="qgraphicsitem.html#CacheMode-enum">NoCache</a> (i.e&#x2e;, cache is disabled and all painting is immediate).</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#setCacheMode">setCacheMode</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/childItems"></a>
<h3 class="fn"><a name="childItems"></a><a href="qlist.html">QList</a>&lt;QGraphicsItem *&gt; QGraphicsItem::childItems () const</h3>
<p>Returns a list of this item's children.</p>
<p>The items are sorted by stacking order. This takes into account both the items' insertion order and their Z-values.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#setParentItem">setParentItem</a>(), <a href="qgraphicsitem.html#zValue">zValue</a>(), and <a href="qgraphicsitem.html#sorting">Sorting</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/childrenBoundingRect"></a>
<h3 class="fn"><a name="childrenBoundingRect"></a><a href="qrectf.html">QRectF</a> QGraphicsItem::childrenBoundingRect () const</h3>
<p>Returns the bounding rect of this item's descendants (i.e&#x2e;, its children, their children, etc.) in local coordinates. The rectangle will contain all descendants after they have been mapped to local coordinates. If the item has no children, this function returns an empty <a href="qrectf.html">QRectF</a>.</p>
<p>This does not include this item's own bounding rect; it only returns its descendants' accumulated bounding rect. If you need to include this item's bounding rect, you can add <a href="qgraphicsitem.html#boundingRect">boundingRect</a>() to childrenBoundingRect() using QRectF::operator|().</p>
<p>This function is linear in complexity; it determines the size of the returned bounding rect by iterating through all descendants.</p>
<p>See also <a href="qgraphicsitem.html#boundingRect">boundingRect</a>() and <a href="qgraphicsitem.html#sceneBoundingRect">sceneBoundingRect</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/clearFocus"></a>
<h3 class="fn"><a name="clearFocus"></a>void QGraphicsItem::clearFocus ()</h3>
<p>Takes keyboard input focus from the item.</p>
<p>If it has focus, a <a href="qgraphicsitem.html#focusOutEvent">focus out event</a> is sent to this item to tell it that it is about to lose the focus.</p>
<p>Only items that set the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsFocusable</a> flag, or widgets that set an appropriate focus policy, can accept keyboard focus.</p>
<p>See also <a href="qgraphicsitem.html#setFocus">setFocus</a>(), <a href="qgraphicsitem.html#hasFocus">hasFocus</a>(), and <a href="qgraphicswidget.html#focusPolicy-prop">QGraphicsWidget::focusPolicy</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/clipPath"></a>
<h3 class="fn"><a name="clipPath"></a><a href="qpainterpath.html">QPainterPath</a> QGraphicsItem::clipPath () const</h3>
<p>Returns this item's clip path, or an empty <a href="qpainterpath.html">QPainterPath</a> if this item is not clipped. The clip path constrains the item's appearance and interaction (i.e&#x2e;, restricts the area the item can draw, and it also restricts the area that the item receives events).</p>
<p>You can enable clipping by setting the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemClipsToShape</a> or <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemClipsChildrenToShape</a> flags. The item's clip path is calculated by intersecting all clipping ancestors' shapes. If the item sets <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemClipsToShape</a>, the final clip is intersected with the item's own shape.</p>
<p><b>Note:</b> Clipping introduces a performance penalty for all items involved; you should generally avoid using clipping if you can (e.g&#x2e;, if your items always draw inside <a href="qgraphicsitem.html#boundingRect">boundingRect</a>() or <a href="qgraphicsitem.html#shape">shape</a>() boundaries, clipping is not necessary).</p>
<p>This function was introduced in Qt 4.5.</p>
<p>See also <a href="qgraphicsitem.html#isClipped">isClipped</a>(), <a href="qgraphicsitem.html#shape">shape</a>(), and <a href="qgraphicsitem.html#setFlags">setFlags</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/collidesWithItem"></a>
<h3 class="fn"><a name="collidesWithItem"></a>bool QGraphicsItem::collidesWithItem ( const QGraphicsItem * <i>other</i>, <a href="qt.html#ItemSelectionMode-enum">Qt::ItemSelectionMode</a> <i>mode</i> = Qt::IntersectsItemShape ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns true if this item collides with <i>other</i>; otherwise returns false.</p>
<p>The <i>mode</i> is applied to <i>other</i>, and the resulting shape or bounding rectangle is then compared to this item's shape. The default value for <i>mode</i> is <a href="qt.html#ItemSelectionMode-enum">Qt::IntersectsItemShape</a>; <i>other</i> collides with this item if it either intersects, contains, or is contained by this item's shape (see <a href="qt.html#ItemSelectionMode-enum">Qt::ItemSelectionMode</a> for details).</p>
<p>The default implementation is based on shape intersection, and it calls <a href="qgraphicsitem.html#shape">shape</a>() on both items. Because the complexity of arbitrary shape-shape intersection grows with an order of magnitude when the shapes are complex, this operation can be noticably time consuming. You have the option of reimplementing this function in a subclass of <a href="qgraphicsitem.html">QGraphicsItem</a> to provide a custom algorithm. This allows you to make use of natural constraints in the shapes of your own items, in order to improve the performance of the collision detection. For instance, two untransformed perfectly circular items' collision can be determined very efficiently by comparing their positions and radii.</p>
<p>Keep in mind that when reimplementing this function and calling <a href="qgraphicsitem.html#shape">shape</a>() or <a href="qgraphicsitem.html#boundingRect">boundingRect</a>() on <i>other</i>, the returned coordinates must be mapped to this item's coordinate system before any intersection can take place.</p>
<p>See also <a href="qgraphicsitem.html#contains">contains</a>() and <a href="qgraphicsitem.html#shape">shape</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/collidesWithPath"></a>
<h3 class="fn"><a name="collidesWithPath"></a>bool QGraphicsItem::collidesWithPath ( const <a href="qpainterpath.html">QPainterPath</a> &amp; <i>path</i>, <a href="qt.html#ItemSelectionMode-enum">Qt::ItemSelectionMode</a> <i>mode</i> = Qt::IntersectsItemShape ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns true if this item collides with <i>path</i>.</p>
<p>The collision is determined by <i>mode</i>. The default value for <i>mode</i> is <a href="qt.html#ItemSelectionMode-enum">Qt::IntersectsItemShape</a>; <i>path</i> collides with this item if it either intersects, contains, or is contained by this item's shape.</p>
<p>Note that this function checks whether the item's shape or bounding rectangle (depending on <i>mode</i>) is contained within <i>path</i>, and not whether <i>path</i> is contained within the items shape or bounding rectangle.</p>
<p>See also <a href="qgraphicsitem.html#collidesWithItem">collidesWithItem</a>(), <a href="qgraphicsitem.html#contains">contains</a>(), and <a href="qgraphicsitem.html#shape">shape</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/collidingItems"></a>
<h3 class="fn"><a name="collidingItems"></a><a href="qlist.html">QList</a>&lt;QGraphicsItem *&gt; QGraphicsItem::collidingItems ( <a href="qt.html#ItemSelectionMode-enum">Qt::ItemSelectionMode</a> <i>mode</i> = Qt::IntersectsItemShape ) const</h3>
<p>Returns a list of all items that collide with this item.</p>
<p>The way collisions are detected is determined by applying <i>mode</i> to items that are compared to this item, i.e&#x2e;, each item's shape or bounding rectangle is checked against this item's shape. The default value for <i>mode</i> is <a href="qt.html#ItemSelectionMode-enum">Qt::IntersectsItemShape</a>.</p>
<p>See also <a href="qgraphicsitem.html#collidesWithItem">collidesWithItem</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/commonAncestorItem"></a>
<h3 class="fn"><a name="commonAncestorItem"></a>QGraphicsItem * QGraphicsItem::commonAncestorItem ( const QGraphicsItem * <i>other</i> ) const</h3>
<p>Returns the closest common ancestor item of this item and <i>other</i>, or 0 if either <i>other</i> is 0, or there is no common ancestor.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#isAncestorOf">isAncestorOf</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/contains"></a>
<h3 class="fn"><a name="contains"></a>bool QGraphicsItem::contains ( const <a href="qpointf.html">QPointF</a> &amp; <i>point</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns true if this item contains <i>point</i>, which is in local coordinates; otherwise, false is returned. It is most often called from <a href="qgraphicsview.html">QGraphicsView</a> to determine what item is under the cursor, and for that reason, the implementation of this function should be as light-weight as possible.</p>
<p>By default, this function calls <a href="qgraphicsitem.html#shape">shape</a>(), but you can reimplement it in a subclass to provide a (perhaps more efficient) implementation.</p>
<p>See also <a href="qgraphicsitem.html#shape">shape</a>(), <a href="qgraphicsitem.html#boundingRect">boundingRect</a>(), and <a href="qgraphicsitem.html#collidesWithPath">collidesWithPath</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/contextMenuEvent"></a>
<h3 class="fn"><a name="contextMenuEvent"></a>void QGraphicsItem::contextMenuEvent ( <a href="qgraphicsscenecontextmenuevent.html">QGraphicsSceneContextMenuEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to process context menu events. The <i>event</i> parameter contains details about the event to be handled.</p>
<p>If you ignore the event, (i.e&#x2e;, by calling <a href="qevent.html#ignore">QEvent::ignore</a>(),) <i>event</i> will propagate to any item beneath this item. If no items accept the event, it will be ignored by the scene, and propagate to the view.</p>
<p>It's common to open a <a href="qmenu.html">QMenu</a> in response to receiving a context menu event. Example:</p>
<pre> void CustomItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
 {
     QMenu menu;
     QAction *removeAction = menu.addAction(&quot;Remove&quot;);
     QAction *markAction = menu.addAction(&quot;Mark&quot;);
     QAction *selectedAction = menu.exec(event-&gt;screenPos());
     <span class="comment">// ...</span>
 }</pre>
<p>The default implementation ignores the event.</p>
<p>See also <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/cursor"></a>
<h3 class="fn"><a name="cursor"></a><a href="qcursor.html">QCursor</a> QGraphicsItem::cursor () const</h3>
<p>Returns the current cursor shape for the item. The mouse cursor will assume this shape when it's over this item. See the <a href="qt.html#CursorShape-enum">list of predefined cursor objects</a> for a range of useful shapes.</p>
<p>An editor item might want to use an I-beam cursor:</p>
<pre> item-&gt;setCursor(Qt::IBeamCursor);</pre>
<p>If no cursor has been set, the parent's cursor is used.</p>
<p>See also <a href="qgraphicsitem.html#setCursor">setCursor</a>(), <a href="qgraphicsitem.html#hasCursor">hasCursor</a>(), <a href="qgraphicsitem.html#unsetCursor">unsetCursor</a>(), <a href="qwidget.html#cursor-prop">QWidget::cursor</a>, and <a href="qapplication.html#overrideCursor">QApplication::overrideCursor</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/data"></a>
<h3 class="fn"><a name="data"></a><a href="qvariant.html">QVariant</a> QGraphicsItem::data ( int <i>key</i> ) const</h3>
<p>Returns this item's custom data for the key <i>key</i> as a <a href="qvariant.html">QVariant</a>.</p>
<p>Custom item data is useful for storing arbitrary properties in any item. Example:</p>
<pre> static const int ObjectName = 0;

 QGraphicsItem *item = scene.itemAt(100, 50);
 if (item-&gt;data(ObjectName).toString().isEmpty()) {
     if (qgraphicsitem_cast&lt;ButtonItem *&gt;(item))
         item-&gt;setData(ObjectName, &quot;Button&quot;);
 }</pre>
<p>Qt does not use this feature for storing data; it is provided solely for the convenience of the user.</p>
<p>See also <a href="qgraphicsitem.html#setData">setData</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/deviceTransform"></a>
<h3 class="fn"><a name="deviceTransform"></a><a href="qtransform.html">QTransform</a> QGraphicsItem::deviceTransform ( const <a href="qtransform.html">QTransform</a> &amp; <i>viewportTransform</i> ) const</h3>
<p>Returns this item's device transformation matrix, using <i>viewportTransform</i> to map from scene to device coordinates. This matrix can be used to map coordinates and geometrical shapes from this item's local coordinate system to the viewport's (or any device's) coordinate system. To map coordinates from the viewport, you must first invert the returned matrix.</p>
<p>Example:</p>
<pre> QGraphicsRectItem rect;
 rect.setPos(100, 100);

 rect.deviceTransform(view-&gt;viewportTransform()).map(QPointF(0, 0));
<span class="comment"> // returns the item's (0, 0) point in view's viewport coordinates</span>

 rect.deviceTransform(view-&gt;viewportTransform()).inverted().map(QPointF(100, 100));
<span class="comment"> // returns view's viewport's (100, 100) coordinate in item coordinates</span></pre>
<p>This function is the same as combining this item's scene transform with the view's viewport transform, but it also understands the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIgnoresTransformations</a> flag. The device transform can be used to do accurate coordinate mapping (and collision detection) for untransformable items.</p>
<p>This function was introduced in Qt 4.3.</p>
<p>See also <a href="qgraphicsitem.html#transform">transform</a>(), <a href="qgraphicsitem.html#setTransform">setTransform</a>(), <a href="qgraphicsitem.html#scenePos">scenePos</a>(), <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>, and <a href="qgraphicsitem.html#itemTransform">itemTransform</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/dragEnterEvent"></a>
<h3 class="fn"><a name="dragEnterEvent"></a>void QGraphicsItem::dragEnterEvent ( <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive drag enter events for this item. Drag enter events are generated as the cursor enters the item's area.</p>
<p>By accepting the event, (i.e&#x2e;, by calling <a href="qevent.html#accept">QEvent::accept</a>(),) the item will accept drop events, in addition to receiving drag move and drag leave. Otherwise, the event will be ignored and propagate to the item beneath. If the event is accepted, the item will receive a drag move event before control goes back to the event loop.</p>
<p>A common implementation of dragEnterEvent accepts or ignores <i>event</i> depending on the associated mime data in <i>event</i>. Example:</p>
<pre> CustomItem::CustomItem()
 {
     setAcceptDrops(true);
     ...
 }

 void CustomItem::dragEnterEvent(QGraphicsSceneDragDropEvent *event)
 {
     event-&gt;setAccepted(event-&gt;mimeData()-&gt;hasFormat(&quot;text/plain&quot;));
 }</pre>
<p>Items do not receive drag and drop events by default; to enable this feature, call <tt>setAcceptDrops(true)</tt>.</p>
<p>The default implementation does nothing.</p>
<p>See also <a href="qgraphicsitem.html#dropEvent">dropEvent</a>(), <a href="qgraphicsitem.html#dragMoveEvent">dragMoveEvent</a>(), and <a href="qgraphicsitem.html#dragLeaveEvent">dragLeaveEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/dragLeaveEvent"></a>
<h3 class="fn"><a name="dragLeaveEvent"></a>void QGraphicsItem::dragLeaveEvent ( <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive drag leave events for this item. Drag leave events are generated as the cursor leaves the item's area. Most often you will not need to reimplement this function, but it can be useful for resetting state in your item (e.g&#x2e;, highlighting).</p>
<p>Calling <a href="qevent.html#ignore">QEvent::ignore</a>() or <a href="qevent.html#accept">QEvent::accept</a>() on <i>event</i> has no effect.</p>
<p>Items do not receive drag and drop events by default; to enable this feature, call <tt>setAcceptDrops(true)</tt>.</p>
<p>The default implementation does nothing.</p>
<p>See also <a href="qgraphicsitem.html#dragEnterEvent">dragEnterEvent</a>(), <a href="qgraphicsitem.html#dropEvent">dropEvent</a>(), and <a href="qgraphicsitem.html#dragMoveEvent">dragMoveEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/dragMoveEvent"></a>
<h3 class="fn"><a name="dragMoveEvent"></a>void QGraphicsItem::dragMoveEvent ( <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive drag move events for this item. Drag move events are generated as the cursor moves around inside the item's area. Most often you will not need to reimplement this function; it is used to indicate that only parts of the item can accept drops.</p>
<p>Calling <a href="qevent.html#ignore">QEvent::ignore</a>() or <a href="qevent.html#accept">QEvent::accept</a>() on <i>event</i> toggles whether or not the item will accept drops at the position from the event. By default, <i>event</i> is accepted, indicating that the item allows drops at the specified position.</p>
<p>Items do not receive drag and drop events by default; to enable this feature, call <tt>setAcceptDrops(true)</tt>.</p>
<p>The default implementation does nothing.</p>
<p>See also <a href="qgraphicsitem.html#dropEvent">dropEvent</a>(), <a href="qgraphicsitem.html#dragEnterEvent">dragEnterEvent</a>(), and <a href="qgraphicsitem.html#dragLeaveEvent">dragLeaveEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/dropEvent"></a>
<h3 class="fn"><a name="dropEvent"></a>void QGraphicsItem::dropEvent ( <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive drop events for this item. Items can only receive drop events if the last drag move event was accepted.</p>
<p>Calling <a href="qevent.html#ignore">QEvent::ignore</a>() or <a href="qevent.html#accept">QEvent::accept</a>() on <i>event</i> has no effect.</p>
<p>Items do not receive drag and drop events by default; to enable this feature, call <tt>setAcceptDrops(true)</tt>.</p>
<p>The default implementation does nothing.</p>
<p>See also <a href="qgraphicsitem.html#dragEnterEvent">dragEnterEvent</a>(), <a href="qgraphicsitem.html#dragMoveEvent">dragMoveEvent</a>(), and <a href="qgraphicsitem.html#dragLeaveEvent">dragLeaveEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/effectiveOpacity"></a>
<h3 class="fn"><a name="effectiveOpacity"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QGraphicsItem::effectiveOpacity () const</h3>
<p>Returns this item's <i>effective</i> opacity, which is between 0.0 (transparent) and 1.0 (opaque). This value is a combination of this item's local opacity, and its parent and ancestors' opacities. The effective opacity decides how the item is rendered.</p>
<p>This function was introduced in Qt 4.5.</p>
<p>See also <a href="qgraphicsitem.html#opacity">opacity</a>(), <a href="qgraphicsitem.html#setOpacity">setOpacity</a>(), <a href="qgraphicsitem.html#paint">paint</a>(), <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIgnoresParentOpacity</a>, and <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemDoesntPropagateOpacityToChildren</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/ensureVisible"></a>
<h3 class="fn"><a name="ensureVisible"></a>void QGraphicsItem::ensureVisible ( const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> = QRectF(), int <i>xmargin</i> = 50, int <i>ymargin</i> = 50 )</h3>
<p>If this item is part of a scene that is viewed by a <a href="qgraphicsview.html">QGraphicsView</a>, this convenience function will attempt to scroll the view to ensure that <i>rect</i> is visible inside the view's viewport. If <i>rect</i> is a null rect (the default), <a href="qgraphicsitem.html">QGraphicsItem</a> will default to the item's bounding rect. <i>xmargin</i> and <i>ymargin</i> are the number of pixels the view should use for margins.</p>
<p>If the specified rect cannot be reached, the contents are scrolled to the nearest valid position.</p>
<p>If this item is not viewed by a <a href="qgraphicsview.html">QGraphicsView</a>, this function does nothing.</p>
<p>See also <a href="qgraphicsview.html#ensureVisible">QGraphicsView::ensureVisible</a>().</p>
<h3 class="fn"><a name="ensureVisible-2"></a>void QGraphicsItem::ensureVisible ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>w</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>h</i>, int <i>xmargin</i> = 50, int <i>ymargin</i> = 50 )</h3>
<p>This convenience function is equivalent to calling ensureVisible(<a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>), <i>xmargin</i>, <i>ymargin</i>):</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/filtersChildEvents"></a>
<h3 class="fn"><a name="filtersChildEvents"></a>bool QGraphicsItem::filtersChildEvents () const</h3>
<p>Returns true if this item filters child events (i.e&#x2e;, all events intended for any of its children are instead sent to this item); otherwise, false is returned.</p>
<p>The default value is false; child events are not filtered.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#setFiltersChildEvents">setFiltersChildEvents</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/flags"></a>
<h3 class="fn"><a name="flags"></a><a href="qgraphicsitem.html#GraphicsItemFlag-enum">GraphicsItemFlags</a> QGraphicsItem::flags () const</h3>
<p>Returns this item's flags. The flags describe what configurable features of the item are enabled and not. For example, if the flags include <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsFocusable</a>, the item can accept input focus.</p>
<p>By default, no flags are enabled.</p>
<p>See also <a href="qgraphicsitem.html#setFlags">setFlags</a>() and <a href="qgraphicsitem.html#setFlag">setFlag</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/focusInEvent"></a>
<h3 class="fn"><a name="focusInEvent"></a>void QGraphicsItem::focusInEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive focus in events for this item. The default implementation calls <a href="qgraphicsitem.html#ensureVisible">ensureVisible</a>().</p>
<p>See also <a href="qgraphicsitem.html#focusOutEvent">focusOutEvent</a>(), <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>(), and <a href="qgraphicsitem.html#setFocus">setFocus</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/focusItem"></a>
<h3 class="fn"><a name="focusItem"></a>QGraphicsItem * QGraphicsItem::focusItem () const</h3>
<p>If this item, a child or descendant of this item currently has input focus, this function will return a pointer to that item. If no descendant has input focus, 0 is returned.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#hasFocus">hasFocus</a>(), <a href="qgraphicsitem.html#setFocus">setFocus</a>(), and <a href="qwidget.html#focusWidget">QWidget::focusWidget</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/focusOutEvent"></a>
<h3 class="fn"><a name="focusOutEvent"></a>void QGraphicsItem::focusOutEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive focus out events for this item. The default implementation does nothing.</p>
<p>See also <a href="qgraphicsitem.html#focusInEvent">focusInEvent</a>(), <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>(), and <a href="qgraphicsitem.html#setFocus">setFocus</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/focusProxy"></a>
<h3 class="fn"><a name="focusProxy"></a>QGraphicsItem * QGraphicsItem::focusProxy () const</h3>
<p>Returns this item's focus proxy, or 0 if this item has no focus proxy.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#setFocusProxy">setFocusProxy</a>(), <a href="qgraphicsitem.html#setFocus">setFocus</a>(), and <a href="qgraphicsitem.html#hasFocus">hasFocus</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/grabKeyboard"></a>
<h3 class="fn"><a name="grabKeyboard"></a>void QGraphicsItem::grabKeyboard ()</h3>
<p>Grabs the keyboard input.</p>
<p>The item will receive all keyboard input to the scene until one of the following events occur:</p>
<ul>
<li>The item becomes invisible</li>
<li>The item is removed from the scene</li>
<li>The item is deleted</li>
<li>The item calls <a href="qgraphicsitem.html#ungrabKeyboard">ungrabKeyboard</a>()</li>
<li>Another item calls grabKeyboard(); the item will regain the keyboard grab when the other item calls <a href="qgraphicsitem.html#ungrabKeyboard">ungrabKeyboard</a>().</li>
</ul>
<p>When an item gains the keyboard grab, it receives a <a href="qevent.html#Type-enum">QEvent::GrabKeyboard</a> event. When it loses the keyboard grab, it receives a <a href="qevent.html#Type-enum">QEvent::UngrabKeyboard</a> event. These events can be used to detect when your item gains or loses the keyboard grab through other means than gaining input focus.</p>
<p>It is almost never necessary to explicitly grab the keyboard in Qt, as Qt grabs and releases it sensibly. In particular, Qt grabs the keyboard when your item gains input focus, and releases it when your item loses input focus, or when the item is hidden.</p>
<p>Note that only visible items can grab keyboard input. Calling grabKeyboard() on an invisible item has no effect.</p>
<p>Keyboard events are not affected.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#ungrabKeyboard">ungrabKeyboard</a>(), <a href="qgraphicsitem.html#grabMouse">grabMouse</a>(), and <a href="qgraphicsitem.html#setFocus">setFocus</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/grabMouse"></a>
<h3 class="fn"><a name="grabMouse"></a>void QGraphicsItem::grabMouse ()</h3>
<p>Grabs the mouse input.</p>
<p>This item will receive all mouse events for the scene until any of the following events occurs:</p>
<ul>
<li>The item becomes invisible</li>
<li>The item is removed from the scene</li>
<li>The item is deleted</li>
<li>The item call <a href="qgraphicsitem.html#ungrabMouse">ungrabMouse</a>()</li>
<li>Another item calls grabMouse(); the item will regain the mouse grab when the other item calls <a href="qgraphicsitem.html#ungrabMouse">ungrabMouse</a>().</li>
</ul>
<p>When an item gains the mouse grab, it receives a <a href="qevent.html#Type-enum">QEvent::GrabMouse</a> event. When it loses the mouse grab, it receives a <a href="qevent.html#Type-enum">QEvent::UngrabMouse</a> event. These events can be used to detect when your item gains or loses the mouse grab through other means than receiving mouse button events.</p>
<p>It is almost never necessary to explicitly grab the mouse in Qt, as Qt grabs and releases it sensibly. In particular, Qt grabs the mouse when you press a mouse button, and keeps the mouse grabbed until you release the last mouse button. Also, <a href="qt.html#WindowType-enum">Qt::Popup</a> widgets implicitly call grabMouse() when shown, and <a href="qgraphicsitem.html#ungrabMouse">ungrabMouse</a>() when hidden.</p>
<p>Note that only visible items can grab mouse input. Calling grabMouse() on an invisible item has no effect.</p>
<p>Keyboard events are not affected.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsscene.html#mouseGrabberItem">QGraphicsScene::mouseGrabberItem</a>(), <a href="qgraphicsitem.html#ungrabMouse">ungrabMouse</a>(), and <a href="qgraphicsitem.html#grabKeyboard">grabKeyboard</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/graphicsEffect"></a>
<h3 class="fn"><a name="graphicsEffect"></a><a href="qgraphicseffect.html">QGraphicsEffect</a> * QGraphicsItem::graphicsEffect () const</h3>
<p>Returns a pointer to this item's effect if it has one; otherwise 0.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#setGraphicsEffect">setGraphicsEffect</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/group"></a>
<h3 class="fn"><a name="group"></a><a href="qgraphicsitemgroup.html">QGraphicsItemGroup</a> * QGraphicsItem::group () const</h3>
<p>Returns a pointer to this item's item group, or 0 if this item is not member of a group.</p>
<p>See also <a href="qgraphicsitem.html#setGroup">setGroup</a>(), <a href="qgraphicsitemgroup.html">QGraphicsItemGroup</a>, and <a href="qgraphicsscene.html#createItemGroup">QGraphicsScene::createItemGroup</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/hasCursor"></a>
<h3 class="fn"><a name="hasCursor"></a>bool QGraphicsItem::hasCursor () const</h3>
<p>Returns true if this item has a cursor set; otherwise, false is returned.</p>
<p>By default, items don't have any cursor set. <a href="qgraphicsitem.html#cursor">cursor</a>() will return a standard pointing arrow cursor.</p>
<p>See also <a href="qgraphicsitem.html#unsetCursor">unsetCursor</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/hasFocus"></a>
<h3 class="fn"><a name="hasFocus"></a>bool QGraphicsItem::hasFocus () const</h3>
<p>Returns true if this item is active, and it or its <a href="qgraphicsitem.html#focusProxy">focus proxy</a> has keyboard input focus; otherwise, returns false.</p>
<p>See also <a href="qgraphicsitem.html#focusItem">focusItem</a>(), <a href="qgraphicsitem.html#setFocus">setFocus</a>(), <a href="qgraphicsscene.html#setFocusItem">QGraphicsScene::setFocusItem</a>(), and <a href="qgraphicsitem.html#isActive">isActive</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/hide"></a>
<h3 class="fn"><a name="hide"></a>void QGraphicsItem::hide ()</h3>
<p>Hides the item. (Items are visible by default.)</p>
<p>This convenience function is equivalent to calling <tt>setVisible(false)</tt>.</p>
<p>See also <a href="qgraphicsitem.html#show">show</a>() and <a href="qgraphicsitem.html#setVisible">setVisible</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/hoverEnterEvent"></a>
<h3 class="fn"><a name="hoverEnterEvent"></a>void QGraphicsItem::hoverEnterEvent ( <a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive hover enter events for this item. The default implementation calls <a href="qgraphicsitem.html#update">update</a>(); otherwise it does nothing.</p>
<p>Calling <a href="qevent.html#ignore">QEvent::ignore</a>() or <a href="qevent.html#accept">QEvent::accept</a>() on <i>event</i> has no effect.</p>
<p>See also <a href="qgraphicsitem.html#hoverMoveEvent">hoverMoveEvent</a>(), <a href="qgraphicsitem.html#hoverLeaveEvent">hoverLeaveEvent</a>(), <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>(), and <a href="qgraphicsitem.html#setAcceptHoverEvents">setAcceptHoverEvents</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/hoverLeaveEvent"></a>
<h3 class="fn"><a name="hoverLeaveEvent"></a>void QGraphicsItem::hoverLeaveEvent ( <a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive hover leave events for this item. The default implementation calls <a href="qgraphicsitem.html#update">update</a>(); otherwise it does nothing.</p>
<p>Calling <a href="qevent.html#ignore">QEvent::ignore</a>() or <a href="qevent.html#accept">QEvent::accept</a>() on <i>event</i> has no effect.</p>
<p>See also <a href="qgraphicsitem.html#hoverEnterEvent">hoverEnterEvent</a>(), <a href="qgraphicsitem.html#hoverMoveEvent">hoverMoveEvent</a>(), <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>(), and <a href="qgraphicsitem.html#setAcceptHoverEvents">setAcceptHoverEvents</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/hoverMoveEvent"></a>
<h3 class="fn"><a name="hoverMoveEvent"></a>void QGraphicsItem::hoverMoveEvent ( <a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive hover move events for this item. The default implementation does nothing.</p>
<p>Calling <a href="qevent.html#ignore">QEvent::ignore</a>() or <a href="qevent.html#accept">QEvent::accept</a>() on <i>event</i> has no effect.</p>
<p>See also <a href="qgraphicsitem.html#hoverEnterEvent">hoverEnterEvent</a>(), <a href="qgraphicsitem.html#hoverLeaveEvent">hoverLeaveEvent</a>(), <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>(), and <a href="qgraphicsitem.html#setAcceptHoverEvents">setAcceptHoverEvents</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/inputMethodEvent"></a>
<h3 class="fn"><a name="inputMethodEvent"></a>void QGraphicsItem::inputMethodEvent ( <a href="qinputmethodevent.html">QInputMethodEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive input method events for this item. The default implementation ignores the event.</p>
<p>See also <a href="qgraphicsitem.html#inputMethodQuery">inputMethodQuery</a>() and <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/inputMethodHints"></a>
<h3 class="fn"><a name="inputMethodHints"></a><a href="qt.html#InputMethodHint-enum">Qt::InputMethodHints</a> QGraphicsItem::inputMethodHints () const</h3>
<p>Returns the current input method hints of this item.</p>
<p>Input method hints are only relevant for input items. The hints are used by the input method to indicate how it should operate. For example, if the Qt::ImhNumbersOnly flag is set, the input method may change its visual components to reflect that only numbers can be entered.</p>
<p>The effect may vary between input method implementations.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#setInputMethodHints">setInputMethodHints</a>(), <a href="qgraphicsitem.html#inputMethodQuery">inputMethodQuery</a>(), and <a href="qinputcontext.html">QInputContext</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/inputMethodQuery"></a>
<h3 class="fn"><a name="inputMethodQuery"></a><a href="qvariant.html">QVariant</a> QGraphicsItem::inputMethodQuery ( <a href="qt.html#InputMethodQuery-enum">Qt::InputMethodQuery</a> <i>query</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This method is only relevant for input items. It is used by the input method to query a set of properties of the item to be able to support complex input method operations, such as support for surrounding text and reconversions. <i>query</i> specifies which property is queried.</p>
<p>See also <a href="qgraphicsitem.html#inputMethodEvent">inputMethodEvent</a>(), <a href="qinputmethodevent.html">QInputMethodEvent</a>, and <a href="qinputcontext.html">QInputContext</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/installSceneEventFilter"></a>
<h3 class="fn"><a name="installSceneEventFilter"></a>void QGraphicsItem::installSceneEventFilter ( QGraphicsItem * <i>filterItem</i> )</h3>
<p>Installs an event filter for this item on <i>filterItem</i>, causing all events for this item to first pass through <i>filterItem</i>'s <a href="qgraphicsitem.html#sceneEventFilter">sceneEventFilter</a>() function.</p>
<p>To filter another item's events, install this item as an event filter for the other item. Example:</p>
<pre> QGraphicsScene scene;
 QGraphicsEllipseItem *ellipse = scene.addEllipse(QRectF(-10, -10, 20, 20));
 QGraphicsLineItem *line = scene.addLine(QLineF(-10, -10, 20, 20));

 line-&gt;installSceneEventFilter(ellipse);
<span class="comment"> // line's events are filtered by ellipse's sceneEventFilter() function.</span>

 ellipse-&gt;installSceneEventFilter(line);
<span class="comment"> // ellipse's events are filtered by line's sceneEventFilter() function.</span></pre>
<p>An item can only filter events for other items in the same scene. Also, an item cannot filter its own events; instead, you can reimplement <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>() directly.</p>
<p>Items must belong to a scene for scene event filters to be installed and used.</p>
<p>See also <a href="qgraphicsitem.html#removeSceneEventFilter">removeSceneEventFilter</a>(), <a href="qgraphicsitem.html#sceneEventFilter">sceneEventFilter</a>(), and <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/isActive"></a>
<h3 class="fn"><a name="isActive"></a>bool QGraphicsItem::isActive () const</h3>
<p>Returns true if this item is active; otherwise returns false.</p>
<p>An item can only be active if the scene is active. An item is active if it is, or is a descendent of, an active panel. Items in non-active panels are not active.</p>
<p>Items that are not part of a panel follow scene activation when the scene has no active panel.</p>
<p>Only active items can gain input focus.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsscene.html#isActive">QGraphicsScene::isActive</a>(), <a href="qgraphicsscene.html#activePanel">QGraphicsScene::activePanel</a>(), <a href="qgraphicsitem.html#panel">panel</a>(), and <a href="qgraphicsitem.html#isPanel">isPanel</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/isAncestorOf"></a>
<h3 class="fn"><a name="isAncestorOf"></a>bool QGraphicsItem::isAncestorOf ( const QGraphicsItem * <i>child</i> ) const</h3>
<p>Returns true if this item is an ancestor of <i>child</i> (i.e&#x2e;, if this item is <i>child</i>'s parent, or one of <i>child</i>'s parent's ancestors).</p>
<p>See also <a href="qgraphicsitem.html#parentItem">parentItem</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/isBlockedByModalPanel"></a>
<h3 class="fn"><a name="isBlockedByModalPanel"></a>bool QGraphicsItem::isBlockedByModalPanel ( QGraphicsItem ** <i>blockingPanel</i> = 0 ) const</h3>
<p>Returns true if this item is blocked by a modal panel, false otherwise. If <i>blockingPanel</i> is non-zero, <i>blockingPanel</i> will be set to the modal panel that is blocking this item. If this item is not blocked, <i>blockingPanel</i> will not be set by this function.</p>
<p>This function always returns false for items not in a scene.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#panelModality">panelModality</a>(), <a href="qgraphicsitem.html#setPanelModality">setPanelModality</a>(), and <a href="qgraphicsitem.html#PanelModality-enum">PanelModality</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/isClipped"></a>
<h3 class="fn"><a name="isClipped"></a>bool QGraphicsItem::isClipped () const</h3>
<p>Returns true if this item is clipped. An item is clipped if it has either set the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemClipsToShape</a> flag, or if it or any of its ancestors has set the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemClipsChildrenToShape</a> flag.</p>
<p>Clipping affects the item's appearance (i.e&#x2e;, painting), as well as mouse and hover event delivery.</p>
<p>See also <a href="qgraphicsitem.html#clipPath">clipPath</a>(), <a href="qgraphicsitem.html#shape">shape</a>(), and <a href="qgraphicsitem.html#setFlags">setFlags</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/isEnabled"></a>
<h3 class="fn"><a name="isEnabled"></a>bool QGraphicsItem::isEnabled () const</h3>
<p>Returns true if the item is enabled; otherwise, false is returned.</p>
<p>See also <a href="qgraphicsitem.html#setEnabled">setEnabled</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/isObscured"></a>
<h3 class="fn"><a name="isObscured"></a>bool QGraphicsItem::isObscured () const</h3>
<p>Returns true if this item's bounding rect is completely obscured by the opaque shape of any of colliding items above it (i.e&#x2e;, with a higher Z value than this item).</p>
<p>Its implementation is based on calling <a href="qgraphicsitem.html#isObscuredBy">isObscuredBy</a>(), which you can reimplement to provide a custom obscurity algorithm.</p>
<p>See also <a href="qgraphicsitem.html#opaqueArea">opaqueArea</a>().</p>
<h3 class="fn"><a name="isObscured-2"></a>bool QGraphicsItem::isObscured ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>w</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>h</i> ) const</h3>
<p>This convenience function is equivalent to calling isObscured(<a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>)).</p>
<p>This function was introduced in Qt 4.3.</p>
<h3 class="fn"><a name="isObscured-3"></a>bool QGraphicsItem::isObscured ( const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns true if <i>rect</i> is completely obscured by the opaque shape of any of colliding items above it (i.e&#x2e;, with a higher Z value than this item).</p>
<p>Unlike the default <a href="qgraphicsitem.html#isObscured">isObscured</a>() function, this function does not call <a href="qgraphicsitem.html#isObscuredBy">isObscuredBy</a>().</p>
<p>This function was introduced in Qt 4.3.</p>
<p>See also <a href="qgraphicsitem.html#opaqueArea">opaqueArea</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/isObscuredBy"></a>
<h3 class="fn"><a name="isObscuredBy"></a>bool QGraphicsItem::isObscuredBy ( const QGraphicsItem * <i>item</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns true if this item's bounding rect is completely obscured by the opaque shape of <i>item</i>.</p>
<p>The base implementation maps <i>item</i>'s <a href="qgraphicsitem.html#opaqueArea">opaqueArea</a>() to this item's coordinate system, and then checks if this item's <a href="qgraphicsitem.html#boundingRect">boundingRect</a>() is fully contained within the mapped shape.</p>
<p>You can reimplement this function to provide a custom algorithm for determining whether this item is obscured by <i>item</i>.</p>
<p>See also <a href="qgraphicsitem.html#opaqueArea">opaqueArea</a>() and <a href="qgraphicsitem.html#isObscured">isObscured</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/isPanel"></a>
<h3 class="fn"><a name="isPanel"></a>bool QGraphicsItem::isPanel () const</h3>
<p>Returns true if the item is a panel; otherwise returns false.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#panel">QGraphicsItem::panel</a>() and <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsPanel</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/isSelected"></a>
<h3 class="fn"><a name="isSelected"></a>bool QGraphicsItem::isSelected () const</h3>
<p>Returns true if this item is selected; otherwise, false is returned.</p>
<p>Items that are in a group inherit the group's selected state.</p>
<p>Items are not selected by default.</p>
<p>See also <a href="qgraphicsitem.html#setSelected">setSelected</a>() and <a href="qgraphicsscene.html#setSelectionArea">QGraphicsScene::setSelectionArea</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/isUnderMouse"></a>
<h3 class="fn"><a name="isUnderMouse"></a>bool QGraphicsItem::isUnderMouse () const</h3>
<p>Returns true if this item is currently under the mouse cursor in one of the views; otherwise, false is returned.</p>
<p>This function was introduced in Qt 4,4.</p>
<p>See also <a href="qgraphicsscene.html#views">QGraphicsScene::views</a>() and <a href="qcursor.html#pos">QCursor::pos</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/isVisible"></a>
<h3 class="fn"><a name="isVisible"></a>bool QGraphicsItem::isVisible () const</h3>
<p>Returns true if the item is visible; otherwise, false is returned.</p>
<p>Note that the item's general visibility is unrelated to whether or not it is actually being visualized by a <a href="qgraphicsview.html">QGraphicsView</a>.</p>
<p>See also <a href="qgraphicsitem.html#setVisible">setVisible</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/isVisibleTo"></a>
<h3 class="fn"><a name="isVisibleTo"></a>bool QGraphicsItem::isVisibleTo ( const QGraphicsItem * <i>parent</i> ) const</h3>
<p>Returns true if the item is visible to <i>parent</i>; otherwise, false is returned. <i>parent</i> can be 0, in which case this function will return whether the item is visible to the scene or not.</p>
<p>An item may not be visible to its ancestors even if <a href="qgraphicsitem.html#isVisible">isVisible</a>() is true. If any ancestor is hidden, the item itself will be implicitly hidden, in which case this function will return false.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#isVisible">isVisible</a>() and <a href="qgraphicsitem.html#setVisible">setVisible</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/isWidget"></a>
<h3 class="fn"><a name="isWidget"></a>bool QGraphicsItem::isWidget () const</h3>
<p>Returns true if this item is a widget (i.e&#x2e;, <a href="qgraphicswidget.html">QGraphicsWidget</a>); otherwise, returns false.</p>
<p>This function was introduced in Qt 4.4.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/isWindow"></a>
<h3 class="fn"><a name="isWindow"></a>bool QGraphicsItem::isWindow () const</h3>
<p>Returns true if the item is a <a href="qgraphicswidget.html">QGraphicsWidget</a> window, otherwise returns false.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicswidget.html#windowFlags-prop">QGraphicsWidget::windowFlags</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/itemChange"></a>
<h3 class="fn"><a name="itemChange"></a><a href="qvariant.html">QVariant</a> QGraphicsItem::itemChange ( <a href="qgraphicsitem.html#GraphicsItemChange-enum">GraphicsItemChange</a> <i>change</i>, const <a href="qvariant.html">QVariant</a> &amp; <i>value</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This virtual function is called by <a href="qgraphicsitem.html">QGraphicsItem</a> to notify custom items that some part of the item's state changes. By reimplementing this function, your can react to a change, and in some cases, (depending on <i>change</i>,) adjustments can be made.</p>
<p><i>change</i> is the parameter of the item that is changing. <i>value</i> is the new value; the type of the value depends on <i>change</i>.</p>
<p>Example:</p>
<pre> QVariant Component::itemChange(GraphicsItemChange change, const QVariant &amp;value)
 {
     if (change == ItemPositionChange &amp;&amp; scene()) {
         <span class="comment">// value is the new position.</span>
         QPointF newPos = value.toPointF();
         QRectF rect = scene()-&gt;sceneRect();
         if (!rect.contains(newPos)) {
             <span class="comment">// Keep the item inside the scene rect.</span>
             newPos.setX(qMin(rect.right(), qMax(newPos.x(), rect.left())));
             newPos.setY(qMin(rect.bottom(), qMax(newPos.y(), rect.top())));
             return newPos;
         }
     }
     return QGraphicsItem::itemChange(change, value);
 }</pre>
<p>The default implementation does nothing, and returns <i>value</i>.</p>
<p>Note: Certain <a href="qgraphicsitem.html">QGraphicsItem</a> functions cannot be called in a reimplementation of this function; see the <a href="qgraphicsitem.html#GraphicsItemChange-enum">GraphicsItemChange</a> documentation for details.</p>
<p>See also <a href="qgraphicsitem.html#GraphicsItemChange-enum">GraphicsItemChange</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/itemTransform"></a>
<h3 class="fn"><a name="itemTransform"></a><a href="qtransform.html">QTransform</a> QGraphicsItem::itemTransform ( const QGraphicsItem * <i>other</i>, bool * <i>ok</i> = 0 ) const</h3>
<p>Returns a <a href="qtransform.html">QTransform</a> that maps coordinates from this item to <i>other</i>. If <i>ok</i> is not null, and if there is no such transform, the boolean pointed to by <i>ok</i> will be set to false; otherwise it will be set to true.</p>
<p>This transform provides an alternative to the <a href="qgraphicsitem.html#mapToItem">mapToItem</a>() or <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>() functions, by returning the appropriate transform so that you can map shapes and coordinates yourself. It also helps you write more efficient code when repeatedly mapping between the same two items.</p>
<p><b>Note:</b> In rare circumstances, there is no transform that maps between two items.</p>
<p>This function was introduced in Qt 4.5.</p>
<p>See also <a href="qgraphicsitem.html#mapToItem">mapToItem</a>(), <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), and <a href="qgraphicsitem.html#deviceTransform">deviceTransform</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/keyPressEvent"></a>
<h3 class="fn"><a name="keyPressEvent"></a>void QGraphicsItem::keyPressEvent ( <a href="qkeyevent.html">QKeyEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive key press events for this item. The default implementation ignores the event. If you reimplement this handler, the event will by default be accepted.</p>
<p>Note that key events are only received for items that set the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsFocusable</a> flag, and that have keyboard input focus.</p>
<p>See also <a href="qgraphicsitem.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qgraphicsitem.html#setFocus">setFocus</a>(), <a href="qgraphicsscene.html#setFocusItem">QGraphicsScene::setFocusItem</a>(), and <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/keyReleaseEvent"></a>
<h3 class="fn"><a name="keyReleaseEvent"></a>void QGraphicsItem::keyReleaseEvent ( <a href="qkeyevent.html">QKeyEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive key release events for this item. The default implementation ignores the event. If you reimplement this handler, the event will by default be accepted.</p>
<p>Note that key events are only received for items that set the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsFocusable</a> flag, and that have keyboard input focus.</p>
<p>See also <a href="qgraphicsitem.html#keyPressEvent">keyPressEvent</a>(), <a href="qgraphicsitem.html#setFocus">setFocus</a>(), <a href="qgraphicsscene.html#setFocusItem">QGraphicsScene::setFocusItem</a>(), and <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mapFromItem"></a>
<h3 class="fn"><a name="mapFromItem"></a><a href="qpointf.html">QPointF</a> QGraphicsItem::mapFromItem ( const QGraphicsItem * <i>item</i>, const <a href="qpointf.html">QPointF</a> &amp; <i>point</i> ) const</h3>
<p>Maps the point <i>point</i>, which is in <i>item</i>'s coordinate system, to this item's coordinate system, and returns the mapped coordinate.</p>
<p>If <i>item</i> is 0, this function returns the same as <a href="qgraphicsitem.html#mapFromScene">mapFromScene</a>().</p>
<p>See also <a href="qgraphicsitem.html#itemTransform">itemTransform</a>(), <a href="qgraphicsitem.html#mapFromParent">mapFromParent</a>(), <a href="qgraphicsitem.html#mapFromScene">mapFromScene</a>(), <a href="qgraphicsitem.html#transform">transform</a>(), <a href="qgraphicsitem.html#mapToItem">mapToItem</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapFromItem-2"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapFromItem ( const QGraphicsItem * <i>item</i>, const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> ) const</h3>
<p>Maps the rectangle <i>rect</i>, which is in <i>item</i>'s coordinate system, to this item's coordinate system, and returns the mapped rectangle as a polygon.</p>
<p>If <i>item</i> is 0, this function returns the same as <a href="qgraphicsitem.html#mapFromScene">mapFromScene</a>()</p>
<p>See also <a href="qgraphicsitem.html#itemTransform">itemTransform</a>(), <a href="qgraphicsitem.html#mapToItem">mapToItem</a>(), <a href="qgraphicsitem.html#mapFromParent">mapFromParent</a>(), <a href="qgraphicsitem.html#transform">transform</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapFromItem-3"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapFromItem ( const QGraphicsItem * <i>item</i>, const <a href="qpolygonf.html">QPolygonF</a> &amp; <i>polygon</i> ) const</h3>
<p>Maps the polygon <i>polygon</i>, which is in <i>item</i>'s coordinate system, to this item's coordinate system, and returns the mapped polygon.</p>
<p>If <i>item</i> is 0, this function returns the same as <a href="qgraphicsitem.html#mapFromScene">mapFromScene</a>().</p>
<p>See also <a href="qgraphicsitem.html#itemTransform">itemTransform</a>(), <a href="qgraphicsitem.html#mapToItem">mapToItem</a>(), <a href="qgraphicsitem.html#mapFromParent">mapFromParent</a>(), <a href="qgraphicsitem.html#transform">transform</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapFromItem-4"></a><a href="qpainterpath.html">QPainterPath</a> QGraphicsItem::mapFromItem ( const QGraphicsItem * <i>item</i>, const <a href="qpainterpath.html">QPainterPath</a> &amp; <i>path</i> ) const</h3>
<p>Maps the path <i>path</i>, which is in <i>item</i>'s coordinate system, to this item's coordinate system, and returns the mapped path.</p>
<p>If <i>item</i> is 0, this function returns the same as <a href="qgraphicsitem.html#mapFromScene">mapFromScene</a>().</p>
<p>See also <a href="qgraphicsitem.html#itemTransform">itemTransform</a>(), <a href="qgraphicsitem.html#mapFromParent">mapFromParent</a>(), <a href="qgraphicsitem.html#mapFromScene">mapFromScene</a>(), <a href="qgraphicsitem.html#mapToItem">mapToItem</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapFromItem-5"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapFromItem ( const QGraphicsItem * <i>item</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>w</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>h</i> ) const</h3>
<p>This convenience function is equivalent to calling mapFromItem(item, <a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>)).</p>
<p>This function was introduced in Qt 4.3.</p>
<h3 class="fn"><a name="mapFromItem-6"></a><a href="qpointf.html">QPointF</a> QGraphicsItem::mapFromItem ( const QGraphicsItem * <i>item</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>This convenience function is equivalent to calling mapFromItem(<i>item</i>, <a href="qpointf.html">QPointF</a>(<i>x</i>, <i>y</i>)).</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mapFromParent"></a>
<h3 class="fn"><a name="mapFromParent"></a><a href="qpointf.html">QPointF</a> QGraphicsItem::mapFromParent ( const <a href="qpointf.html">QPointF</a> &amp; <i>point</i> ) const</h3>
<p>Maps the point <i>point</i>, which is in this item's parent's coordinate system, to this item's coordinate system, and returns the mapped coordinate.</p>
<p>See also <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), <a href="qgraphicsitem.html#mapFromScene">mapFromScene</a>(), <a href="qgraphicsitem.html#transform">transform</a>(), <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapFromParent-2"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapFromParent ( const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> ) const</h3>
<p>Maps the rectangle <i>rect</i>, which is in this item's parent's coordinate system, to this item's coordinate system, and returns the mapped rectangle as a polygon.</p>
<p>See also <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), <a href="qgraphicsitem.html#transform">transform</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapFromParent-3"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapFromParent ( const <a href="qpolygonf.html">QPolygonF</a> &amp; <i>polygon</i> ) const</h3>
<p>Maps the polygon <i>polygon</i>, which is in this item's parent's coordinate system, to this item's coordinate system, and returns the mapped polygon.</p>
<p>See also <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#mapToItem">mapToItem</a>(), <a href="qgraphicsitem.html#transform">transform</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapFromParent-4"></a><a href="qpainterpath.html">QPainterPath</a> QGraphicsItem::mapFromParent ( const <a href="qpainterpath.html">QPainterPath</a> &amp; <i>path</i> ) const</h3>
<p>Maps the path <i>path</i>, which is in this item's parent's coordinate system, to this item's coordinate system, and returns the mapped path.</p>
<p>See also <a href="qgraphicsitem.html#mapFromScene">mapFromScene</a>(), <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapFromParent-5"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapFromParent ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>w</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>h</i> ) const</h3>
<p>This convenience function is equivalent to calling mapFromItem(<a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>)).</p>
<p>This function was introduced in Qt 4.3.</p>
<h3 class="fn"><a name="mapFromParent-6"></a><a href="qpointf.html">QPointF</a> QGraphicsItem::mapFromParent ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>This convenience function is equivalent to calling mapFromParent(<a href="qpointf.html">QPointF</a>(<i>x</i>, <i>y</i>)).</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mapFromScene"></a>
<h3 class="fn"><a name="mapFromScene"></a><a href="qpointf.html">QPointF</a> QGraphicsItem::mapFromScene ( const <a href="qpointf.html">QPointF</a> &amp; <i>point</i> ) const</h3>
<p>Maps the point <i>point</i>, which is in this item's scene's coordinate system, to this item's coordinate system, and returns the mapped coordinate.</p>
<p>See also <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), <a href="qgraphicsitem.html#mapFromParent">mapFromParent</a>(), <a href="qgraphicsitem.html#transform">transform</a>(), <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapFromScene-2"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapFromScene ( const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> ) const</h3>
<p>Maps the rectangle <i>rect</i>, which is in this item's scene's coordinate system, to this item's coordinate system, and returns the mapped rectangle as a polygon.</p>
<p>See also <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), <a href="qgraphicsitem.html#transform">transform</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapFromScene-3"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapFromScene ( const <a href="qpolygonf.html">QPolygonF</a> &amp; <i>polygon</i> ) const</h3>
<p>Maps the polygon <i>polygon</i>, which is in this item's scene's coordinate system, to this item's coordinate system, and returns the mapped polygon.</p>
<p>See also <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#mapFromParent">mapFromParent</a>(), <a href="qgraphicsitem.html#transform">transform</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapFromScene-4"></a><a href="qpainterpath.html">QPainterPath</a> QGraphicsItem::mapFromScene ( const <a href="qpainterpath.html">QPainterPath</a> &amp; <i>path</i> ) const</h3>
<p>Maps the path <i>path</i>, which is in this item's scene's coordinate system, to this item's coordinate system, and returns the mapped path.</p>
<p>See also <a href="qgraphicsitem.html#mapFromParent">mapFromParent</a>(), <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapFromScene-5"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapFromScene ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>w</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>h</i> ) const</h3>
<p>This convenience function is equivalent to calling mapFromScene(<a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>)).</p>
<p>This function was introduced in Qt 4.3.</p>
<h3 class="fn"><a name="mapFromScene-6"></a><a href="qpointf.html">QPointF</a> QGraphicsItem::mapFromScene ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>This convenience function is equivalent to calling mapFromScene(<a href="qpointf.html">QPointF</a>(<i>x</i>, <i>y</i>)).</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mapRectFromItem"></a>
<h3 class="fn"><a name="mapRectFromItem"></a><a href="qrectf.html">QRectF</a> QGraphicsItem::mapRectFromItem ( const QGraphicsItem * <i>item</i>, const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> ) const</h3>
<p>Maps the rectangle <i>rect</i>, which is in <i>item</i>'s coordinate system, to this item's coordinate system, and returns the mapped rectangle as a new rectangle (i.e&#x2e;, the bounding rectangle of the resulting polygon).</p>
<p>If <i>item</i> is 0, this function returns the same as <a href="qgraphicsitem.html#mapRectFromScene">mapRectFromScene</a>().</p>
<p>This function was introduced in Qt 4.5.</p>
<p>See also <a href="qgraphicsitem.html#itemTransform">itemTransform</a>(), <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapRectFromItem-2"></a><a href="qrectf.html">QRectF</a> QGraphicsItem::mapRectFromItem ( const QGraphicsItem * <i>item</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>w</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>h</i> ) const</h3>
<p>This convenience function is equivalent to calling mapRectFromItem(item, <a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>)).</p>
<p>This function was introduced in Qt 4.5.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mapRectFromParent"></a>
<h3 class="fn"><a name="mapRectFromParent"></a><a href="qrectf.html">QRectF</a> QGraphicsItem::mapRectFromParent ( const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> ) const</h3>
<p>Maps the rectangle <i>rect</i>, which is in this item's parent's coordinate system, to this item's coordinate system, and returns the mapped rectangle as a new rectangle (i.e&#x2e;, the bounding rectangle of the resulting polygon).</p>
<p>This function was introduced in Qt 4.5.</p>
<p>See also <a href="qgraphicsitem.html#itemTransform">itemTransform</a>(), <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapRectFromParent-2"></a><a href="qrectf.html">QRectF</a> QGraphicsItem::mapRectFromParent ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>w</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>h</i> ) const</h3>
<p>This convenience function is equivalent to calling mapRectFromParent(<a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>)).</p>
<p>This function was introduced in Qt 4.5.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mapRectFromScene"></a>
<h3 class="fn"><a name="mapRectFromScene"></a><a href="qrectf.html">QRectF</a> QGraphicsItem::mapRectFromScene ( const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> ) const</h3>
<p>Maps the rectangle <i>rect</i>, which is in scene coordinates, to this item's coordinate system, and returns the mapped rectangle as a new rectangle (i.e&#x2e;, the bounding rectangle of the resulting polygon).</p>
<p>This function was introduced in Qt 4.5.</p>
<p>See also <a href="qgraphicsitem.html#itemTransform">itemTransform</a>(), <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapRectFromScene-2"></a><a href="qrectf.html">QRectF</a> QGraphicsItem::mapRectFromScene ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>w</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>h</i> ) const</h3>
<p>This convenience function is equivalent to calling mapRectFromScene(<a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>)).</p>
<p>This function was introduced in Qt 4.5.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mapRectToItem"></a>
<h3 class="fn"><a name="mapRectToItem"></a><a href="qrectf.html">QRectF</a> QGraphicsItem::mapRectToItem ( const QGraphicsItem * <i>item</i>, const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> ) const</h3>
<p>Maps the rectangle <i>rect</i>, which is in this item's coordinate system, to <i>item</i>'s coordinate system, and returns the mapped rectangle as a new rectangle (i.e&#x2e;, the bounding rectangle of the resulting polygon).</p>
<p>If <i>item</i> is 0, this function returns the same as <a href="qgraphicsitem.html#mapRectToScene">mapRectToScene</a>().</p>
<p>This function was introduced in Qt 4.5.</p>
<p>See also <a href="qgraphicsitem.html#itemTransform">itemTransform</a>(), <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapRectToItem-2"></a><a href="qrectf.html">QRectF</a> QGraphicsItem::mapRectToItem ( const QGraphicsItem * <i>item</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>w</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>h</i> ) const</h3>
<p>This convenience function is equivalent to calling mapRectToItem(item, <a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>)).</p>
<p>This function was introduced in Qt 4.5.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mapRectToParent"></a>
<h3 class="fn"><a name="mapRectToParent"></a><a href="qrectf.html">QRectF</a> QGraphicsItem::mapRectToParent ( const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> ) const</h3>
<p>Maps the rectangle <i>rect</i>, which is in this item's coordinate system, to its parent's coordinate system, and returns the mapped rectangle as a new rectangle (i.e&#x2e;, the bounding rectangle of the resulting polygon).</p>
<p>This function was introduced in Qt 4.5.</p>
<p>See also <a href="qgraphicsitem.html#itemTransform">itemTransform</a>(), <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapRectToParent-2"></a><a href="qrectf.html">QRectF</a> QGraphicsItem::mapRectToParent ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>w</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>h</i> ) const</h3>
<p>This convenience function is equivalent to calling mapRectToParent(<a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>)).</p>
<p>This function was introduced in Qt 4.5.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mapRectToScene"></a>
<h3 class="fn"><a name="mapRectToScene"></a><a href="qrectf.html">QRectF</a> QGraphicsItem::mapRectToScene ( const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> ) const</h3>
<p>Maps the rectangle <i>rect</i>, which is in this item's coordinate system, to the scene coordinate system, and returns the mapped rectangle as a new rectangle (i.e&#x2e;, the bounding rectangle of the resulting polygon).</p>
<p>This function was introduced in Qt 4.5.</p>
<p>See also <a href="qgraphicsitem.html#itemTransform">itemTransform</a>(), <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapRectToScene-2"></a><a href="qrectf.html">QRectF</a> QGraphicsItem::mapRectToScene ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>w</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>h</i> ) const</h3>
<p>This convenience function is equivalent to calling mapRectToScene(<a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>)).</p>
<p>This function was introduced in Qt 4.5.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mapToItem"></a>
<h3 class="fn"><a name="mapToItem"></a><a href="qpointf.html">QPointF</a> QGraphicsItem::mapToItem ( const QGraphicsItem * <i>item</i>, const <a href="qpointf.html">QPointF</a> &amp; <i>point</i> ) const</h3>
<p>Maps the point <i>point</i>, which is in this item's coordinate system, to <i>item</i>'s coordinate system, and returns the mapped coordinate.</p>
<p>If <i>item</i> is 0, this function returns the same as <a href="qgraphicsitem.html#mapToScene">mapToScene</a>().</p>
<p>See also <a href="qgraphicsitem.html#itemTransform">itemTransform</a>(), <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#transform">transform</a>(), <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapToItem-2"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapToItem ( const QGraphicsItem * <i>item</i>, const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> ) const</h3>
<p>Maps the rectangle <i>rect</i>, which is in this item's coordinate system, to <i>item</i>'s coordinate system, and returns the mapped rectangle as a polygon.</p>
<p>If <i>item</i> is 0, this function returns the same as <a href="qgraphicsitem.html#mapToScene">mapToScene</a>().</p>
<p>See also <a href="qgraphicsitem.html#itemTransform">itemTransform</a>(), <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapToItem-3"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapToItem ( const QGraphicsItem * <i>item</i>, const <a href="qpolygonf.html">QPolygonF</a> &amp; <i>polygon</i> ) const</h3>
<p>Maps the polygon <i>polygon</i>, which is in this item's coordinate system, to <i>item</i>'s coordinate system, and returns the mapped polygon.</p>
<p>If <i>item</i> is 0, this function returns the same as <a href="qgraphicsitem.html#mapToScene">mapToScene</a>().</p>
<p>See also <a href="qgraphicsitem.html#itemTransform">itemTransform</a>(), <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapToItem-4"></a><a href="qpainterpath.html">QPainterPath</a> QGraphicsItem::mapToItem ( const QGraphicsItem * <i>item</i>, const <a href="qpainterpath.html">QPainterPath</a> &amp; <i>path</i> ) const</h3>
<p>Maps the path <i>path</i>, which is in this item's coordinate system, to <i>item</i>'s coordinate system, and returns the mapped path.</p>
<p>If <i>item</i> is 0, this function returns the same as <a href="qgraphicsitem.html#mapToScene">mapToScene</a>().</p>
<p>See also <a href="qgraphicsitem.html#itemTransform">itemTransform</a>(), <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#mapFromItem">mapFromItem</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapToItem-5"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapToItem ( const QGraphicsItem * <i>item</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>w</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>h</i> ) const</h3>
<p>This convenience function is equivalent to calling mapToItem(item, <a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>)).</p>
<p>This function was introduced in Qt 4.3.</p>
<h3 class="fn"><a name="mapToItem-6"></a><a href="qpointf.html">QPointF</a> QGraphicsItem::mapToItem ( const QGraphicsItem * <i>item</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>This convenience function is equivalent to calling mapToItem(<i>item</i>, <a href="qpointf.html">QPointF</a>(<i>x</i>, <i>y</i>)).</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mapToParent"></a>
<h3 class="fn"><a name="mapToParent"></a><a href="qpointf.html">QPointF</a> QGraphicsItem::mapToParent ( const <a href="qpointf.html">QPointF</a> &amp; <i>point</i> ) const</h3>
<p>Maps the point <i>point</i>, which is in this item's coordinate system, to its parent's coordinate system, and returns the mapped coordinate. If the item has no parent, <i>point</i> will be mapped to the scene's coordinate system.</p>
<p>See also <a href="qgraphicsitem.html#mapToItem">mapToItem</a>(), <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#transform">transform</a>(), <a href="qgraphicsitem.html#mapFromParent">mapFromParent</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapToParent-2"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapToParent ( const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> ) const</h3>
<p>Maps the rectangle <i>rect</i>, which is in this item's coordinate system, to its parent's coordinate system, and returns the mapped rectangle as a polygon. If the item has no parent, <i>rect</i> will be mapped to the scene's coordinate system.</p>
<p>See also <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#mapToItem">mapToItem</a>(), <a href="qgraphicsitem.html#mapFromParent">mapFromParent</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapToParent-3"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapToParent ( const <a href="qpolygonf.html">QPolygonF</a> &amp; <i>polygon</i> ) const</h3>
<p>Maps the polygon <i>polygon</i>, which is in this item's coordinate system, to its parent's coordinate system, and returns the mapped polygon. If the item has no parent, <i>polygon</i> will be mapped to the scene's coordinate system.</p>
<p>See also <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#mapToItem">mapToItem</a>(), <a href="qgraphicsitem.html#mapFromParent">mapFromParent</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapToParent-4"></a><a href="qpainterpath.html">QPainterPath</a> QGraphicsItem::mapToParent ( const <a href="qpainterpath.html">QPainterPath</a> &amp; <i>path</i> ) const</h3>
<p>Maps the path <i>path</i>, which is in this item's coordinate system, to its parent's coordinate system, and returns the mapped path. If the item has no parent, <i>path</i> will be mapped to the scene's coordinate system.</p>
<p>See also <a href="qgraphicsitem.html#mapToScene">mapToScene</a>(), <a href="qgraphicsitem.html#mapToItem">mapToItem</a>(), <a href="qgraphicsitem.html#mapFromParent">mapFromParent</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapToParent-5"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapToParent ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>w</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>h</i> ) const</h3>
<p>This convenience function is equivalent to calling mapToParent(<a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>)).</p>
<p>This function was introduced in Qt 4.3.</p>
<h3 class="fn"><a name="mapToParent-6"></a><a href="qpointf.html">QPointF</a> QGraphicsItem::mapToParent ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>This convenience function is equivalent to calling mapToParent(<a href="qpointf.html">QPointF</a>(<i>x</i>, <i>y</i>)).</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mapToScene"></a>
<h3 class="fn"><a name="mapToScene"></a><a href="qpointf.html">QPointF</a> QGraphicsItem::mapToScene ( const <a href="qpointf.html">QPointF</a> &amp; <i>point</i> ) const</h3>
<p>Maps the point <i>point</i>, which is in this item's coordinate system, to the scene's coordinate system, and returns the mapped coordinate.</p>
<p>See also <a href="qgraphicsitem.html#mapToItem">mapToItem</a>(), <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#transform">transform</a>(), <a href="qgraphicsitem.html#mapFromScene">mapFromScene</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapToScene-2"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapToScene ( const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> ) const</h3>
<p>Maps the rectangle <i>rect</i>, which is in this item's coordinate system, to the scene's coordinate system, and returns the mapped rectangle as a polygon.</p>
<p>See also <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#mapToItem">mapToItem</a>(), <a href="qgraphicsitem.html#mapFromScene">mapFromScene</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapToScene-3"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapToScene ( const <a href="qpolygonf.html">QPolygonF</a> &amp; <i>polygon</i> ) const</h3>
<p>Maps the polygon <i>polygon</i>, which is in this item's coordinate system, to the scene's coordinate system, and returns the mapped polygon.</p>
<p>See also <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#mapToItem">mapToItem</a>(), <a href="qgraphicsitem.html#mapFromScene">mapFromScene</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapToScene-4"></a><a href="qpainterpath.html">QPainterPath</a> QGraphicsItem::mapToScene ( const <a href="qpainterpath.html">QPainterPath</a> &amp; <i>path</i> ) const</h3>
<p>Maps the path <i>path</i>, which is in this item's coordinate system, to the scene's coordinate system, and returns the mapped path.</p>
<p>See also <a href="qgraphicsitem.html#mapToParent">mapToParent</a>(), <a href="qgraphicsitem.html#mapToItem">mapToItem</a>(), <a href="qgraphicsitem.html#mapFromScene">mapFromScene</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="mapToScene-5"></a><a href="qpolygonf.html">QPolygonF</a> QGraphicsItem::mapToScene ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>w</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>h</i> ) const</h3>
<p>This convenience function is equivalent to calling mapToScene(<a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>)).</p>
<p>This function was introduced in Qt 4.3.</p>
<h3 class="fn"><a name="mapToScene-6"></a><a href="qpointf.html">QPointF</a> QGraphicsItem::mapToScene ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>This convenience function is equivalent to calling mapToScene(<a href="qpointf.html">QPointF</a>(<i>x</i>, <i>y</i>)).</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mouseDoubleClickEvent"></a>
<h3 class="fn"><a name="mouseDoubleClickEvent"></a>void QGraphicsItem::mouseDoubleClickEvent ( <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive mouse doubleclick events for this item.</p>
<p>When doubleclicking an item, the item will first receive a mouse press event, followed by a release event (i.e&#x2e;, a click), then a doubleclick event, and finally a release event.</p>
<p>Calling <a href="qevent.html#ignore">QEvent::ignore</a>() or <a href="qevent.html#accept">QEvent::accept</a>() on <i>event</i> has no effect.</p>
<p>The default implementation calls <a href="qgraphicsitem.html#mousePressEvent">mousePressEvent</a>(). If you want to keep the base implementation when reimplementing this function, call QGraphicsItem::mouseDoubleClickEvent() in your reimplementation.</p>
<p>Note that an item will not receive double click events if it is neither <a href="qgraphicsitem.html#GraphicsItemFlag-enum">selectable</a> nor <a href="qgraphicsitem.html#GraphicsItemFlag-enum">movable</a> (single mouse clicks are ignored in this case, and that stops the generation of double clicks).</p>
<p>See also <a href="qgraphicsitem.html#mousePressEvent">mousePressEvent</a>(), <a href="qgraphicsitem.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qgraphicsitem.html#mouseReleaseEvent">mouseReleaseEvent</a>(), and <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mouseMoveEvent"></a>
<h3 class="fn"><a name="mouseMoveEvent"></a>void QGraphicsItem::mouseMoveEvent ( <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive mouse move events for this item. If you do receive this event, you can be certain that this item also received a mouse press event, and that this item is the current mouse grabber.</p>
<p>Calling <a href="qevent.html#ignore">QEvent::ignore</a>() or <a href="qevent.html#accept">QEvent::accept</a>() on <i>event</i> has no effect.</p>
<p>The default implementation handles basic item interaction, such as selection and moving. If you want to keep the base implementation when reimplementing this function, call QGraphicsItem::mouseMoveEvent() in your reimplementation.</p>
<p>Please note that <a href="qgraphicsitem.html#mousePressEvent">mousePressEvent</a>() decides which graphics item it is that receives mouse events. See the <a href="qgraphicsitem.html#mousePressEvent">mousePressEvent</a>() description for details.</p>
<p>See also <a href="qgraphicsitem.html#mousePressEvent">mousePressEvent</a>(), <a href="qgraphicsitem.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qgraphicsitem.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), and <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mousePressEvent"></a>
<h3 class="fn"><a name="mousePressEvent"></a>void QGraphicsItem::mousePressEvent ( <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive mouse press events for this item. Mouse press events are only delivered to items that accept the mouse button that is pressed. By default, an item accepts all mouse buttons, but you can change this by calling <a href="qgraphicsitem.html#setAcceptedMouseButtons">setAcceptedMouseButtons</a>().</p>
<p>The mouse press event decides which item should become the mouse grabber (see <a href="qgraphicsscene.html#mouseGrabberItem">QGraphicsScene::mouseGrabberItem</a>()). If you do not reimplement this function, the press event will propagate to any topmost item beneath this item, and no other mouse events will be delivered to this item.</p>
<p>If you do reimplement this function, <i>event</i> will by default be accepted (see <a href="qevent.html#accept">QEvent::accept</a>()), and this item is then the mouse grabber. This allows the item to receive future move, release and doubleclick events. If you call <a href="qevent.html#ignore">QEvent::ignore</a>() on <i>event</i>, this item will lose the mouse grab, and <i>event</i> will propagate to any topmost item beneath. No further mouse events will be delivered to this item unless a new mouse press event is received.</p>
<p>The default implementation handles basic item interaction, such as selection and moving. If you want to keep the base implementation when reimplementing this function, call QGraphicsItem::mousePressEvent() in your reimplementation.</p>
<p>The event is <a href="qevent.html#ignore">QEvent::ignore</a>()d for items that are neither <a href="qgraphicsitem.html#GraphicsItemFlag-enum">movable</a> nor <a href="qgraphicsitem.html#GraphicsItemFlag-enum">selectable</a>.</p>
<p>See also <a href="qgraphicsitem.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qgraphicsitem.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qgraphicsitem.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), and <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/mouseReleaseEvent"></a>
<h3 class="fn"><a name="mouseReleaseEvent"></a>void QGraphicsItem::mouseReleaseEvent ( <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive mouse release events for this item.</p>
<p>Calling <a href="qevent.html#ignore">QEvent::ignore</a>() or <a href="qevent.html#accept">QEvent::accept</a>() on <i>event</i> has no effect.</p>
<p>The default implementation handles basic item interaction, such as selection and moving. If you want to keep the base implementation when reimplementing this function, call QGraphicsItem::mouseReleaseEvent() in your reimplementation.</p>
<p>Please note that <a href="qgraphicsitem.html#mousePressEvent">mousePressEvent</a>() decides which graphics item it is that receives mouse events. See the <a href="qgraphicsitem.html#mousePressEvent">mousePressEvent</a>() description for details.</p>
<p>See also <a href="qgraphicsitem.html#mousePressEvent">mousePressEvent</a>(), <a href="qgraphicsitem.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qgraphicsitem.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), and <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/moveBy"></a>
<h3 class="fn"><a name="moveBy"></a>void QGraphicsItem::moveBy ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dx</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dy</i> )</h3>
<p>Moves the item by <i>dx</i> points horizontally, and <i>dy</i> point vertically. This function is equivalent to calling setPos(<a href="qgraphicsitem.html#pos">pos</a>() + <a href="qpointf.html">QPointF</a>(<i>dx</i>, <i>dy</i>)).</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/opacity"></a>
<h3 class="fn"><a name="opacity"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QGraphicsItem::opacity () const</h3>
<p>Returns this item's local opacity, which is between 0.0 (transparent) and 1.0 (opaque). This value is combined with parent and ancestor values into the <a href="qgraphicsitem.html#effectiveOpacity">effectiveOpacity</a>(). The effective opacity decides how the item is rendered.</p>
<p>The opacity property decides the state of the painter passed to the <a href="qgraphicsitem.html#paint">paint</a>() function. If the item is cached, i.e&#x2e;, <a href="qgraphicsitem.html#CacheMode-enum">ItemCoordinateCache</a> or <a href="qgraphicsitem.html#CacheMode-enum">DeviceCoordinateCache</a>, the effective property will be applied to the item's cache as it is rendered.</p>
<p>The default opacity is 1.0; fully opaque.</p>
<p>This function was introduced in Qt 4.5.</p>
<p>See also <a href="qgraphicsitem.html#setOpacity">setOpacity</a>(), <a href="qgraphicsitem.html#paint">paint</a>(), <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIgnoresParentOpacity</a>, and <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemDoesntPropagateOpacityToChildren</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/opaqueArea"></a>
<h3 class="fn"><a name="opaqueArea"></a><a href="qpainterpath.html">QPainterPath</a> QGraphicsItem::opaqueArea () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>This virtual function returns a shape representing the area where this item is opaque. An area is opaque if it is filled using an opaque brush or color (i.e&#x2e;, not transparent).</p>
<p>This function is used by <a href="qgraphicsitem.html#isObscuredBy">isObscuredBy</a>(), which is called by underlying items to determine if they are obscured by this item.</p>
<p>The default implementation returns an empty <a href="qpainterpath.html">QPainterPath</a>, indicating that this item is completely transparent and does not obscure any other items.</p>
<p>See also <a href="qgraphicsitem.html#isObscuredBy">isObscuredBy</a>(), <a href="qgraphicsitem.html#isObscured">isObscured</a>(), and <a href="qgraphicsitem.html#shape">shape</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/paint"></a>
<h3 class="fn"><a name="paint"></a>void QGraphicsItem::paint ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, const <a href="qstyleoptiongraphicsitem.html">QStyleOptionGraphicsItem</a> * <i>option</i>, <a href="qwidget.html">QWidget</a> * <i>widget</i> = 0 )&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
<p>This function, which is usually called by <a href="qgraphicsview.html">QGraphicsView</a>, paints the contents of an item in local coordinates.</p>
<p>Reimplement this function in a <a href="qgraphicsitem.html">QGraphicsItem</a> subclass to provide the item's painting implementation, using <i>painter</i>. The <i>option</i> parameter provides style options for the item, such as its state, exposed area and its level-of-detail hints. The <i>widget</i> argument is optional. If provided, it points to the widget that is being painted on; otherwise, it is 0. For cached painting, <i>widget</i> is always 0.</p>
<pre> void RoundRectItem::paint(QPainter *painter,
                           const QStyleOptionGraphicsItem *option,
                           QWidget *widget)
 {
     painter-&gt;drawRoundedRect(-10, -10, 20, 20, 5, 5);
 }</pre>
<p>The painter's pen is 0-width by default, and its pen is initialized to the <a href="qpalette.html#ColorRole-enum">QPalette::Text</a> brush from the paint device's palette. The brush is initialized to <a href="qpalette.html#ColorRole-enum">QPalette::Window</a>.</p>
<p>Make sure to constrain all painting inside the boundaries of <a href="qgraphicsitem.html#boundingRect">boundingRect</a>() to avoid rendering artifacts (as <a href="qgraphicsview.html">QGraphicsView</a> does not clip the painter for you). In particular, when <a href="qpainter.html">QPainter</a> renders the outline of a shape using an assigned <a href="qpen.html">QPen</a>, half of the outline will be drawn outside, and half inside, the shape you're rendering (e.g&#x2e;, with a pen width of 2 units, you must draw outlines 1 unit inside <a href="qgraphicsitem.html#boundingRect">boundingRect</a>()). <a href="qgraphicsitem.html">QGraphicsItem</a> does not support use of cosmetic pens with a non-zero width.</p>
<p>All painting is done in local coordinates.</p>
<p>See also <a href="qgraphicsitem.html#setCacheMode">setCacheMode</a>(), <a href="qpen.html#width">QPen::width</a>(), <a href="graphicsview.html#item-coordinates">Item Coordinates</a>, and <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemUsesExtendedStyleOption</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/panel"></a>
<h3 class="fn"><a name="panel"></a>QGraphicsItem * QGraphicsItem::panel () const</h3>
<p>Returns the item's panel, or 0 if this item does not have a panel. If the item is a panel, it will return itself. Otherwise it will return the closest ancestor that is a panel.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#isPanel">isPanel</a>() and <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsPanel</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/panelModality"></a>
<h3 class="fn"><a name="panelModality"></a><a href="qgraphicsitem.html#PanelModality-enum">PanelModality</a> QGraphicsItem::panelModality () const</h3>
<p>Returns the modality for this item.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#setPanelModality">setPanelModality</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/parentItem"></a>
<h3 class="fn"><a name="parentItem"></a>QGraphicsItem * QGraphicsItem::parentItem () const</h3>
<p>Returns a pointer to this item's parent item. If this item does not have a parent, 0 is returned.</p>
<p>See also <a href="qgraphicsitem.html#setParentItem">setParentItem</a>() and <a href="qgraphicsitem.html#childItems">childItems</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/parentObject"></a>
<h3 class="fn"><a name="parentObject"></a><a href="qgraphicsobject.html">QGraphicsObject</a> * QGraphicsItem::parentObject () const</h3>
<p>Returns a pointer to the item's parent, cast to a <a href="qgraphicsobject.html">QGraphicsObject</a>. returns 0 if the parent item is not a <a href="qgraphicsobject.html">QGraphicsObject</a>.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#parentItem">parentItem</a>() and <a href="qgraphicsitem.html#childItems">childItems</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/parentWidget"></a>
<h3 class="fn"><a name="parentWidget"></a><a href="qgraphicswidget.html">QGraphicsWidget</a> * QGraphicsItem::parentWidget () const</h3>
<p>Returns a pointer to the item's parent widget. The item's parent widget is the closest parent item that is a widget.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#parentItem">parentItem</a>() and <a href="qgraphicsitem.html#childItems">childItems</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/pos"></a>
<h3 class="fn"><a name="pos"></a><a href="qpointf.html">QPointF</a> QGraphicsItem::pos () const</h3>
<p>Returns the position of the item in parent coordinates. If the item has no parent, its position is given in scene coordinates.</p>
<p>The position of the item describes its origin (local coordinate (0, 0)) in parent coordinates; this function returns the same as mapToParent(0, 0).</p>
<p>For convenience, you can also call <a href="qgraphicsitem.html#scenePos">scenePos</a>() to determine the item's position in scene coordinates, regardless of its parent.</p>
<p>See also <a href="qgraphicsitem.html#x">x</a>(), <a href="qgraphicsitem.html#y">y</a>(), <a href="qgraphicsitem.html#setPos">setPos</a>(), <a href="qgraphicsitem.html#transform">transform</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/prepareGeometryChange"></a>
<h3 class="fn"><a name="prepareGeometryChange"></a>void QGraphicsItem::prepareGeometryChange ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Prepares the item for a geometry change. Call this function before changing the bounding rect of an item to keep <a href="qgraphicsscene.html">QGraphicsScene</a>'s index up to date.</p>
<p>prepareGeometryChange() will call <a href="qgraphicsitem.html#update">update</a>() if this is necessary.</p>
<p>Example:</p>
<pre> void CircleItem::setRadius(qreal newRadius)
 {
     if (radius != newRadius) {
         prepareGeometryChange();
         radius = newRadius;
     }
 }</pre>
<p>See also <a href="qgraphicsitem.html#boundingRect">boundingRect</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/removeSceneEventFilter"></a>
<h3 class="fn"><a name="removeSceneEventFilter"></a>void QGraphicsItem::removeSceneEventFilter ( QGraphicsItem * <i>filterItem</i> )</h3>
<p>Removes an event filter on this item from <i>filterItem</i>.</p>
<p>See also <a href="qgraphicsitem.html#installSceneEventFilter">installSceneEventFilter</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/resetTransform"></a>
<h3 class="fn"><a name="resetTransform"></a>void QGraphicsItem::resetTransform ()</h3>
<p>Resets this item's transformation matrix to the identity matrix or all the transformation properties to their default values. This is equivalent to calling <tt>setTransform(QTransform())</tt>.</p>
<p>This function was introduced in Qt 4.3.</p>
<p>See also <a href="qgraphicsitem.html#setTransform">setTransform</a>() and <a href="qgraphicsitem.html#transform">transform</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/rotation"></a>
<h3 class="fn"><a name="rotation"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QGraphicsItem::rotation () const</h3>
<p>Returns the clockwise rotation, in degrees, around the Z axis. The default value is 0 (i.e&#x2e;, the item is not rotated).</p>
<p>The rotation is combined with the item's <a href="qgraphicsitem.html#scale">scale</a>(), <a href="qgraphicsitem.html#transform">transform</a>() and <a href="qgraphicsitem.html#transformations">transformations</a>() to map the item's coordinate system to the parent item.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#setRotation">setRotation</a>(), <a href="qgraphicsitem.html#transformOriginPoint">transformOriginPoint</a>(), and <a href="coordsys.html#transformations">Transformations</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/scale"></a>
<h3 class="fn"><a name="scale"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QGraphicsItem::scale () const</h3>
<p>Returns the scale factor of the item. The default scale factor is 1.0 (i.e&#x2e;, the item is not scaled).</p>
<p>The scale is combined with the item's <a href="qgraphicsitem.html#rotation">rotation</a>(), <a href="qgraphicsitem.html#transform">transform</a>() and <a href="qgraphicsitem.html#transformations">transformations</a>() to map the item's coordinate system to the parent item.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#setScale">setScale</a>(), <a href="qgraphicsitem.html#rotation">rotation</a>(), and <a href="coordsys.html#transformations">Transformations</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/scene"></a>
<h3 class="fn"><a name="scene"></a><a href="qgraphicsscene.html">QGraphicsScene</a> * QGraphicsItem::scene () const</h3>
<p>Returns the current scene for the item, or 0 if the item is not stored in a scene.</p>
<p>To add or move an item to a scene, call <a href="qgraphicsscene.html#addItem">QGraphicsScene::addItem</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/sceneBoundingRect"></a>
<h3 class="fn"><a name="sceneBoundingRect"></a><a href="qrectf.html">QRectF</a> QGraphicsItem::sceneBoundingRect () const</h3>
<p>Returns the bounding rect of this item in scene coordinates, by combining <a href="qgraphicsitem.html#sceneTransform">sceneTransform</a>() with <a href="qgraphicsitem.html#boundingRect">boundingRect</a>().</p>
<p>See also <a href="qgraphicsitem.html#boundingRect">boundingRect</a>() and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/sceneEvent"></a>
<h3 class="fn"><a name="sceneEvent"></a>bool QGraphicsItem::sceneEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This virtual function receives events to this item. Reimplement this function to intercept events before they are dispatched to the specialized event handlers <a href="qgraphicsitem.html#contextMenuEvent">contextMenuEvent</a>(), <a href="qgraphicsitem.html#focusInEvent">focusInEvent</a>(), <a href="qgraphicsitem.html#focusOutEvent">focusOutEvent</a>(), <a href="qgraphicsitem.html#hoverEnterEvent">hoverEnterEvent</a>(), <a href="qgraphicsitem.html#hoverMoveEvent">hoverMoveEvent</a>(), <a href="qgraphicsitem.html#hoverLeaveEvent">hoverLeaveEvent</a>(), <a href="qgraphicsitem.html#keyPressEvent">keyPressEvent</a>(), <a href="qgraphicsitem.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qgraphicsitem.html#mousePressEvent">mousePressEvent</a>(), <a href="qgraphicsitem.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qgraphicsitem.html#mouseMoveEvent">mouseMoveEvent</a>(), and <a href="qgraphicsitem.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>().</p>
<p>Returns true if the event was recognized and handled; otherwise, (e.g&#x2e;, if the event type was not recognized,) false is returned.</p>
<p><i>event</i> is the intercepted event.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/sceneEventFilter"></a>
<h3 class="fn"><a name="sceneEventFilter"></a>bool QGraphicsItem::sceneEventFilter ( QGraphicsItem * <i>watched</i>, <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Filters events for the item <i>watched</i>. <i>event</i> is the filtered event.</p>
<p>Reimplementing this function in a subclass makes it possible for the item to be used as an event filter for other items, intercepting all the events send to those items before they are able to respond.</p>
<p>Reimplementations must return true to prevent further processing of a given event, ensuring that it will not be delivered to the watched item, or return false to indicate that the event should be propagated further by the event system.</p>
<p>See also <a href="qgraphicsitem.html#installSceneEventFilter">installSceneEventFilter</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/scenePos"></a>
<h3 class="fn"><a name="scenePos"></a><a href="qpointf.html">QPointF</a> QGraphicsItem::scenePos () const</h3>
<p>Returns the item's position in scene coordinates. This is equivalent to calling <tt>mapToScene(0, 0)</tt>.</p>
<p>See also <a href="qgraphicsitem.html#pos">pos</a>(), <a href="qgraphicsitem.html#sceneTransform">sceneTransform</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/sceneTransform"></a>
<h3 class="fn"><a name="sceneTransform"></a><a href="qtransform.html">QTransform</a> QGraphicsItem::sceneTransform () const</h3>
<p>Returns this item's scene transformation matrix. This matrix can be used to map coordinates and geometrical shapes from this item's local coordinate system to the scene's coordinate system. To map coordinates from the scene, you must first invert the returned matrix.</p>
<p>Example:</p>
<pre> QGraphicsRectItem rect;
 rect.setPos(100, 100);

 rect.sceneTransform().map(QPointF(0, 0));
<span class="comment"> // returns QPointF(100, 100);</span>

 rect.sceneTransform().inverted().map(QPointF(100, 100));
<span class="comment"> // returns QPointF(0, 0);</span></pre>
<p>Unlike <a href="qgraphicsitem.html#transform">transform</a>(), which returns only an item's local transformation, this function includes the item's (and any parents') position, and all the transfomation properties.</p>
<p>This function was introduced in Qt 4.3.</p>
<p>See also <a href="qgraphicsitem.html#transform">transform</a>(), <a href="qgraphicsitem.html#setTransform">setTransform</a>(), <a href="qgraphicsitem.html#scenePos">scenePos</a>(), <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>, and <a href="coordsys.html#transformations">Transformations</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/scroll"></a>
<h3 class="fn"><a name="scroll"></a>void QGraphicsItem::scroll ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dx</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>dy</i>, const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> = QRectF() )</h3>
<p>Scrolls the contents of <i>rect</i> by <i>dx</i>, <i>dy</i>. If <i>rect</i> is a null rect (the default), the item's bounding rect is scrolled.</p>
<p>Scrolling provides a fast alternative to simply redrawing when the contents of the item (or parts of the item) are shifted vertically or horizontally. Depending on the current transformation and the capabilities of the paint device (i.e&#x2e;, the viewport), this operation may consist of simply moving pixels from one location to another using memmove(). In most cases this is faster than rerendering the entire area.</p>
<p>After scrolling, the item will issue an update for the newly exposed areas. If scrolling is not supported (e.g&#x2e;, you are rendering to an OpenGL viewport, which does not benefit from scroll optimizations), this function is equivalent to calling update(<i>rect</i>).</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#boundingRect">boundingRect</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setAcceptDrops"></a>
<h3 class="fn"><a name="setAcceptDrops"></a>void QGraphicsItem::setAcceptDrops ( bool <i>on</i> )</h3>
<p>If <i>on</i> is true, this item will accept drag and drop events; otherwise, it is transparent for drag and drop events. By default, items do not accept drag and drop events.</p>
<p>See also <a href="qgraphicsitem.html#acceptDrops">acceptDrops</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setAcceptHoverEvents"></a>
<h3 class="fn"><a name="setAcceptHoverEvents"></a>void QGraphicsItem::setAcceptHoverEvents ( bool <i>enabled</i> )</h3>
<p>If <i>enabled</i> is true, this item will accept hover events; otherwise, it will ignore them. By default, items do not accept hover events.</p>
<p>Hover events are delivered when there is no current mouse grabber item. They are sent when the mouse cursor enters an item, when it moves around inside the item, and when the cursor leaves an item. Hover events are commonly used to highlight an item when it's entered, and for tracking the mouse cursor as it hovers over the item (equivalent to <a href="qwidget.html#mouseTracking-prop">QWidget::mouseTracking</a>).</p>
<p>Parent items receive hover enter events before their children, and leave events after their children. The parent does not receive a hover leave event if the cursor enters a child, though; the parent stays &quot;hovered&quot; until the cursor leaves its area, including its children's areas.</p>
<p>If a parent item handles child events, it will receive hover move, drag move, and drop events as the cursor passes through its children, but it does not receive hover enter and hover leave, nor drag enter and drag leave events on behalf of its children.</p>
<p>A <a href="qgraphicswidget.html">QGraphicsWidget</a> with window decorations will accept hover events regardless of the value of <a href="qgraphicsitem.html#acceptHoverEvents">acceptHoverEvents</a>().</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#acceptHoverEvents">acceptHoverEvents</a>(), <a href="qgraphicsitem.html#hoverEnterEvent">hoverEnterEvent</a>(), <a href="qgraphicsitem.html#hoverMoveEvent">hoverMoveEvent</a>(), and <a href="qgraphicsitem.html#hoverLeaveEvent">hoverLeaveEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setAcceptTouchEvents"></a>
<h3 class="fn"><a name="setAcceptTouchEvents"></a>void QGraphicsItem::setAcceptTouchEvents ( bool <i>enabled</i> )</h3>
<p>If <i>enabled</i> is true, this item will accept <a href="qtouchevent.html">touch events</a>; otherwise, it will ignore them. By default, items do not accept touch events.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#acceptTouchEvents">acceptTouchEvents</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setAcceptedMouseButtons"></a>
<h3 class="fn"><a name="setAcceptedMouseButtons"></a>void QGraphicsItem::setAcceptedMouseButtons ( <a href="qt.html#MouseButton-enum">Qt::MouseButtons</a> <i>buttons</i> )</h3>
<p>Sets the mouse <i>buttons</i> that this item accepts mouse events for.</p>
<p>By default, all mouse buttons are accepted. If an item accepts a mouse button, it will become the mouse grabber item when a mouse press event is delivered for that button. However, if the item does not accept the mouse button, <a href="qgraphicsscene.html">QGraphicsScene</a> will forward the mouse events to the first item beneath it that does.</p>
<p>To disable mouse events for an item (i.e&#x2e;, make it transparent for mouse events), call setAcceptedMouseButtons(0).</p>
<p>See also <a href="qgraphicsitem.html#acceptedMouseButtons">acceptedMouseButtons</a>() and <a href="qgraphicsitem.html#mousePressEvent">mousePressEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setActive"></a>
<h3 class="fn"><a name="setActive"></a>void QGraphicsItem::setActive ( bool <i>active</i> )</h3>
<p>If <i>active</i> is true, and the scene is active, this item's panel will be activated. Otherwise, the panel is deactivated.</p>
<p>If the item is not part of an active scene, <i>active</i> will decide what happens to the panel when the scene becomes active or the item is added to the scene. If true, the item's panel will be activated when the item is either added to the scene or the scene is activated. Otherwise, the item will stay inactive independent of the scene's activated state.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#isPanel">isPanel</a>(), <a href="qgraphicsscene.html#setActivePanel">QGraphicsScene::setActivePanel</a>(), and <a href="qgraphicsscene.html#isActive">QGraphicsScene::isActive</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setBoundingRegionGranularity"></a>
<h3 class="fn"><a name="setBoundingRegionGranularity"></a>void QGraphicsItem::setBoundingRegionGranularity ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>granularity</i> )</h3>
<p>Sets the bounding region granularity to <i>granularity</i>; a value between and including 0 and 1. The default value is 0 (i.e&#x2e;, the lowest granularity, where the bounding region corresponds to the item's bounding rectangle).</p>
<p>The granularity is used by <a href="qgraphicsitem.html#boundingRegion">boundingRegion</a>() to calculate how fine the bounding region of the item should be. The highest achievable granularity is 1, where <a href="qgraphicsitem.html#boundingRegion">boundingRegion</a>() will return the finest outline possible for the respective device (e.g&#x2e;, for a <a href="qgraphicsview.html">QGraphicsView</a> viewport, this gives you a pixel-perfect bounding region). The lowest possible granularity is 0. The value of <i>granularity</i> describes the ratio between device resolution and the resolution of the bounding region (e.g&#x2e;, a value of 0.25 will provide a region where each chunk corresponds to 4x4 device units / pixels).</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#boundingRegionGranularity">boundingRegionGranularity</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setCacheMode"></a>
<h3 class="fn"><a name="setCacheMode"></a>void QGraphicsItem::setCacheMode ( <a href="qgraphicsitem.html#CacheMode-enum">CacheMode</a> <i>mode</i>, const <a href="qsize.html">QSize</a> &amp; <i>logicalCacheSize</i> = QSize() )</h3>
<p>Sets the item's cache mode to <i>mode</i>.</p>
<p>The optional <i>logicalCacheSize</i> argument is used only by <a href="qgraphicsitem.html#CacheMode-enum">ItemCoordinateCache</a> mode, and describes the resolution of the cache buffer; if <i>logicalCacheSize</i> is (100, 100), <a href="qgraphicsitem.html">QGraphicsItem</a> will fit the item into 100x100 pixels in graphics memory, regardless of the logical size of the item itself. By default <a href="qgraphicsitem.html">QGraphicsItem</a> uses the size of <a href="qgraphicsitem.html#boundingRect">boundingRect</a>(). For all other cache modes than <a href="qgraphicsitem.html#CacheMode-enum">ItemCoordinateCache</a>, <i>logicalCacheSize</i> is ignored.</p>
<p>Caching can speed up rendering if your item spends a significant time redrawing itself. In some cases the cache can also slow down rendering, in particular when the item spends less time redrawing than <a href="qgraphicsitem.html">QGraphicsItem</a> spends redrawing from the cache. When enabled, the item's <a href="qgraphicsitem.html#paint">paint</a>() function will be called only once for each call to <a href="qgraphicsitem.html#update">update</a>(); for any subsequent repaint requests, the Graphics View framework will redraw from the cache. This approach works particularly well with <a href="qglwidget.html">QGLWidget</a>, which stores all the cache as OpenGL textures.</p>
<p>Be aware that <a href="qpixmapcache.html">QPixmapCache</a>'s cache limit may need to be changed to obtain optimal performance.</p>
<p>You can read more about the different cache modes in the <a href="qgraphicsitem.html#CacheMode-enum">CacheMode</a> documentation.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#cacheMode">cacheMode</a>(), <a href="qgraphicsitem.html#CacheMode-enum">CacheMode</a>, and <a href="qpixmapcache.html#setCacheLimit">QPixmapCache::setCacheLimit</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setCursor"></a>
<h3 class="fn"><a name="setCursor"></a>void QGraphicsItem::setCursor ( const <a href="qcursor.html">QCursor</a> &amp; <i>cursor</i> )</h3>
<p>Sets the current cursor shape for the item to <i>cursor</i>. The mouse cursor will assume this shape when it's over this item. See the <a href="qt.html#CursorShape-enum">list of predefined cursor objects</a> for a range of useful shapes.</p>
<p>An editor item might want to use an I-beam cursor:</p>
<pre> item-&gt;setCursor(Qt::IBeamCursor);</pre>
<p>If no cursor has been set, the cursor of the item beneath is used.</p>
<p>See also <a href="qgraphicsitem.html#cursor">cursor</a>(), <a href="qgraphicsitem.html#hasCursor">hasCursor</a>(), <a href="qgraphicsitem.html#unsetCursor">unsetCursor</a>(), <a href="qwidget.html#cursor-prop">QWidget::cursor</a>, and <a href="qapplication.html#overrideCursor">QApplication::overrideCursor</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setData"></a>
<h3 class="fn"><a name="setData"></a>void QGraphicsItem::setData ( int <i>key</i>, const <a href="qvariant.html">QVariant</a> &amp; <i>value</i> )</h3>
<p>Sets this item's custom data for the key <i>key</i> to <i>value</i>.</p>
<p>Custom item data is useful for storing arbitrary properties for any item. Qt does not use this feature for storing data; it is provided solely for the convenience of the user.</p>
<p>See also <a href="qgraphicsitem.html#data">data</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setEnabled"></a>
<h3 class="fn"><a name="setEnabled"></a>void QGraphicsItem::setEnabled ( bool <i>enabled</i> )</h3>
<p>If <i>enabled</i> is true, the item is enabled; otherwise, it is disabled.</p>
<p>Disabled items are visible, but they do not receive any events, and cannot take focus nor be selected. Mouse events are discarded; they are not propagated unless the item is also invisible, or if it does not accept mouse events (see <a href="qgraphicsitem.html#acceptedMouseButtons">acceptedMouseButtons</a>()). A disabled item cannot become the mouse grabber, and as a result of this, an item loses the grab if it becomes disabled when grabbing the mouse, just like it loses focus if it had focus when it was disabled.</p>
<p>Disabled items are traditionally drawn using grayed-out colors (see <a href="qpalette.html#ColorGroup-enum">QPalette::Disabled</a>).</p>
<p>If you disable a parent item, all its children will also be disabled. If you enable a parent item, all children will be enabled, unless they have been explicitly disabled (i.e&#x2e;, if you call setEnabled(false) on a child, it will not be reenabled if its parent is disabled, and then enabled again).</p>
<p>Items are enabled by default.</p>
<p><b>Note:</b> If you install an event filter, you can still intercept events before they are delivered to items; this mechanism disregards the item's enabled state.</p>
<p>See also <a href="qgraphicsitem.html#isEnabled">isEnabled</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setFiltersChildEvents"></a>
<h3 class="fn"><a name="setFiltersChildEvents"></a>void QGraphicsItem::setFiltersChildEvents ( bool <i>enabled</i> )</h3>
<p>If <i>enabled</i> is true, this item is set to filter all events for all its children (i.e&#x2e;, all events intented for any of its children are instead sent to this item); otherwise, if <i>enabled</i> is false, this item will only handle its own events. The default value is false.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#filtersChildEvents">filtersChildEvents</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setFlag"></a>
<h3 class="fn"><a name="setFlag"></a>void QGraphicsItem::setFlag ( <a href="qgraphicsitem.html#GraphicsItemFlag-enum">GraphicsItemFlag</a> <i>flag</i>, bool <i>enabled</i> = true )</h3>
<p>If <i>enabled</i> is true, the item flag <i>flag</i> is enabled; otherwise, it is disabled.</p>
<p>See also <a href="qgraphicsitem.html#flags">flags</a>() and <a href="qgraphicsitem.html#setFlags">setFlags</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setFlags"></a>
<h3 class="fn"><a name="setFlags"></a>void QGraphicsItem::setFlags ( <a href="qgraphicsitem.html#GraphicsItemFlag-enum">GraphicsItemFlags</a> <i>flags</i> )</h3>
<p>Sets the item flags to <i>flags</i>. All flags in <i>flags</i> are enabled; all flags not in <i>flags</i> are disabled.</p>
<p>If the item had focus and <i>flags</i> does not enable <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsFocusable</a>, the item loses focus as a result of calling this function. Similarly, if the item was selected, and <i>flags</i> does not enabled <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsSelectable</a>, the item is automatically unselected.</p>
<p>By default, no flags are enabled. (<a href="qgraphicswidget.html">QGraphicsWidget</a> enables the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemSendsGeometryChanges</a> flag by default in order to track position changes.)</p>
<p>See also <a href="qgraphicsitem.html#flags">flags</a>() and <a href="qgraphicsitem.html#setFlag">setFlag</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setFocus"></a>
<h3 class="fn"><a name="setFocus"></a>void QGraphicsItem::setFocus ( <a href="qt.html#FocusReason-enum">Qt::FocusReason</a> <i>focusReason</i> = Qt::OtherFocusReason )</h3>
<p>Gives keyboard input focus to this item. The <i>focusReason</i> argument will be passed into any <a href="qfocusevent.html">focus event</a> generated by this function; it is used to give an explanation of what caused the item to get focus.</p>
<p>Only enabled items that set the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsFocusable</a> flag can accept keyboard focus.</p>
<p>If this item is not visible, not active, or not associated with a scene, it will not gain immediate input focus. However, it will be registered as the preferred focus item for its subtree of items, should it later become visible.</p>
<p>As a result of calling this function, this item will receive a <a href="qgraphicsitem.html#focusInEvent">focus in event</a> with <i>focusReason</i>. If another item already has focus, that item will first receive a <a href="qgraphicsitem.html#focusOutEvent">focus out event</a> indicating that it has lost input focus.</p>
<p>See also <a href="qgraphicsitem.html#clearFocus">clearFocus</a>(), <a href="qgraphicsitem.html#hasFocus">hasFocus</a>(), <a href="qgraphicsitem.html#focusItem">focusItem</a>(), and <a href="qgraphicsitem.html#focusProxy">focusProxy</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setFocusProxy"></a>
<h3 class="fn"><a name="setFocusProxy"></a>void QGraphicsItem::setFocusProxy ( QGraphicsItem * <i>item</i> )</h3>
<p>Sets the item's focus proxy to <i>item</i>.</p>
<p>If an item has a focus proxy, the focus proxy will receive input focus when the item gains input focus. The item itself will still have focus (i.e&#x2e;, <a href="qgraphicsitem.html#hasFocus">hasFocus</a>() will return true), but only the focus proxy will receive the keyboard input.</p>
<p>A focus proxy can itself have a focus proxy, and so on. In such case, keyboard input will be handled by the outermost focus proxy.</p>
<p>The focus proxy <i>item</i> must belong to the same scene as this item.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#focusProxy">focusProxy</a>(), <a href="qgraphicsitem.html#setFocus">setFocus</a>(), and <a href="qgraphicsitem.html#hasFocus">hasFocus</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setGraphicsEffect"></a>
<h3 class="fn"><a name="setGraphicsEffect"></a>void QGraphicsItem::setGraphicsEffect ( <a href="qgraphicseffect.html">QGraphicsEffect</a> * <i>effect</i> )</h3>
<p>Sets <i>effect</i> as the item's effect. If there already is an effect installed on this item, <a href="qgraphicsitem.html">QGraphicsItem</a> will delete the existing effect before installing the new <i>effect</i>.</p>
<p>If <i>effect</i> is the installed on a different item, setGraphicsEffect() will remove the effect from the item and install it on this item.</p>
<p><a href="qgraphicsitem.html">QGraphicsItem</a> takes ownership of <i>effect</i>.</p>
<p><b>Note:</b> This function will apply the effect on itself and all its children.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#graphicsEffect">graphicsEffect</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setGroup"></a>
<h3 class="fn"><a name="setGroup"></a>void QGraphicsItem::setGroup ( <a href="qgraphicsitemgroup.html">QGraphicsItemGroup</a> * <i>group</i> )</h3>
<p>Adds this item to the item group <i>group</i>. If <i>group</i> is 0, this item is removed from any current group and added as a child of the previous group's parent.</p>
<p>See also <a href="qgraphicsitem.html#group">group</a>() and <a href="qgraphicsscene.html#createItemGroup">QGraphicsScene::createItemGroup</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setInputMethodHints"></a>
<h3 class="fn"><a name="setInputMethodHints"></a>void QGraphicsItem::setInputMethodHints ( <a href="qt.html#InputMethodHint-enum">Qt::InputMethodHints</a> <i>hints</i> )</h3>
<p>Sets the current input method hints of this item to <i>hints</i>.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#inputMethodHints">inputMethodHints</a>(), <a href="qgraphicsitem.html#inputMethodQuery">inputMethodQuery</a>(), and <a href="qinputcontext.html">QInputContext</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setOpacity"></a>
<h3 class="fn"><a name="setOpacity"></a>void QGraphicsItem::setOpacity ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>opacity</i> )</h3>
<p>Sets this item's local <i>opacity</i>, between 0.0 (transparent) and 1.0 (opaque). The item's local opacity is combined with parent and ancestor opacities into the <a href="qgraphicsitem.html#effectiveOpacity">effectiveOpacity</a>().</p>
<p>By default, opacity propagates from parent to child, so if a parent's opacity is 0.5 and the child is also 0.5, the child's effective opacity will be 0.25.</p>
<p>The opacity property decides the state of the painter passed to the <a href="qgraphicsitem.html#paint">paint</a>() function. If the item is cached, i.e&#x2e;, <a href="qgraphicsitem.html#CacheMode-enum">ItemCoordinateCache</a> or <a href="qgraphicsitem.html#CacheMode-enum">DeviceCoordinateCache</a>, the effective property will be applied to the item's cache as it is rendered.</p>
<p>There are two item flags that affect how the item's opacity is combined with the parent: <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIgnoresParentOpacity</a> and <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemDoesntPropagateOpacityToChildren</a>.</p>
<p>This function was introduced in Qt 4.5.</p>
<p>See also <a href="qgraphicsitem.html#opacity">opacity</a>() and <a href="qgraphicsitem.html#effectiveOpacity">effectiveOpacity</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setPanelModality"></a>
<h3 class="fn"><a name="setPanelModality"></a>void QGraphicsItem::setPanelModality ( <a href="qgraphicsitem.html#PanelModality-enum">PanelModality</a> <i>panelModality</i> )</h3>
<p>Sets the modality for this item to <i>panelModality</i>.</p>
<p>Changing the modality of a visible item takes effect immediately.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#panelModality">panelModality</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setParentItem"></a>
<h3 class="fn"><a name="setParentItem"></a>void QGraphicsItem::setParentItem ( QGraphicsItem * <i>newParent</i> )</h3>
<p>Sets this item's parent item to <i>newParent</i>. If this item already has a parent, it is first removed from the previous parent. If <i>newParent</i> is 0, this item will become a top-level item.</p>
<p>Note that this implicitly adds this graphics item to the scene of the parent. You should not <a href="qgraphicsscene.html#addItem">add</a> the item to the scene yourself.</p>
<p>Calling this function on an item that is an ancestor of <i>newParent</i> have undefined behaviour.</p>
<p>See also <a href="qgraphicsitem.html#parentItem">parentItem</a>() and <a href="qgraphicsitem.html#childItems">childItems</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setPos"></a>
<h3 class="fn"><a name="setPos"></a>void QGraphicsItem::setPos ( const <a href="qpointf.html">QPointF</a> &amp; <i>pos</i> )</h3>
<p>Sets the position of the item to <i>pos</i>, which is in parent coordinates. For items with no parent, <i>pos</i> is in scene coordinates.</p>
<p>The position of the item describes its origin (local coordinate (0, 0)) in parent coordinates.</p>
<p>See also <a href="qgraphicsitem.html#pos">pos</a>(), <a href="qgraphicsitem.html#scenePos">scenePos</a>(), and <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>.</p>
<h3 class="fn"><a name="setPos-2"></a>void QGraphicsItem::setPos ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> )</h3>
<p>This is an overloaded function.</p>
<p>This convenience function is equivalent to calling setPos(<a href="qpointf.html">QPointF</a>(<i>x</i>, <i>y</i>)).</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setRotation"></a>
<h3 class="fn"><a name="setRotation"></a>void QGraphicsItem::setRotation ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>angle</i> )</h3>
<p>Sets the clockwise rotation <i>angle</i>, in degrees, around the Z axis. The default value is 0 (i.e&#x2e;, the item is not rotated). Assigning a negative value will rotate the item counter-clockwise. Normally the rotation angle is in the range (-360, 360), but it's also possible to assign values outside of this range (e.g&#x2e;, a rotation of 370 degrees is the same as a rotation of 10 degrees).</p>
<p>The item is rotated around its transform origin point, which by default is (0, 0). You can select a different transformation origin by calling <a href="qgraphicsitem.html#setTransformOriginPoint">setTransformOriginPoint</a>().</p>
<p>The rotation is combined with the item's <a href="qgraphicsitem.html#scale">scale</a>(), <a href="qgraphicsitem.html#transform">transform</a>() and <a href="qgraphicsitem.html#transformations">transformations</a>() to map the item's coordinate system to the parent item.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#rotation">rotation</a>(), <a href="qgraphicsitem.html#setTransformOriginPoint">setTransformOriginPoint</a>(), and <a href="coordsys.html#transformations">Transformations</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setScale"></a>
<h3 class="fn"><a name="setScale"></a>void QGraphicsItem::setScale ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>factor</i> )</h3>
<p>Sets the scale <i>factor</i> of the item. The default scale factor is 1.0 (i.e&#x2e;, the item is not scaled). A scale factor of 0.0 will collapse the item to a single point. If you provide a negative scale factor, the item will be flipped and mirrored (i.e&#x2e;, rotated 180 degrees).</p>
<p>The item is scaled around its transform origin point, which by default is (0, 0). You can select a different transformation origin by calling <a href="qgraphicsitem.html#setTransformOriginPoint">setTransformOriginPoint</a>().</p>
<p>The scale is combined with the item's <a href="qgraphicsitem.html#rotation">rotation</a>(), <a href="qgraphicsitem.html#transform">transform</a>() and <a href="qgraphicsitem.html#transformations">transformations</a>() to map the item's coordinate system to the parent item.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#scale">scale</a>(), <a href="qgraphicsitem.html#setTransformOriginPoint">setTransformOriginPoint</a>(), and <a href="coordsys.html#transformations">Transformations</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setSelected"></a>
<h3 class="fn"><a name="setSelected"></a>void QGraphicsItem::setSelected ( bool <i>selected</i> )</h3>
<p>If <i>selected</i> is true and this item is selectable, this item is selected; otherwise, it is unselected.</p>
<p>If the item is in a group, the whole group's selected state is toggled by this function. If the group is selected, all items in the group are also selected, and if the group is not selected, no item in the group is selected.</p>
<p>Only visible, enabled, selectable items can be selected. If <i>selected</i> is true and this item is either invisible or disabled or unselectable, this function does nothing.</p>
<p>By default, items cannot be selected. To enable selection, set the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsSelectable</a> flag.</p>
<p>This function is provided for convenience, allowing individual toggling of the selected state of an item. However, a more common way of selecting items is to call <a href="qgraphicsscene.html#setSelectionArea">QGraphicsScene::setSelectionArea</a>(), which will call this function for all visible, enabled, and selectable items within a specified area on the scene.</p>
<p>See also <a href="qgraphicsitem.html#isSelected">isSelected</a>() and <a href="qgraphicsscene.html#selectedItems">QGraphicsScene::selectedItems</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setToolTip"></a>
<h3 class="fn"><a name="setToolTip"></a>void QGraphicsItem::setToolTip ( const <a href="qstring.html">QString</a> &amp; <i>toolTip</i> )</h3>
<p>Sets the item's tool tip to <i>toolTip</i>. If <i>toolTip</i> is empty, the item's tool tip is cleared.</p>
<p>See also <a href="qgraphicsitem.html#toolTip">toolTip</a>() and <a href="qtooltip.html">QToolTip</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setTransform"></a>
<h3 class="fn"><a name="setTransform"></a>void QGraphicsItem::setTransform ( const <a href="qtransform.html">QTransform</a> &amp; <i>matrix</i>, bool <i>combine</i> = false )</h3>
<p>Sets the item's current transformation matrix to <i>matrix</i>.</p>
<p>If <i>combine</i> is true, then <i>matrix</i> is combined with the current matrix; otherwise, <i>matrix</i> <i>replaces</i> the current matrix. <i>combine</i> is false by default.</p>
<p>To simplify interation with items using a transformed view, <a href="qgraphicsitem.html">QGraphicsItem</a> provides mapTo... and mapFrom... functions that can translate between items' and the scene's coordinates. For example, you can call <a href="qgraphicsitem.html#mapToScene">mapToScene</a>() to map an item coordiate to a scene coordinate, or <a href="qgraphicsitem.html#mapFromScene">mapFromScene</a>() to map from scene coordinates to item coordinates.</p>
<p>The transformation matrix is combined with the item's <a href="qgraphicsitem.html#rotation">rotation</a>(), <a href="qgraphicsitem.html#scale">scale</a>() and <a href="qgraphicsitem.html#transformations">transformations</a>() into a combined transformation that maps the item's coordinate system to its parent.</p>
<p>This function was introduced in Qt 4.3.</p>
<p>See also <a href="qgraphicsitem.html#transform">transform</a>(), <a href="qgraphicsitem.html#setRotation">setRotation</a>(), <a href="qgraphicsitem.html#setScale">setScale</a>(), <a href="qgraphicsitem.html#setTransformOriginPoint">setTransformOriginPoint</a>(), <a href="graphicsview.html#the-graphics-view-coordinate-system">The Graphics View Coordinate System</a>, and <a href="coordsys.html#transformations">Transformations</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setTransformOriginPoint"></a>
<h3 class="fn"><a name="setTransformOriginPoint"></a>void QGraphicsItem::setTransformOriginPoint ( const <a href="qpointf.html">QPointF</a> &amp; <i>origin</i> )</h3>
<p>Sets the <i>origin</i> point for the transformation in item coordinates.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#transformOriginPoint">transformOriginPoint</a>() and <a href="coordsys.html#transformations">Transformations</a>.</p>
<h3 class="fn"><a name="setTransformOriginPoint-2"></a>void QGraphicsItem::setTransformOriginPoint ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the origin point for the transformation in item coordinates. This is equivalent to calling setTransformOriginPoint(<a href="qpointf.html">QPointF</a>(<i>x</i>, <i>y</i>)).</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#setTransformOriginPoint">setTransformOriginPoint</a>() and <a href="coordsys.html#transformations">Transformations</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setTransformations"></a>
<h3 class="fn"><a name="setTransformations"></a>void QGraphicsItem::setTransformations ( const <a href="qlist.html">QList</a>&lt;<a href="qgraphicstransform.html">QGraphicsTransform</a> *&gt; &amp; <i>transformations</i> )</h3>
<p>Sets a list of graphics <i>transformations</i> (<a href="qgraphicstransform.html">QGraphicsTransform</a>) that currently apply to this item.</p>
<p>If all you want is to rotate or scale an item, you should call <a href="qgraphicsitem.html#setRotation">setRotation</a>() or <a href="qgraphicsitem.html#setScale">setScale</a>() instead. If you want to set an arbitrary transformation on an item, you can call <a href="qgraphicsitem.html#setTransform">setTransform</a>().</p>
<p><a href="qgraphicstransform.html">QGraphicsTransform</a> is for applying and controlling a chain of individual transformation operations on an item. It's particularily useful in animations, where each transform operation needs to be interpolated independently, or differently.</p>
<p>The transformations are combined with the item's <a href="qgraphicsitem.html#rotation">rotation</a>(), <a href="qgraphicsitem.html#scale">scale</a>() and <a href="qgraphicsitem.html#transform">transform</a>() to map the item's coordinate system to the parent item.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#transformations">transformations</a>(), <a href="qgraphicsitem.html#scale">scale</a>(), <a href="qgraphicsitem.html#setTransformOriginPoint">setTransformOriginPoint</a>(), and <a href="coordsys.html#transformations">Transformations</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setVisible"></a>
<h3 class="fn"><a name="setVisible"></a>void QGraphicsItem::setVisible ( bool <i>visible</i> )</h3>
<p>If <i>visible</i> is true, the item is made visible. Otherwise, the item is made invisible. Invisible items are not painted, nor do they receive any events. In particular, mouse events pass right through invisible items, and are delivered to any item that may be behind. Invisible items are also unselectable, they cannot take input focus, and are not detected by <a href="qgraphicsscene.html">QGraphicsScene</a>'s item location functions.</p>
<p>If an item becomes invisible while grabbing the mouse, (i.e&#x2e;, while it is receiving mouse events,) it will automatically lose the mouse grab, and the grab is not regained by making the item visible again; it must receive a new mouse press to regain the mouse grab.</p>
<p>Similarly, an invisible item cannot have focus, so if the item has focus when it becomes invisible, it will lose focus, and the focus is not regained by simply making the item visible again.</p>
<p>If you hide a parent item, all its children will also be hidden. If you show a parent item, all children will be shown, unless they have been explicitly hidden (i.e&#x2e;, if you call setVisible(false) on a child, it will not be reshown even if its parent is hidden, and then shown again).</p>
<p>Items are visible by default; it is unnecessary to call setVisible() on a new item.</p>
<p>See also <a href="qgraphicsitem.html#isVisible">isVisible</a>(), <a href="qgraphicsitem.html#show">show</a>(), and <a href="qgraphicsitem.html#hide">hide</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setX"></a>
<h3 class="fn"><a name="setX"></a>void QGraphicsItem::setX ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i> )</h3>
<p>Set's the <i>x</i> coordinate of the item's position. Equivalent to calling setPos(x, <a href="qgraphicsitem.html#y">y</a>()).</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#x">x</a>() and <a href="qgraphicsitem.html#setPos">setPos</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setY"></a>
<h3 class="fn"><a name="setY"></a>void QGraphicsItem::setY ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i> )</h3>
<p>Set's the <i>y</i> coordinate of the item's position. Equivalent to calling setPos(<a href="qgraphicsitem.html#x">x</a>(), y).</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#y">y</a>(), <a href="qgraphicsitem.html#x">x</a>(), and <a href="qgraphicsitem.html#setPos">setPos</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/setZValue"></a>
<h3 class="fn"><a name="setZValue"></a>void QGraphicsItem::setZValue ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>z</i> )</h3>
<p>Sets the Z-value of the item to <i>z</i>. The Z value decides the stacking order of sibling (neighboring) items. A sibling item of high Z value will always be drawn on top of another sibling item with a lower Z value.</p>
<p>If you restore the Z value, the item's insertion order will decide its stacking order.</p>
<p>The Z-value does not affect the item's size in any way.</p>
<p>The default Z-value is 0.</p>
<p>See also <a href="qgraphicsitem.html#zValue">zValue</a>(), <a href="qgraphicsitem.html#sorting">Sorting</a>, <a href="qgraphicsitem.html#stackBefore">stackBefore</a>(), and <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemStacksBehindParent</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/shape"></a>
<h3 class="fn"><a name="shape"></a><a href="qpainterpath.html">QPainterPath</a> QGraphicsItem::shape () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns the shape of this item as a <a href="qpainterpath.html">QPainterPath</a> in local coordinates. The shape is used for many things, including collision detection, hit tests, and for the <a href="qgraphicsscene.html#items">QGraphicsScene::items</a>() functions.</p>
<p>The default implementation calls <a href="qgraphicsitem.html#boundingRect">boundingRect</a>() to return a simple rectangular shape, but subclasses can reimplement this function to return a more accurate shape for non-rectangular items. For example, a round item may choose to return an elliptic shape for better collision detection. For example:</p>
<pre> QPainterPath RoundItem::shape() const
 {
     QPainterPath path;
     path.addEllipse(boundingRect());
     return path;
 }</pre>
<p>The outline of a shape can vary depending on the width and style of the pen used when drawing. If you want to include this outline in the item's shape, you can create a shape from the stroke using <a href="qpainterpathstroker.html">QPainterPathStroker</a>.</p>
<p>This function is called by the default implementations of <a href="qgraphicsitem.html#contains">contains</a>() and <a href="qgraphicsitem.html#collidesWithPath">collidesWithPath</a>().</p>
<p>See also <a href="qgraphicsitem.html#boundingRect">boundingRect</a>(), <a href="qgraphicsitem.html#contains">contains</a>(), <a href="qgraphicsitem.html#prepareGeometryChange">prepareGeometryChange</a>(), and <a href="qpainterpathstroker.html">QPainterPathStroker</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/show"></a>
<h3 class="fn"><a name="show"></a>void QGraphicsItem::show ()</h3>
<p>Shows the item. (Items are visible by default.)</p>
<p>This convenience function is equivalent to calling <tt>setVisible(true)</tt>.</p>
<p>See also <a href="qgraphicsitem.html#hide">hide</a>() and <a href="qgraphicsitem.html#setVisible">setVisible</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/stackBefore"></a>
<h3 class="fn"><a name="stackBefore"></a>void QGraphicsItem::stackBefore ( const QGraphicsItem * <i>sibling</i> )</h3>
<p>Stacks this item before <i>sibling</i>, which must be a sibling item (i.e&#x2e;, the two items must share the same parent item, or must both be toplevel items). The <i>sibling</i> must have the same Z value as this item, otherwise calling this function will have no effect.</p>
<p>By default, all sibling items are stacked by insertion order (i.e&#x2e;, the first item you add is drawn before the next item you add). If two items' Z values are different, then the item with the highest Z value is drawn on top. When the Z values are the same, the insertion order will decide the stacking order.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#setZValue">setZValue</a>(), <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemStacksBehindParent</a>, and <a href="qgraphicsitem.html#sorting">Sorting</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/toGraphicsObject"></a>
<h3 class="fn"><a name="toGraphicsObject"></a><a href="qgraphicsobject.html">QGraphicsObject</a> * QGraphicsItem::toGraphicsObject ()</h3>
<p>Return the graphics item cast to a <a href="qgraphicsobject.html">QGraphicsObject</a>, if the class is actually a graphics object, 0 otherwise.</p>
<p>This function was introduced in Qt 4.6.</p>
<h3 class="fn"><a name="toGraphicsObject-2"></a>const <a href="qgraphicsobject.html">QGraphicsObject</a> * QGraphicsItem::toGraphicsObject () const</h3>
<p>Return the graphics item cast to a <a href="qgraphicsobject.html">QGraphicsObject</a>, if the class is actually a graphics object, 0 otherwise.</p>
<p>This function was introduced in Qt 4.6.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/toolTip"></a>
<h3 class="fn"><a name="toolTip"></a><a href="qstring.html">QString</a> QGraphicsItem::toolTip () const</h3>
<p>Returns the item's tool tip, or an empty <a href="qstring.html">QString</a> if no tool tip has been set.</p>
<p>See also <a href="qgraphicsitem.html#setToolTip">setToolTip</a>() and <a href="qtooltip.html">QToolTip</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/topLevelItem"></a>
<h3 class="fn"><a name="topLevelItem"></a>QGraphicsItem * QGraphicsItem::topLevelItem () const</h3>
<p>Returns this item's top-level item. The top-level item is the item's topmost ancestor item whose parent is 0. If an item has no parent, its own pointer is returned (i.e&#x2e;, a top-level item is its own top-level item).</p>
<p>See also <a href="qgraphicsitem.html#parentItem">parentItem</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/topLevelWidget"></a>
<h3 class="fn"><a name="topLevelWidget"></a><a href="qgraphicswidget.html">QGraphicsWidget</a> * QGraphicsItem::topLevelWidget () const</h3>
<p>Returns a pointer to the item's top level widget (i.e&#x2e;, the item's ancestor whose parent is 0, or whose parent is not a widget), or 0 if this item does not have a top level widget. If the item is its own top level widget, this function returns a pointer to the item itself.</p>
<p>This function was introduced in Qt 4.4.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/transform"></a>
<h3 class="fn"><a name="transform"></a><a href="qtransform.html">QTransform</a> QGraphicsItem::transform () const</h3>
<p>Returns this item's transformation matrix.</p>
<p>The transformation matrix is combined with the item's <a href="qgraphicsitem.html#rotation">rotation</a>(), <a href="qgraphicsitem.html#scale">scale</a>() and <a href="qgraphicsitem.html#transformations">transformations</a>() into a combined transformations for the item.</p>
<p>The default transformation matrix is an identity matrix.</p>
<p>This function was introduced in Qt 4.3.</p>
<p>See also <a href="qgraphicsitem.html#setTransform">setTransform</a>() and <a href="qgraphicsitem.html#sceneTransform">sceneTransform</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/transformOriginPoint"></a>
<h3 class="fn"><a name="transformOriginPoint"></a><a href="qpointf.html">QPointF</a> QGraphicsItem::transformOriginPoint () const</h3>
<p>Returns the origin point for the transformation in item coordinates.</p>
<p>The default is <a href="qpointf.html">QPointF</a>(0,0).</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#setTransformOriginPoint">setTransformOriginPoint</a>() and <a href="coordsys.html#transformations">Transformations</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/transformations"></a>
<h3 class="fn"><a name="transformations"></a><a href="qlist.html">QList</a>&lt;<a href="qgraphicstransform.html">QGraphicsTransform</a> *&gt; QGraphicsItem::transformations () const</h3>
<p>Returns a list of graphics transforms that currently apply to this item.</p>
<p><a href="qgraphicstransform.html">QGraphicsTransform</a> is for applying and controlling a chain of individual transformation operations on an item. It's particularily useful in animations, where each transform operation needs to be interpolated independently, or differently.</p>
<p>The transformations are combined with the item's <a href="qgraphicsitem.html#rotation">rotation</a>(), <a href="qgraphicsitem.html#scale">scale</a>() and <a href="qgraphicsitem.html#transform">transform</a>() to map the item's coordinate system to the parent item.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qgraphicsitem.html#setTransformations">setTransformations</a>(), <a href="qgraphicsitem.html#scale">scale</a>(), <a href="qgraphicsitem.html#rotation">rotation</a>(), <a href="qgraphicsitem.html#transformOriginPoint">transformOriginPoint</a>(), and <a href="coordsys.html#transformations">Transformations</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/type"></a>
<h3 class="fn"><a name="type"></a>int QGraphicsItem::type () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns the type of an item as an int. All standard graphicsitem classes are associated with a unique value; see <a href="qgraphicsitem.html#Type-var">QGraphicsItem::Type</a>. This type information is used by <a href="qgraphicsitem.html#qgraphicsitem_cast">qgraphicsitem_cast</a>() to distinguish between types.</p>
<p>The default implementation (in <a href="qgraphicsitem.html">QGraphicsItem</a>) returns <a href="qgraphicsitem.html#UserType-var">UserType</a>.</p>
<p>To enable use of <a href="qgraphicsitem.html#qgraphicsitem_cast">qgraphicsitem_cast</a>() with a custom item, reimplement this function and declare a Type enum value equal to your custom item's type. Custom items must return a value larger than or equal to <a href="qgraphicsitem.html#UserType-var">UserType</a> (65536).</p>
<p>For example:</p>
<pre> class CustomItem : public QGraphicsItem
 {
    ...
    enum { Type = UserType + 1 };

    int type() const
    {
        <span class="comment">// Enable the use of qgraphicsitem_cast with this item.</span>
        return Type;
    }
    ...
 };</pre>
<p>See also <a href="qgraphicsitem.html#UserType-var">UserType</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/ungrabKeyboard"></a>
<h3 class="fn"><a name="ungrabKeyboard"></a>void QGraphicsItem::ungrabKeyboard ()</h3>
<p>Releases the keyboard grab.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#grabKeyboard">grabKeyboard</a>() and <a href="qgraphicsitem.html#ungrabMouse">ungrabMouse</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/ungrabMouse"></a>
<h3 class="fn"><a name="ungrabMouse"></a>void QGraphicsItem::ungrabMouse ()</h3>
<p>Releases the mouse grab.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#grabMouse">grabMouse</a>() and <a href="qgraphicsitem.html#ungrabKeyboard">ungrabKeyboard</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/unsetCursor"></a>
<h3 class="fn"><a name="unsetCursor"></a>void QGraphicsItem::unsetCursor ()</h3>
<p>Clears the cursor from this item.</p>
<p>See also <a href="qgraphicsitem.html#hasCursor">hasCursor</a>() and <a href="qgraphicsitem.html#setCursor">setCursor</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/update"></a>
<h3 class="fn"><a name="update"></a>void QGraphicsItem::update ( const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> = QRectF() )</h3>
<p>Schedules a redraw of the area covered by <i>rect</i> in this item. You can call this function whenever your item needs to be redrawn, such as if it changes appearance or size.</p>
<p>This function does not cause an immediate paint; instead it schedules a paint request that is processed by <a href="qgraphicsview.html">QGraphicsView</a> after control reaches the event loop. The item will only be redrawn if it is visible in any associated view.</p>
<p>As a side effect of the item being repainted, other items that overlap the area <i>rect</i> may also be repainted.</p>
<p>If the item is invisible (i.e&#x2e;, <a href="qgraphicsitem.html#isVisible">isVisible</a>() returns false), this function does nothing.</p>
<p>See also <a href="qgraphicsitem.html#paint">paint</a>() and <a href="qgraphicsitem.html#boundingRect">boundingRect</a>().</p>
<h3 class="fn"><a name="update-2"></a>void QGraphicsItem::update ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>x</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>y</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>width</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>height</i> )</h3>
<p>This is an overloaded function.</p>
<p>This convenience function is equivalent to calling update(<a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>width</i>, <i>height</i>)).</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/wheelEvent"></a>
<h3 class="fn"><a name="wheelEvent"></a>void QGraphicsItem::wheelEvent ( <a href="qgraphicsscenewheelevent.html">QGraphicsSceneWheelEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented to receive wheel events for this item. If you reimplement this function, <i>event</i> will be accepted by default.</p>
<p>If you ignore the event, (i.e&#x2e;, by calling <a href="qevent.html#ignore">QEvent::ignore</a>(),) it will propagate to any item beneath this item. If no items accept the event, it will be ignored by the scene, and propagate to the view (e.g&#x2e;, the view's vertical scroll bar).</p>
<p>The default implementation ignores the event.</p>
<p>See also <a href="qgraphicsitem.html#sceneEvent">sceneEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/window"></a>
<h3 class="fn"><a name="window"></a><a href="qgraphicswidget.html">QGraphicsWidget</a> * QGraphicsItem::window () const</h3>
<p>Returns the item's window, or 0 if this item does not have a window. If the item is a window, it will return itself. Otherwise it will return the closest ancestor that is a window.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qgraphicsitem.html#isWindow">QGraphicsWidget::isWindow</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/x"></a>
<h3 class="fn"><a name="x"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QGraphicsItem::x () const</h3>
<p>This convenience function is equivalent to calling <a href="qgraphicsitem.html#pos">pos</a>().x().</p>
<p>See also <a href="qgraphicsitem.html#setX">setX</a>() and <a href="qgraphicsitem.html#y">y</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/y"></a>
<h3 class="fn"><a name="y"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QGraphicsItem::y () const</h3>
<p>This convenience function is equivalent to calling <a href="qgraphicsitem.html#pos">pos</a>().y().</p>
<p>See also <a href="qgraphicsitem.html#setY">setY</a>() and <a href="qgraphicsitem.html#x">x</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsItem/zValue"></a>
<h3 class="fn"><a name="zValue"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QGraphicsItem::zValue () const</h3>
<p>Returns the Z-value of the item. The Z-value affects the stacking order of sibling (neighboring) items.</p>
<p>The default Z-value is 0.</p>
<p>See also <a href="qgraphicsitem.html#setZValue">setZValue</a>(), <a href="qgraphicsitem.html#sorting">Sorting</a>, <a href="qgraphicsitem.html#stackBefore">stackBefore</a>(), and <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemStacksBehindParent</a>.</p>
<hr />
<h2>Member Variable Documentation</h2>
<a name="//apple_ref/cpp/data/QGraphicsItem/Type"></a>
<h3 class="fn"><a name="Type-var"></a>const int QGraphicsItem::Type</h3>
<p>The type value returned by the virtual <a href="qgraphicsitem.html#type">type</a>() function in standard graphics item classes in Qt. All such standard graphics item classes in Qt are associated with a unique value for Type, e.g&#x2e; the value returned by <a href="qgraphicspathitem.html#type">QGraphicsPathItem::type</a>() is 2.</p>
<pre> class QGraphicsPathItem : public QAbstractGraphicsShapeItem
 {
  public:
   enum { Type = 2 };
     int type() const { return Type; }
   ...
 };</pre>
<a name="//apple_ref/cpp/data/QGraphicsItem/UserType"></a>
<h3 class="fn"><a name="UserType-var"></a>const int QGraphicsItem::UserType</h3>
<p>The lowest permitted type value for custom items (subclasses of <a href="qgraphicsitem.html">QGraphicsItem</a> or any of the standard items). This value is used in conjunction with a reimplementation of <a href="qgraphicsitem.html#type">QGraphicsItem::type</a>() and declaring a Type enum value. Example:</p>
<pre> class CustomItem : public QGraphicsItem
 {
    ...
    enum { Type = UserType + 1 };

    int type() const
    {
        <span class="comment">// Enable the use of qgraphicsitem_cast with this item.</span>
        return Type;
    }
    ...
 };</pre>
<p><b>Note:</b> UserType = 65536</p>
<hr />
<h2>Related Non-Members</h2>
<a name="//apple_ref/cpp/func//qgraphicsitem_cast"></a>
<h3 class="fn"><a name="qgraphicsitem_cast"></a>T qgraphicsitem_cast ( QGraphicsItem * <i>item</i> )</h3>
<p>Returns the given <i>item</i> cast to type T if <i>item</i> is of type T; otherwise, 0 is returned.</p>
<p><b>Note:</b> To make this function work correctly with custom items, reimplement the <a href="qgraphicsitem.html#type">type()</a> function for each custom <a href="qgraphicsitem.html">QGraphicsItem</a> subclass.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qgraphicsitem.html#type">QGraphicsItem::type</a>() and <a href="qgraphicsitem.html#UserType-var">QGraphicsItem::UserType</a>.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.3</div></td>
</tr></table></div></address></body>
</html>