Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > d5e62c01ae8d1e579463c6a871dd44bf > files > 3798

qtbase5-doc-5.12.6-2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qgraphicsitem.cpp -->
  <title>Obsolete Members for QGraphicsItem | Qt Widgets 5.12.6</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.12</td><td ><a href="qtwidgets-index.html">Qt Widgets</a></td><td ><a href="qtwidgets-module.html">C++ Classes</a></td><td >QGraphicsItem</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtwidgets-index.html">Qt 5.12.6 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Obsolete Members for QGraphicsItem</h1>
<p><b>The following members of class <a href="qgraphicsitem.html">QGraphicsItem</a> are obsolete.</b> They are provided to keep old source code working. We strongly advise against using them in new code.</p>
<h2>Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>bool </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsitem-obsolete.html#acceptsHoverEvents">acceptsHoverEvents</a></b>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>QList&lt;QGraphicsItem *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsitem-obsolete.html#children">children</a></b>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>bool </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsitem-obsolete.html#handlesChildEvents">handlesChildEvents</a></b>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>QMatrix </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsitem-obsolete.html#matrix">matrix</a></b>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsitem-obsolete.html#resetMatrix">resetMatrix</a></b>()</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsitem-obsolete.html#rotate">rotate</a></b>(qreal <i>angle</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsitem-obsolete.html#scale-1">scale</a></b>(qreal <i>sx</i>, qreal <i>sy</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>QMatrix </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsitem-obsolete.html#sceneMatrix">sceneMatrix</a></b>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsitem-obsolete.html#setAcceptsHoverEvents">setAcceptsHoverEvents</a></b>(bool <i>enabled</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsitem-obsolete.html#setHandlesChildEvents">setHandlesChildEvents</a></b>(bool <i>enabled</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsitem-obsolete.html#setMatrix">setMatrix</a></b>(const QMatrix &amp;<i>matrix</i>, bool <i>combine</i> = false)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsitem-obsolete.html#shear">shear</a></b>(qreal <i>sh</i>, qreal <i>sv</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsitem-obsolete.html#translate">translate</a></b>(qreal <i>dx</i>, qreal <i>dy</i>)</td></tr>
</table></div>
<h2>Member Function Documentation</h2>
<!-- $$$acceptsHoverEvents[overload1]$$$acceptsHoverEvents -->
<h3 class="fn" id="acceptsHoverEvents"><a name="acceptsHoverEvents"></a><span class="type">bool</span> QGraphicsItem::<span class="name">acceptsHoverEvents</span>() const</h3>
<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
<p>Call <a href="qgraphicsitem.html#acceptHoverEvents">acceptHoverEvents</a>() instead.</p>
<p><b>See also </b><a href="qgraphicsitem-obsolete.html#setAcceptsHoverEvents">setAcceptsHoverEvents</a>().</p>
<!-- @@@acceptsHoverEvents -->
<!-- $$$children[overload1]$$$children -->
<h3 class="fn" id="children"><a name="children"></a><span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qgraphicsitem.html#QGraphicsItem">QGraphicsItem</a></span> *&gt; QGraphicsItem::<span class="name">children</span>() const</h3>
<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
<p>Use <a href="qgraphicsitem.html#childItems">childItems</a>() instead.</p>
<p><b>See also </b><a href="qgraphicsitem.html#setParentItem">setParentItem</a>().</p>
<!-- @@@children -->
<!-- $$$handlesChildEvents[overload1]$$$handlesChildEvents -->
<h3 class="fn" id="handlesChildEvents"><a name="handlesChildEvents"></a><span class="type">bool</span> QGraphicsItem::<span class="name">handlesChildEvents</span>() const</h3>
<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
<p>Returns <code>true</code> if this item handles 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>This property is useful for item groups; it allows one item to handle events on behalf of its children, as opposed to its children handling their events individually.</p>
<p>The default is to return false; children handle their own events. The exception for this is if the item is a <a href="qgraphicsitemgroup.html">QGraphicsItemGroup</a>, then it defaults to return true.</p>
<p><b>See also </b><a href="qgraphicsitem-obsolete.html#setHandlesChildEvents">setHandlesChildEvents</a>().</p>
<!-- @@@handlesChildEvents -->
<!-- $$$matrix[overload1]$$$matrix -->
<h3 class="fn" id="matrix"><a name="matrix"></a><span class="type"><a href="../qtgui/qmatrix.html">QMatrix</a></span> QGraphicsItem::<span class="name">matrix</span>() const</h3>
<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
<p>Returns the item's affine transformation matrix. This is a subset or the item's full transformation matrix, and might not represent the item's full transformation.</p>
<p>Use <a href="qgraphicsitem.html#transform">transform</a>() instead.</p>
<p><b>See also </b><a href="qgraphicsitem-obsolete.html#setMatrix">setMatrix</a>(), <a href="qgraphicsitem.html#setTransform">setTransform</a>(), and <a href="qgraphicsitem.html#sceneTransform">sceneTransform</a>().</p>
<!-- @@@matrix -->
<!-- $$$resetMatrix[overload1]$$$resetMatrix -->
<h3 class="fn" id="resetMatrix"><a name="resetMatrix"></a><span class="type">void</span> QGraphicsItem::<span class="name">resetMatrix</span>()</h3>
<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
<p>Use <a href="qgraphicsitem.html#resetTransform">resetTransform</a>() instead.</p>
<!-- @@@resetMatrix -->
<!-- $$$rotate[overload1]$$$rotateqreal -->
<h3 class="fn" id="rotate"><a name="rotate"></a><span class="type">void</span> QGraphicsItem::<span class="name">rotate</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>angle</i>)</h3>
<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
<p>Use</p>
<pre class="cpp">

  item<span class="operator">-</span><span class="operator">&gt;</span>setTransform(<span class="type"><a href="../qtgui/qtransform.html">QTransform</a></span>()<span class="operator">.</span>rotate(angle)<span class="operator">,</span> <span class="keyword">true</span>);

