Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 748

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QGraphicsSceneDragDropEvent Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QGraphicsSceneDragDropEvent Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QGraphicsSceneDragDropEvent class provides events for drag
and drop in the graphics view framework. <a href="#details">More...</a></p>

<p>Inherits <a href="qgraphicssceneevent.html">QGraphicsSceneEvent</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qgraphicsscenedragdropevent.html#acceptProposedAction">acceptProposedAction</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.MouseButtons <b><a href="qgraphicsscenedragdropevent.html#buttons">buttons</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.DropAction <b><a href="qgraphicsscenedragdropevent.html#dropAction">dropAction</a></b> (<i>self</i>)</li><li><div class="fn" />QMimeData <b><a href="qgraphicsscenedragdropevent.html#mimeData">mimeData</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.KeyboardModifiers <b><a href="qgraphicsscenedragdropevent.html#modifiers">modifiers</a></b> (<i>self</i>)</li><li><div class="fn" />QPointF <b><a href="qgraphicsscenedragdropevent.html#pos">pos</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.DropActions <b><a href="qgraphicsscenedragdropevent.html#possibleActions">possibleActions</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.DropAction <b><a href="qgraphicsscenedragdropevent.html#proposedAction">proposedAction</a></b> (<i>self</i>)</li><li><div class="fn" />QPointF <b><a href="qgraphicsscenedragdropevent.html#scenePos">scenePos</a></b> (<i>self</i>)</li><li><div class="fn" />QPoint <b><a href="qgraphicsscenedragdropevent.html#screenPos">screenPos</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgraphicsscenedragdropevent.html#setDropAction">setDropAction</a></b> (<i>self</i>, Qt.DropAction&#160;<i>action</i>)</li><li><div class="fn" />QWidget <b><a href="qgraphicsscenedragdropevent.html#source">source</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QGraphicsSceneDragDropEvent 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 QGraphicsSceneDragDropEvent.</p>
<p>QGraphicsSceneDragDropEvent stores events of type <a href="qevent.html#Type-enum">GraphicsSceneDragEnter</a>, <a href="qevent.html#Type-enum">GraphicsSceneDragLeave</a>, <a href="qevent.html#Type-enum">GraphicsSceneDragMove</a>, or <a href="qevent.html#Type-enum">GraphicsSceneDrop</a>.</p>
<p>QGraphicsSceneDragDropEvent 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>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="acceptProposedAction" />QGraphicsSceneDragDropEvent.acceptProposedAction (<i>self</i>)</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">
 <a href="qgraphicsscenedragdropevent.html#setDropAction">setDropAction</a>(proposedAction());
</pre>
<p>When using this function, one should not call
<tt>accept()</tt>.</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>


<h3 class="fn"><a name="buttons" /><a href="qt-mousebuttons.html">Qt.MouseButtons</a> QGraphicsSceneDragDropEvent.buttons (<i>self</i>)</h3><p>Returns a <a href="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="qt.html#MouseButton-enum">Qt.MouseButtons</a>.</p>


<h3 class="fn"><a name="dropAction" /><a href="qt.html#DropAction-enum">Qt.DropAction</a> QGraphicsSceneDragDropEvent.dropAction (<i>self</i>)</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="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>


<h3 class="fn"><a name="mimeData" /><a href="qmimedata.html">QMimeData</a> QGraphicsSceneDragDropEvent.mimeData (<i>self</i>)</h3><p>This function returns the MIME data of the event.</p>


<h3 class="fn"><a name="modifiers" /><a href="qt-keyboardmodifiers.html">Qt.KeyboardModifiers</a> QGraphicsSceneDragDropEvent.modifiers (<i>self</i>)</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="qt.html#KeyboardModifier-enum">Qt.KeyboardModifiers</a>.</p>


<h3 class="fn"><a name="pos" /><a href="qpointf.html">QPointF</a> QGraphicsSceneDragDropEvent.pos (<i>self</i>)</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>


<h3 class="fn"><a name="possibleActions" /><a href="qt-dropactions.html">Qt.DropActions</a> QGraphicsSceneDragDropEvent.possibleActions (<i>self</i>)</h3><p>Returns the possible drop actions that the drag and drop can
result in.</p>
<p><b>See also</b> <a href="qt.html#DropAction-enum">Qt.DropActions</a>.</p>


<h3 class="fn"><a name="proposedAction" /><a href="qt.html#DropAction-enum">Qt.DropAction</a> QGraphicsSceneDragDropEvent.proposedAction (<i>self</i>)</h3><p>Returns the drop action that is proposed, i.e., preferred. The
action must be one of the possible actions as defined by
<tt>possibleActions()</tt>.</p>
<p><b>See also</b> <a href="qt.html#DropAction-enum">Qt.DropAction</a> and <a href="qgraphicsscenedragdropevent.html#possibleActions">possibleActions</a>().</p>


<h3 class="fn"><a name="scenePos" /><a href="qpointf.html">QPointF</a> QGraphicsSceneDragDropEvent.scenePos (<i>self</i>)</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>


<h3 class="fn"><a name="screenPos" /><a href="qpoint.html">QPoint</a> QGraphicsSceneDragDropEvent.screenPos (<i>self</i>)</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>


<h3 class="fn"><a name="setDropAction" />QGraphicsSceneDragDropEvent.setDropAction (<i>self</i>, <a href="qt.html#DropAction-enum">Qt.DropAction</a>&#160;<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 <tt>accept()</tt> in stead of
<tt>acceptProposedAction()</tt> if you use this function.</p>
<p><b>See also</b> <a href="qgraphicsscenedragdropevent.html#dropAction">dropAction</a>(),
<a href="qevent.html#accept">accept</a>(), and <a href="qgraphicsscenedragdropevent.html#possibleActions">possibleActions</a>().</p>


<h3 class="fn"><a name="source" /><a href="qwidget.html">QWidget</a> QGraphicsSceneDragDropEvent.source (<i>self</i>)</h3><p>This function returns the <a href="qgraphicsview.html">QGraphicsView</a> that created the <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a>.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>