Sophie

Sophie

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

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: QGraphicsEllipseItem Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="//apple_ref/cpp/cl//QGraphicsEllipseItem"></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">QGraphicsEllipseItem Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
</h1>
<p>The QGraphicsEllipseItem class provides an ellipse item that you can add to a <a href="qgraphicsscene.html">QGraphicsScene</a>. <a href="#details">More...</a></p>
<pre> #include &lt;QGraphicsEllipseItem&gt;</pre><p>Inherits <a href="qabstractgraphicsshapeitem.html">QAbstractGraphicsShapeItem</a>.</p>
<p>This class was introduced in Qt 4.2.</p>
<ul>
<li><a href="qgraphicsellipseitem-members.html">List of all members, including inherited members</a></li>
</ul>
<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="qgraphicsellipseitem.html#QGraphicsEllipseItem">QGraphicsEllipseItem</a></b> ( QGraphicsItem * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.html#QGraphicsEllipseItem-2">QGraphicsEllipseItem</a></b> ( const QRectF &amp; <i>rect</i>, QGraphicsItem * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.html#QGraphicsEllipseItem-3">QGraphicsEllipseItem</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>width</i>, qreal <i>height</i>, QGraphicsItem * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.html#dtor.QGraphicsEllipseItem">~QGraphicsEllipseItem</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.html#rect">rect</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.html#setRect">setRect</a></b> ( const QRectF &amp; <i>rect</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.html#setRect-2">setRect</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">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.html#setSpanAngle">setSpanAngle</a></b> ( int <i>angle</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.html#setStartAngle">setStartAngle</a></b> ( int <i>angle</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.html#spanAngle">spanAngle</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.html#startAngle">startAngle</a></b> () const</td></tr>
</table>
<hr />
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.html#boundingRect">boundingRect</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.html#contains">contains</a></b> ( const QPointF &amp; <i>point</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.html#isObscuredBy">isObscuredBy</a></b> ( const QGraphicsItem * <i>item</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QPainterPath </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.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="qgraphicsellipseitem.html#paint">paint</a></b> ( QPainter * <i>painter</i>, const QStyleOptionGraphicsItem * <i>option</i>, QWidget * <i>widget</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QPainterPath </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.html#shape">shape</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicsellipseitem.html#type">type</a></b> () const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>6 public functions inherited from <a href="qabstractgraphicsshapeitem.html#public-functions">QAbstractGraphicsShapeItem</a></li>
<li><div bar="2" class="fn"></div>177 public functions inherited from <a href="qgraphicsitem.html#public-functions">QGraphicsItem</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>2 static public members inherited from <a href="qgraphicsitem.html#static-public-members">QGraphicsItem</a></li>
<li><div class="fn"></div>23 protected functions inherited from <a href="qgraphicsitem.html#protected-functions">QGraphicsItem</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QGraphicsEllipseItem class provides an ellipse item that you can add to a <a href="qgraphicsscene.html">QGraphicsScene</a>.</p>
<p>QGraphicsEllipseItem respresents an ellipse with a fill and an outline, and you can also use it for ellipse segments (see <a href="qgraphicsellipseitem.html#startAngle">startAngle</a>(), <a href="qgraphicsellipseitem.html#spanAngle">spanAngle</a>()).</p>
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<tr valign="top" class="odd"><td><img src="images/graphicsview-ellipseitem.png" /></td><td><img src="images/graphicsview-ellipseitem-pie.png" /></td></tr>
</table></p>
<p>To set the item's ellipse, pass a <a href="qrectf.html">QRectF</a> to QGraphicsEllipseItem's constructor, or call <a href="qgraphicsellipseitem.html#setRect">setRect</a>(). The <a href="qgraphicsellipseitem.html#rect">rect</a>() function returns the current ellipse geometry.</p>
<p>QGraphicsEllipseItem uses the rect and the pen width to provide a reasonable implementation of <a href="qgraphicsellipseitem.html#boundingRect">boundingRect</a>(), <a href="qgraphicsellipseitem.html#shape">shape</a>(), and <a href="qgraphicsellipseitem.html#contains">contains</a>(). The <a href="qgraphicsellipseitem.html#paint">paint</a>() function draws the ellipse using the item's associated pen and brush, which you can set by calling <a href="qabstractgraphicsshapeitem.html#setPen">setPen</a>() and <a href="qabstractgraphicsshapeitem.html#setBrush">setBrush</a>().</p>
<p>See also <a href="qgraphicspathitem.html">QGraphicsPathItem</a>, <a href="qgraphicsrectitem.html">QGraphicsRectItem</a>, <a href="qgraphicspolygonitem.html">QGraphicsPolygonItem</a>, <a href="qgraphicstextitem.html">QGraphicsTextItem</a>, <a href="qgraphicslineitem.html">QGraphicsLineItem</a>, <a href="qgraphicspixmapitem.html">QGraphicsPixmapItem</a>, and <a href="graphicsview.html">The Graphics View Framework</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<a name="//apple_ref/cpp/instm/QGraphicsEllipseItem/QGraphicsEllipseItem"></a>
<h3 class="fn"><a name="QGraphicsEllipseItem"></a>QGraphicsEllipseItem::QGraphicsEllipseItem ( <a href="qgraphicsitem.html">QGraphicsItem</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qgraphicsellipseitem.html">QGraphicsEllipseItem</a>. <i>parent</i> is passed to <a href="qabstractgraphicsshapeitem.html">QAbstractGraphicsShapeItem</a>'s constructor.</p>
<p>See also <a href="qgraphicsscene.html#addItem">QGraphicsScene::addItem</a>().</p>
<h3 class="fn"><a name="QGraphicsEllipseItem-2"></a>QGraphicsEllipseItem::QGraphicsEllipseItem ( const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i>, <a href="qgraphicsitem.html">QGraphicsItem</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qgraphicsellipseitem.html">QGraphicsEllipseItem</a> using <i>rect</i> as the default rectangle. <i>parent</i> is passed to <a href="qabstractgraphicsshapeitem.html">QAbstractGraphicsShapeItem</a>'s constructor.</p>
<p>See also <a href="qgraphicsscene.html#addItem">QGraphicsScene::addItem</a>().</p>
<h3 class="fn"><a name="QGraphicsEllipseItem-3"></a>QGraphicsEllipseItem::QGraphicsEllipseItem ( <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>, <a href="qgraphicsitem.html">QGraphicsItem</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qgraphicsellipseitem.html">QGraphicsEllipseItem</a> using the rectangle defined by (<i>x</i>, <i>y</i>) and the given <i>width</i> and <i>height</i>, as the default rectangle. <i>parent</i> is passed to <a href="qabstractgraphicsshapeitem.html">QAbstractGraphicsShapeItem</a>'s constructor.</p>
<p>This function was introduced in Qt 4.3.</p>
<p>See also <a href="qgraphicsscene.html#addItem">QGraphicsScene::addItem</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsEllipseItem/~QGraphicsEllipseItem"></a>
<h3 class="fn"><a name="dtor.QGraphicsEllipseItem"></a>QGraphicsEllipseItem::~QGraphicsEllipseItem ()</h3>
<p>Destroys the <a href="qgraphicsellipseitem.html">QGraphicsEllipseItem</a>.</p>
<a name="//apple_ref/cpp/instm/QGraphicsEllipseItem/boundingRect"></a>
<h3 class="fn"><a name="boundingRect"></a><a href="qrectf.html">QRectF</a> QGraphicsEllipseItem::boundingRect () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgraphicsitem.html#boundingRect">QGraphicsItem::boundingRect</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsEllipseItem/contains"></a>
<h3 class="fn"><a name="contains"></a>bool QGraphicsEllipseItem::contains ( const <a href="qpointf.html">QPointF</a> &amp; <i>point</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgraphicsitem.html#contains">QGraphicsItem::contains</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsEllipseItem/isObscuredBy"></a>
<h3 class="fn"><a name="isObscuredBy"></a>bool QGraphicsEllipseItem::isObscuredBy ( const <a href="qgraphicsitem.html">QGraphicsItem</a> * <i>item</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgraphicsitem.html#isObscuredBy">QGraphicsItem::isObscuredBy</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsEllipseItem/opaqueArea"></a>
<h3 class="fn"><a name="opaqueArea"></a><a href="qpainterpath.html">QPainterPath</a> QGraphicsEllipseItem::opaqueArea () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgraphicsitem.html#opaqueArea">QGraphicsItem::opaqueArea</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsEllipseItem/paint"></a>
<h3 class="fn"><a name="paint"></a>void QGraphicsEllipseItem::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> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgraphicsitem.html#paint">QGraphicsItem::paint</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsEllipseItem/rect"></a>
<h3 class="fn"><a name="rect"></a><a href="qrectf.html">QRectF</a> QGraphicsEllipseItem::rect () const</h3>
<p>Returns the item's ellipse geometry as a <a href="qrectf.html">QRectF</a>.</p>
<p>See also <a href="qgraphicsellipseitem.html#setRect">setRect</a>() and <a href="qpainter.html#drawEllipse">QPainter::drawEllipse</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsEllipseItem/setRect"></a>
<h3 class="fn"><a name="setRect"></a>void QGraphicsEllipseItem::setRect ( const <a href="qrectf.html">QRectF</a> &amp; <i>rect</i> )</h3>
<p>Sets the item's ellipse geometry to <i>rect</i>. The rectangle's left edge defines the left edge of the ellipse, and the rectangle's top edge describes the top of the ellipse. The height and width of the rectangle describe the height and width of the ellipse.</p>
<p>See also <a href="qgraphicsellipseitem.html#rect">rect</a>() and <a href="qpainter.html#drawEllipse">QPainter::drawEllipse</a>().</p>
<h3 class="fn"><a name="setRect-2"></a>void QGraphicsEllipseItem::setRect ( <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>Sets the item's rectangle to the rectangle defined by (<i>x</i>, <i>y</i>) and the given <i>width</i> and <i>height</i>.</p>
<p>This convenience function is equivalent to calling <tt>setRect(QRectF(x, y, width, height))</tt></p>
<p>See also <a href="qgraphicsellipseitem.html#rect">rect</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsEllipseItem/setSpanAngle"></a>
<h3 class="fn"><a name="setSpanAngle"></a>void QGraphicsEllipseItem::setSpanAngle ( int <i>angle</i> )</h3>
<p>Sets the span angle for an ellipse segment to <i>angle</i>, which is in 16ths of a degree. This angle is used together with <a href="qgraphicsellipseitem.html#startAngle">startAngle</a>() to represent an ellipse segment (a pie). By default, the span angle is 5760 (360 * 16, a full ellipse).</p>
<p>See also <a href="qgraphicsellipseitem.html#spanAngle">spanAngle</a>(), <a href="qgraphicsellipseitem.html#setStartAngle">setStartAngle</a>(), and <a href="qpainter.html#drawPie">QPainter::drawPie</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsEllipseItem/setStartAngle"></a>
<h3 class="fn"><a name="setStartAngle"></a>void QGraphicsEllipseItem::setStartAngle ( int <i>angle</i> )</h3>
<p>Sets the start angle for an ellipse segment to <i>angle</i>, which is in 16ths of a degree. This angle is used together with <a href="qgraphicsellipseitem.html#spanAngle">spanAngle</a>() for representing an ellipse segment (a pie). By default, the start angle is 0.</p>
<p>See also <a href="qgraphicsellipseitem.html#startAngle">startAngle</a>(), <a href="qgraphicsellipseitem.html#setSpanAngle">setSpanAngle</a>(), and <a href="qpainter.html#drawPie">QPainter::drawPie</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsEllipseItem/shape"></a>
<h3 class="fn"><a name="shape"></a><a href="qpainterpath.html">QPainterPath</a> QGraphicsEllipseItem::shape () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgraphicsitem.html#shape">QGraphicsItem::shape</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsEllipseItem/spanAngle"></a>
<h3 class="fn"><a name="spanAngle"></a>int QGraphicsEllipseItem::spanAngle () const</h3>
<p>Returns the span angle of an ellipse segment in 16ths of a degree. This angle is used together with <a href="qgraphicsellipseitem.html#startAngle">startAngle</a>() for representing an ellipse segment (a pie). By default, this function returns 5760 (360 * 16, a full ellipse).</p>
<p>See also <a href="qgraphicsellipseitem.html#setSpanAngle">setSpanAngle</a>() and <a href="qgraphicsellipseitem.html#startAngle">startAngle</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsEllipseItem/startAngle"></a>
<h3 class="fn"><a name="startAngle"></a>int QGraphicsEllipseItem::startAngle () const</h3>
<p>Returns the start angle for an ellipse segment in 16ths of a degree. This angle is used together with <a href="qgraphicsellipseitem.html#spanAngle">spanAngle</a>() for representing an ellipse segment (a pie). By default, the start angle is 0.</p>
<p>See also <a href="qgraphicsellipseitem.html#setStartAngle">setStartAngle</a>() and <a href="qgraphicsellipseitem.html#spanAngle">spanAngle</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsEllipseItem/type"></a>
<h3 class="fn"><a name="type"></a>int QGraphicsEllipseItem::type () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgraphicsitem.html#type">QGraphicsItem::type</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>