</pre>
<p>instead.</p>
<p>Rotates the current item transformation <i>angle</i> degrees clockwise around its origin. To translate around an arbitrary point (x, y), you need to combine translation and rotation with <a href="qgraphicsitem.html#setTransform">setTransform</a>().</p>
<p>Example:</p>
<pre class="cpp">

  <span class="comment">// Rotate an item 45 degrees around (0, 0).</span>
  item<span class="operator">-</span><span class="operator">&gt;</span>rotate(<span class="number">45</span>);

  <span class="comment">// Rotate an item 45 degrees around (x, y).</span>
  item<span class="operator">-</span><span class="operator">&gt;</span>setTransform(<span class="type"><a href="../qtgui/qtransform.html">QTransform</a></span>()<span class="operator">.</span>translate(x<span class="operator">,</span> y)<span class="operator">.</span>rotate(<span class="number">45</span>)<span class="operator">.</span>translate(<span class="operator">-</span>x<span class="operator">,</span> <span class="operator">-</span>y));

</pre>
<p><b>See also </b><a href="qgraphicsitem.html#setTransform">setTransform</a>(), <a href="qgraphicsitem.html#transform">transform</a>(), <a href="qgraphicsitem.html#scale">scale</a>(), <a href="qgraphicsitem-obsolete.html#shear">shear</a>(), and <a href="qgraphicsitem-obsolete.html#translate">translate</a>().</p>
<!-- @@@rotate -->
<!-- $$$scale$$$scaleqrealqreal -->
<h3 class="fn" id="scale-1"><a name="scale-1"></a><span class="type">void</span> QGraphicsItem::<span class="name">scale</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>sx</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>sy</i>)</h3>
<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
<p>Use</p>
<pre class="cpp">

  setTransform(<span class="type"><a href="../qtgui/qtransform.html">QTransform</a></span><span class="operator">::</span>fromScale(sx<span class="operator">,</span> sy)<span class="operator">,</span> <span class="keyword">true</span>);

</pre>
<p>instead.</p>
<p>Scales the current item transformation by (<i>sx</i>, <i>sy</i>) around its origin. To scale from an arbitrary point (x, y), you need to combine translation and scaling with <a href="qgraphicsitem.html#setTransform">setTransform</a>().</p>
<p>Example:</p>
<pre class="cpp">

  <span class="comment">// Scale an item by 3x2 from its origin</span>
  item<span class="operator">-</span><span class="operator">&gt;</span>scale(<span class="number">3</span><span class="operator">,</span> <span class="number">2</span>);

  <span class="comment">// Scale an item by 3x2 from (x, y)</span>
  item<span class="operator">-</span><span class="operator">&gt;</span>setTransform(<span class="type"><a href="../qtgui/qtransform.html">QTransform</a></span>()<span class="operator">.</span>translate(x<span class="operator">,</span> y)<span class="operator">.</span>scale(<span class="number">3</span><span class="operator">,</span> <span class="number">2</span>)<span class="operator">.</span>translate(<span class="operator">-</span>x<span class="operator">,</span> <span class="operator">-</span>y));

