Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 3354

qtbase5-doc-5.9.4-1.1.mga6.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" />
<!-- qgraphicsscene.cpp -->
  <title>Obsolete Members for QGraphicsScene | Qt Widgets 5.9</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.9</td><td ><a href="qtwidgets-index.html">Qt Widgets</a></td><td ><a href="qtwidgets-module.html">C++ Classes</a></td><td >QGraphicsScene</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</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 QGraphicsScene</h1>
<p><b>The following members of class <a href="qgraphicsscene.html">QGraphicsScene</a> are obsolete.</b> They are provided to keep old source code working. We strongly advise against using them in new code.</p>
<h2>Properties</h2>
<ul>
<li class="fn"><code>(obsolete) </code><b><a href="qgraphicsscene-obsolete.html#sortCacheEnabled-prop">sortCacheEnabled</a></b> : bool</li>
</ul>
<h2>Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>QGraphicsItem *</td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscene-obsolete.html#itemAt-1">itemAt</a></b>(const QPointF &amp;<i>position</i>) const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>QGraphicsItem *</td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscene-obsolete.html#itemAt-2">itemAt</a></b>(qreal <i>x</i>, qreal <i>y</i>) const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>QList&lt;QGraphicsItem *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscene-obsolete.html#items-5">items</a></b>(qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i>, Qt::ItemSelectionMode <i>mode</i> = Qt::IntersectsItemShape) const</td></tr>
</table></div>
<ul>
<li class="fn">2 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
</ul>
<h2>Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscene-obsolete.html#drawItems">drawItems</a></b>(QPainter *<i>painter</i>, int <i>numItems</i>, QGraphicsItem *[] <i>items</i>, const QStyleOptionGraphicsItem[] <i>options</i>, QWidget *<i>widget</i> = Q_NULLPTR)</td></tr>
</table></div>
<h2>Property Documentation</h2>
<!-- $$$sortCacheEnabled-prop$$$isSortCacheEnabled$$$setSortCacheEnabledbool -->
<h3 class="fn" id="sortCacheEnabled-prop"><a name="sortCacheEnabled-prop"></a><span class="name">sortCacheEnabled</span> : <span class="type">bool</span></h3>
<p>This property holds whether sort caching is enabled</p>
<p>Since Qt 4.6, this property has no effect.</p>
<p>This property was introduced in  Qt 4.5.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qgraphicsscene.html#sortCacheEnabled-prop">isSortCacheEnabled</a></b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qgraphicsscene.html#sortCacheEnabled-prop">setSortCacheEnabled</a></b></span>(bool <i>enabled</i>)</td></tr>
</table></div>
<!-- @@@sortCacheEnabled -->
<h2>Member Function Documentation</h2>
<!-- $$$drawItems[overload1]$$$drawItemsQPainter*intQGraphicsItem*[]constQStyleOptionGraphicsItem[]QWidget* -->
<h3 class="fn" id="drawItems"><a name="drawItems"></a><code>[virtual protected] </code><span class="type">void</span> QGraphicsScene::<span class="name">drawItems</span>(<span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> *<i>painter</i>, <span class="type">int</span> <i>numItems</i>, <span class="type"><a href="qgraphicsitem.html">QGraphicsItem</a></span> *[] <i>items</i>, const <span class="type"><a href="qstyleoptiongraphicsitem.html">QStyleOptionGraphicsItem</a></span>[] <i>options</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> *<i>widget</i> = Q_NULLPTR)</h3>
<p>Paints the given <i>items</i> using the provided <i>painter</i>, after the background has been drawn, and before the foreground has been drawn. All painting is done in <i>scene</i> coordinates. Before drawing each item, the painter must be transformed using <a href="qgraphicsitem.html#sceneTransform">QGraphicsItem::sceneTransform</a>().</p>
<p>The <i>options</i> parameter is the list of style option objects for each item in <i>items</i>. The <i>numItems</i> parameter is the number of items in <i>items</i> and options in <i>options</i>. The <i>widget</i> parameter is optional; if specified, it should point to the widget that is being painted on.</p>
<p>The default implementation prepares the painter matrix, and calls <a href="qgraphicsitem.html#paint">QGraphicsItem::paint</a>() on all items. Reimplement this function to provide custom painting of all items for the scene; gaining complete control over how each item is drawn. In some cases this can increase drawing performance significantly.</p>
<p>Example:</p>
<pre class="cpp">

  <span class="type">void</span> CustomScene<span class="operator">::</span>drawItems(<span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> <span class="operator">*</span>painter<span class="operator">,</span> <span class="type">int</span> numItems<span class="operator">,</span>
                              <span class="type"><a href="qgraphicsitem.html">QGraphicsItem</a></span> <span class="operator">*</span>items<span class="operator">[</span><span class="operator">]</span><span class="operator">,</span>
                              <span class="keyword">const</span> <span class="type"><a href="qstyleoptiongraphicsitem.html">QStyleOptionGraphicsItem</a></span> options<span class="operator">[</span><span class="operator">]</span><span class="operator">,</span>
                              <span class="type"><a href="qwidget.html">QWidget</a></span> <span class="operator">*</span>widget)
  {
      <span class="keyword">for</span> (<span class="type">int</span> i <span class="operator">=</span> <span class="number">0</span>; i <span class="operator">&lt;</span> numItems; <span class="operator">+</span><span class="operator">+</span>i) {
           <span class="comment">// Draw the item</span>
           painter<span class="operator">-</span><span class="operator">&gt;</span>save();
           painter<span class="operator">-</span><span class="operator">&gt;</span>setMatrix(items<span class="operator">[</span>i<span class="operator">]</span><span class="operator">-</span><span class="operator">&gt;</span>sceneMatrix()<span class="operator">,</span> <span class="keyword">true</span>);
           items<span class="operator">[</span>i<span class="operator">]</span><span class="operator">-</span><span class="operator">&gt;</span>paint(painter<span class="operator">,</span> <span class="operator">&amp;</span>options<span class="operator">[</span>i<span class="operator">]</span><span class="operator">,</span> widget);
           painter<span class="operator">-</span><span class="operator">&gt;</span>restore();
       }
  }

