Sophie

Sophie

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

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" />
<!-- qgraphicssceneevent.cpp -->
  <title>QGraphicsSceneDragDropEvent Class | 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 >QGraphicsSceneDragDropEvent</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="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QGraphicsSceneDragDropEvent Class</h1>
<!-- $$$QGraphicsSceneDragDropEvent-brief -->
<p>The <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> class provides events for drag and drop in the graphics view framework. <a href="#details">More...</a></p>
<!-- @@@QGraphicsSceneDragDropEvent -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QGraphicsSceneDragDropEvent&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += widgets</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 4.2</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qgraphicssceneevent.html">QGraphicsSceneEvent</a></td></tr></table></div><ul>
<li><a href="qgraphicsscenedragdropevent-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscenedragdropevent.html#dtor.QGraphicsSceneDragDropEvent">~QGraphicsSceneDragDropEvent</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscenedragdropevent.html#acceptProposedAction">acceptProposedAction</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::MouseButtons </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscenedragdropevent.html#buttons">buttons</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::DropAction </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscenedragdropevent.html#dropAction">dropAction</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QMimeData *</td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscenedragdropevent.html#mimeData">mimeData</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::KeyboardModifiers </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscenedragdropevent.html#modifiers">modifiers</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscenedragdropevent.html#pos">pos</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::DropActions </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscenedragdropevent.html#possibleActions">possibleActions</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::DropAction </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscenedragdropevent.html#proposedAction">proposedAction</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscenedragdropevent.html#scenePos">scenePos</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPoint </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscenedragdropevent.html#screenPos">screenPos</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscenedragdropevent.html#setDropAction">setDropAction</a></b>(Qt::DropAction <i>action</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget *</td><td class="memItemRight bottomAlign"><b><a href="qgraphicsscenedragdropevent.html#source">source</a></b>() const</td></tr>
</table></div>
<ul>
<li class="fn">1 public function inherited from <a href="qgraphicssceneevent.html#public-functions">QGraphicsSceneEvent</a></li>
<li class="fn">6 public functions inherited from <a href="../qtcore/qevent.html#public-functions">QEvent</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="../qtcore/qevent.html#properties">QEvent</a></li>
<li class="fn">1 static public member inherited from <a href="../qtcore/qevent.html#static-public-members">QEvent</a></li>
</ul>
<a name="details"></a>
<!-- $$$QGraphicsSceneDragDropEvent-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> class provides events for drag and drop in the graphics view framework.</p>
<p><a href="qgraphicsview.html">QGraphicsView</a> inherits the drag and drop functionality provided by <a href="qwidget.html">QWidget</a>. When it receives a drag and drop event, it translates it to a <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a>.</p>
<p><a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> stores events of type <a href="../qtcore/qevent.html#Type-enum">GraphicsSceneDragEnter</a>, <a href="../qtcore/qevent.html#Type-enum">GraphicsSceneDragLeave</a>, <a href="../qtcore/qevent.html#Type-enum">GraphicsSceneDragMove</a>, or <a href="../qtcore/qevent.html#Type-enum">GraphicsSceneDrop</a>.</p>
<p><a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> contains the position of the mouse cursor in both item, scene, and screen coordinates; this can be retrieved with <a href="qgraphicsscenedragdropevent.html#pos">pos</a>(), <a href="qgraphicsscenedragdropevent.html#scenePos">scenePos</a>(), and <a href="qgraphicsscenedragdropevent.html#screenPos">screenPos</a>().</p>
<p>The scene sends the event to the first <a href="qgraphicsitem.html">QGraphicsItem</a> under the mouse cursor that accepts drops; a graphics item is set to accept drops with <a href="qgraphicsitem.html#setAcceptDrops">setAcceptDrops()</a>.</p>
</div>
<!-- @@@QGraphicsSceneDragDropEvent -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$~QGraphicsSceneDragDropEvent[overload1]$$$~QGraphicsSceneDragDropEvent -->
<h3 class="fn" id="dtor.QGraphicsSceneDragDropEvent"><a name="dtor.QGraphicsSceneDragDropEvent"></a><code>[virtual] </code>QGraphicsSceneDragDropEvent::<span class="name">~QGraphicsSceneDragDropEvent</span>()</h3>
<p>Destroys the object.</p>
<!-- @@@~QGraphicsSceneDragDropEvent -->
<!-- $$$acceptProposedAction[overload1]$$$acceptProposedAction -->
<h3 class="fn" id="acceptProposedAction"><a name="acceptProposedAction"></a><span class="type">void</span> QGraphicsSceneDragDropEvent::<span class="name">acceptProposedAction</span>()</h3>
<p>Sets the proposed action as accepted, i.e, the drop action is set to the proposed action. This is equal to:</p>
<pre class="cpp">

  setDropAction(proposedAction());