</pre>
<p><b>See also </b><a href="qgraphicsitem.html#setTransform">setTransform</a>() and <a href="qgraphicsitem.html#transform">transform</a>().</p>
<!-- @@@scale -->
<!-- $$$sceneMatrix[overload1]$$$sceneMatrix -->
<h3 class="fn" id="sceneMatrix"><a name="sceneMatrix"></a><span class="type"><a href="../qtgui/qmatrix.html">QMatrix</a></span> QGraphicsItem::<span class="name">sceneMatrix</span>() const</h3>
<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
<p>Use <a href="qgraphicsitem.html#sceneTransform">sceneTransform</a>() instead.</p>
<p><b>See also </b><a href="qgraphicsitem.html#transform">transform</a>(), <a href="qgraphicsitem.html#setTransform">setTransform</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>
<!-- @@@sceneMatrix -->
<!-- $$$setAcceptsHoverEvents[overload1]$$$setAcceptsHoverEventsbool -->
<h3 class="fn" id="setAcceptsHoverEvents"><a name="setAcceptsHoverEvents"></a><span class="type">void</span> QGraphicsItem::<span class="name">setAcceptsHoverEvents</span>(<span class="type">bool</span> <i>enabled</i>)</h3>
<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
<p>Use <a href="qgraphicsitem.html#setAcceptHoverEvents">setAcceptHoverEvents</a>(<i>enabled</i>) instead.</p>
<p><b>See also </b><a href="qgraphicsitem-obsolete.html#acceptsHoverEvents">acceptsHoverEvents</a>().</p>
<!-- @@@setAcceptsHoverEvents -->
<!-- $$$setHandlesChildEvents[overload1]$$$setHandlesChildEventsbool -->
<h3 class="fn" id="setHandlesChildEvents"><a name="setHandlesChildEvents"></a><span class="type">void</span> QGraphicsItem::<span class="name">setHandlesChildEvents</span>(<span class="type">bool</span> <i>enabled</i>)</h3>
<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
<p>If <i>enabled</i> is true, this item is set to handle 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 property is useful for item groups; it allows one item to handle events on behalf of its children, as opposed to its children handling their events individually.</p>
<p>If a child item accepts hover events, its parent will receive hover move events as the cursor passes through the child, but it does not receive hover enter and hover leave events on behalf of its child.</p>
<p><b>See also </b><a href="qgraphicsitem-obsolete.html#handlesChildEvents">handlesChildEvents</a>().</p>
<!-- @@@setHandlesChildEvents -->
<!-- $$$setMatrix[overload1]$$$setMatrixconstQMatrix&bool -->
<h3 class="fn" id="setMatrix"><a name="setMatrix"></a><span class="type">void</span> QGraphicsItem::<span class="name">setMatrix</span>(const <span class="type"><a href="../qtgui/qmatrix.html">QMatrix</a></span> &amp;<i>matrix</i>, <span class="type">bool</span> <i>combine</i> = false)</h3>
<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
<p>Sets the item's affine transformation matrix. This is a subset or the item's full transformation matrix, and might not represent the item's full transformation.</p>
<p>Use <a href="qgraphicsitem.html#setTransform">setTransform</a>() instead.</p>
<p><b>See also </b><a href="qgraphicsitem-obsolete.html#matrix">matrix</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>
<!-- @@@setMatrix -->
<!-- $$$shear[overload1]$$$shearqrealqreal -->
<h3 class="fn" id="shear"><a name="shear"></a><span class="type">void</span> QGraphicsItem::<span class="name">shear</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>sh</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>sv</i>)</h3>
<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
<p>Use</p>
<pre class="cpp">

  setTransform(<span class="type"><a href="../qtgui/qtransform.html">QTransform</a></span>()<span class="operator">.</span>shear(sh<span class="operator">,</span> sv)<span class="operator">,</span> <span class="keyword">true</span>);

</pre>
<p>instead.</p>
<p>Shears the current item transformation by (<i>sh</i>, <i>sv</i>).</p>
<p><b>See also </b><a href="qgraphicsitem.html#setTransform">setTransform</a>() and <a href="qgraphicsitem.html#transform">transform</a>().</p>
<!-- @@@shear -->
<!-- $$$translate[overload1]$$$translateqrealqreal -->
<h3 class="fn" id="translate"><a name="translate"></a><span class="type">void</span> QGraphicsItem::<span class="name">translate</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>dx</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>dy</i>)</h3>
<p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p>
<p>Use <a href="qgraphicsitem.html#setPos">setPos</a>() or <a href="qgraphicsitem.html#setTransformOriginPoint">setTransformOriginPoint</a>() instead. For identical behavior, use</p>
<pre class="cpp">

  setTransform(<span class="type"><a href="../qtgui/qtransform.html">QTransform</a></span><span class="operator">::</span>fromTranslate(dx<span class="operator">,</span> dy)<span class="operator">,</span> <span class="keyword">true</span>);

</pre>
<p>Translates the current item transformation by (<i>dx</i>, <i>dy</i>).</p>
<p>If all you want is to move an item, you should call <a href="qgraphicsitem.html#moveBy">moveBy</a>() or <a href="qgraphicsitem.html#setPos">setPos</a>() instead; this function changes the item's translation, which is conceptually separate from its position.</p>
<p><b>See also </b><a href="qgraphicsitem.html#setTransform">setTransform</a>() and <a href="qgraphicsitem.html#transform">transform</a>().</p>
<!-- @@@translate -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>