</pre>
<p>Since Qt 4.6, this function is not called anymore unless the <a href="qgraphicsview.html#OptimizationFlag-enum">QGraphicsView::IndirectPainting</a> flag is given as an Optimization flag.</p>
<p><b>See also </b><a href="qgraphicsscene.html#drawBackground">drawBackground</a>() and <a href="qgraphicsscene.html#drawForeground">drawForeground</a>().</p>
<!-- @@@drawItems -->
<!-- $$$itemAt$$$itemAtconstQPointF& -->
<h3 class="fn" id="itemAt-1"><a name="itemAt-1"></a><span class="type"><a href="qgraphicsitem.html">QGraphicsItem</a></span> *QGraphicsScene::<span class="name">itemAt</span>(const <span class="type"><a href="../qtcore/qpointf.html">QPointF</a></span> &amp;<i>position</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the topmost visible item at the specified <i>position</i>, or 0 if there are no items at this position.</p>
<p>This function is deprecated and returns incorrect results if the scene contains items that ignore transformations. Use the overload that takes a <a href="../qtgui/qtransform.html">QTransform</a> instead.</p>
<p>Note: See <a href="qgraphicsscene.html#items">items</a>() for a definition of which items are considered visible by this function.</p>
<p><b>See also </b><a href="qgraphicsscene.html#items">items</a>(), <a href="qgraphicsscene.html#collidingItems">collidingItems</a>(), and <a href="qgraphicsitem.html#sorting">Sorting</a>.</p>
<!-- @@@itemAt -->
<!-- $$$itemAt$$$itemAtqrealqreal -->
<h3 class="fn" id="itemAt-2"><a name="itemAt-2"></a><span class="type"><a href="qgraphicsitem.html">QGraphicsItem</a></span> *QGraphicsScene::<span class="name">itemAt</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the topmost visible item at the position specified by (<i>x</i>, <i>y</i>), or 0 if there are no items at this position.</p>
<p>This convenience function is equivalent to calling <code>itemAt(QPointF(x, y))</code>.</p>
<p>This function is deprecated and returns incorrect results if the scene contains items that ignore transformations. Use the overload that takes a <a href="../qtgui/qtransform.html">QTransform</a> instead.</p>
<p>Note: See <a href="qgraphicsscene.html#items">items</a>() for a definition of which items are considered visible by this function.</p>
<!-- @@@itemAt -->
<!-- $$$items$$$itemsqrealqrealqrealqrealQt::ItemSelectionMode -->
<h3 class="fn" id="items-5"><a name="items-5"></a><span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qgraphicsitem.html">QGraphicsItem</a></span> *&gt; QGraphicsScene::<span class="name">items</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>w</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>h</i>, <span class="type"><a href="../qtcore/qt.html#ItemSelectionMode-enum">Qt::ItemSelectionMode</a></span> <i>mode</i> = Qt::IntersectsItemShape) const</h3>
<p>This convenience function is equivalent to calling items(<a href="../qtcore/qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>), <i>mode</i>).</p>
<p>This function is deprecated and returns incorrect results if the scene contains items that ignore transformations. Use the overload that takes a <a href="../qtgui/qtransform.html">QTransform</a> instead.</p>
<p>This function was introduced in  Qt 4.3.</p>
<!-- @@@items -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 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>