</pre>
<p>When using this function, one should not call <code>accept()</code>.</p>
<p><b>See also </b><a href="qgraphicsscenedragdropevent.html#dropAction">dropAction</a>(), <a href="qgraphicsscenedragdropevent.html#setDropAction">setDropAction</a>(), and <a href="qgraphicsscenedragdropevent.html#proposedAction">proposedAction</a>().</p>
<!-- @@@acceptProposedAction -->
<!-- $$$buttons[overload1]$$$buttons -->
<h3 class="fn" id="buttons"><a name="buttons"></a><span class="type"><a href="../qtcore/qt.html#MouseButton-enum">Qt::MouseButtons</a></span> QGraphicsSceneDragDropEvent::<span class="name">buttons</span>() const</h3>
<p>Returns a <a href="../qtcore/qt.html#MouseButton-enum">Qt::MouseButtons</a> value indicating which buttons were pressed on the mouse when this mouse event was generated.</p>
<p><b>See also </b><a href="../qtcore/qt.html#MouseButton-enum">Qt::MouseButtons</a>.</p>
<!-- @@@buttons -->
<!-- $$$dropAction[overload1]$$$dropAction -->
<h3 class="fn" id="dropAction"><a name="dropAction"></a><span class="type"><a href="../qtcore/qt.html#DropAction-enum">Qt::DropAction</a></span> QGraphicsSceneDragDropEvent::<span class="name">dropAction</span>() const</h3>
<p>Returns the action that was performed in this drag and drop. This should be set by the receiver of the drop and is returned by <a href="../qtgui/qdrag.html#exec">QDrag::exec</a>().</p>
<p><b>See also </b><a href="qgraphicsscenedragdropevent.html#setDropAction">setDropAction</a>() and <a href="qgraphicsscenedragdropevent.html#acceptProposedAction">acceptProposedAction</a>().</p>
<!-- @@@dropAction -->
<!-- $$$mimeData[overload1]$$$mimeData -->
<h3 class="fn" id="mimeData"><a name="mimeData"></a>const <span class="type"><a href="../qtcore/qmimedata.html">QMimeData</a></span> *QGraphicsSceneDragDropEvent::<span class="name">mimeData</span>() const</h3>
<p>This function returns the MIME data of the event.</p>
<!-- @@@mimeData -->
<!-- $$$modifiers[overload1]$$$modifiers -->
<h3 class="fn" id="modifiers"><a name="modifiers"></a><span class="type"><a href="../qtcore/qt.html#KeyboardModifier-enum">Qt::KeyboardModifiers</a></span> QGraphicsSceneDragDropEvent::<span class="name">modifiers</span>() const</h3>
<p>Returns the keyboard modifiers that were pressed when the drag and drop event was created.</p>
<p><b>See also </b><a href="../qtcore/qt.html#KeyboardModifier-enum">Qt::KeyboardModifiers</a>.</p>
<!-- @@@modifiers -->
<!-- $$$pos[overload1]$$$pos -->
<h3 class="fn" id="pos"><a name="pos"></a><span class="type"><a href="../qtcore/qpointf.html">QPointF</a></span> QGraphicsSceneDragDropEvent::<span class="name">pos</span>() const</h3>
<p>Returns the mouse position of the event relative to the view that sent the event.</p>
<p><b>See also </b><a href="qgraphicsview.html">QGraphicsView</a>, <a href="qgraphicsscenedragdropevent.html#screenPos">screenPos</a>(), and <a href="qgraphicsscenedragdropevent.html#scenePos">scenePos</a>().</p>
<!-- @@@pos -->
<!-- $$$possibleActions[overload1]$$$possibleActions -->
<h3 class="fn" id="possibleActions"><a name="possibleActions"></a><span class="type"><a href="../qtcore/qt.html#DropAction-enum">Qt::DropActions</a></span> QGraphicsSceneDragDropEvent::<span class="name">possibleActions</span>() const</h3>
<p>Returns the possible drop actions that the drag and drop can result in.</p>
<p><b>See also </b><a href="../qtcore/qt.html#DropAction-enum">Qt::DropActions</a>.</p>
<!-- @@@possibleActions -->
<!-- $$$proposedAction[overload1]$$$proposedAction -->
<h3 class="fn" id="proposedAction"><a name="proposedAction"></a><span class="type"><a href="../qtcore/qt.html#DropAction-enum">Qt::DropAction</a></span> QGraphicsSceneDragDropEvent::<span class="name">proposedAction</span>() const</h3>
<p>Returns the drop action that is proposed, i.e&#x2e;, preferred. The action must be one of the possible actions as defined by <code>possibleActions()</code>.</p>
<p><b>See also </b><a href="../qtcore/qt.html#DropAction-enum">Qt::DropAction</a> and <a href="qgraphicsscenedragdropevent.html#possibleActions">possibleActions</a>().</p>
<!-- @@@proposedAction -->
<!-- $$$scenePos[overload1]$$$scenePos -->
<h3 class="fn" id="scenePos"><a name="scenePos"></a><span class="type"><a href="../qtcore/qpointf.html">QPointF</a></span> QGraphicsSceneDragDropEvent::<span class="name">scenePos</span>() const</h3>
<p>Returns the position of the mouse in scene coordinates.</p>
<p><b>See also </b><a href="qgraphicsscenedragdropevent.html#pos">pos</a>() and <a href="qgraphicsscenedragdropevent.html#screenPos">screenPos</a>().</p>
<!-- @@@scenePos -->
<!-- $$$screenPos[overload1]$$$screenPos -->
<h3 class="fn" id="screenPos"><a name="screenPos"></a><span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span> QGraphicsSceneDragDropEvent::<span class="name">screenPos</span>() const</h3>
<p>Returns the position of the mouse relative to the screen.</p>
<p><b>See also </b><a href="qgraphicsscenedragdropevent.html#pos">pos</a>() and <a href="qgraphicsscenedragdropevent.html#scenePos">scenePos</a>().</p>
<!-- @@@screenPos -->
<!-- $$$setDropAction[overload1]$$$setDropActionQt::DropAction -->
<h3 class="fn" id="setDropAction"><a name="setDropAction"></a><span class="type">void</span> QGraphicsSceneDragDropEvent::<span class="name">setDropAction</span>(<span class="type"><a href="../qtcore/qt.html#DropAction-enum">Qt::DropAction</a></span> <i>action</i>)</h3>
<p>This function lets the receiver of the drop set the drop action that was performed to <i>action</i>, which should be one of the <a href="qgraphicsscenedragdropevent.html#possibleActions">possible actions</a>. Call <code>accept()</code> in stead of <code>acceptProposedAction()</code> if you use this function.</p>
<p><b>See also </b><a href="qgraphicsscenedragdropevent.html#dropAction">dropAction</a>(), <a href="../qtcore/qevent.html#accept">accept</a>(), and <a href="qgraphicsscenedragdropevent.html#possibleActions">possibleActions</a>().</p>
<!-- @@@setDropAction -->
<!-- $$$source[overload1]$$$source -->
<h3 class="fn" id="source"><a name="source"></a><span class="type"><a href="qwidget.html">QWidget</a></span> *QGraphicsSceneDragDropEvent::<span class="name">source</span>() const</h3>
<p>This function returns the <a href="qgraphicsview.html">QGraphicsView</a> that created the <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a>.</p>
<!-- @@@source -->
</div>
        </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>