~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qdragmoveevent.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/kernel/qevent.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QDragMoveEvent Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<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="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QDragMoveEvent Class Reference</h1>
 
21
<p>The QDragMoveEvent class provides an event which is sent while a drag and drop action is in progress. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QDragMoveEvent&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<p>Inherits <a href="qdropevent.html">QDropEvent</a>.</p>
 
24
<p>Inherited by <a href="qdragenterevent.html">QDragEnterEvent</a>.</p>
 
25
<ul>
 
26
<li><a href="qdragmoveevent-members.html">List of all members, including inherited members</a></li>
 
27
<li><a href="qdragmoveevent-qt3.html">Qt 3 support members</a></li>
 
28
</ul>
 
29
<a name="public-functions"></a>
 
30
<h3>Public Functions</h3>
 
31
<ul>
 
32
<li><div class="fn"/><b><a href="qdragmoveevent.html#QDragMoveEvent">QDragMoveEvent</a></b> ( const QPoint &amp; <i>pos</i>, Qt::DropActions <i>actions</i>, const QMimeData * <i>data</i>, Qt::MouseButtons <i>buttons</i>, Qt::KeyboardModifiers <i>modifiers</i>, Type <i>type</i> = DragMove )</li>
 
33
<li><div class="fn"/><b><a href="qdragmoveevent.html#dtor.QDragMoveEvent">~QDragMoveEvent</a></b> ()</li>
 
34
<li><div class="fn"/>void <b><a href="qdragmoveevent.html#accept">accept</a></b> ( const QRect &amp; <i>rectangle</i> )</li>
 
35
<li><div class="fn"/>void <b><a href="qdragmoveevent.html#accept-3">accept</a></b> ()</li>
 
36
<li><div class="fn"/>QRect <b><a href="qdragmoveevent.html#answerRect">answerRect</a></b> () const</li>
 
37
<li><div class="fn"/>void <b><a href="qdragmoveevent.html#ignore">ignore</a></b> ( const QRect &amp; <i>rectangle</i> )</li>
 
38
<li><div class="fn"/>void <b><a href="qdragmoveevent.html#ignore-2">ignore</a></b> ()</li>
 
39
</ul>
 
40
<ul>
 
41
<li><div class="fn"/>10 public functions inherited from <a href="qdropevent.html#public-functions">QDropEvent</a></li>
 
42
<li><div class="fn"/>6 public functions inherited from <a href="qevent.html#public-functions">QEvent</a></li>
 
43
</ul>
 
44
<h3>Additional Inherited Members</h3>
 
45
<ul>
 
46
<li><div class="fn"/>1 property inherited from <a href="qevent.html#properties">QEvent</a></li>
 
47
</ul>
 
48
<a name="details"></a>
 
49
<hr />
 
50
<h2>Detailed Description</h2>
 
51
<p>The QDragMoveEvent class provides an event which is sent while a drag and drop action is in progress.</p>
 
52
<p>When a widget <a href="qwidget.html#acceptDrops-prop">accepts drop events</a>, it will receive this event repeatedly while the drag is within the widget's boundaries. The widget should examine the event to see what kind of data it <a href="qdropevent-qt3.html#provides">provides</a>, and call the <a href="qdragmoveevent.html#accept">accept</a>() function to accept the drop if appropriate.</p>
 
53
<p>The rectangle supplied by the <a href="qdragmoveevent.html#answerRect">answerRect</a>() function can be used to restrict drops to certain parts of the widget. For example, we can check whether the rectangle intersects with the geometry of a certain child widget and only call <a href="qdropevent.html#acceptProposedAction">acceptProposedAction()</a> if that is the case.</p>
 
54
<p>Note that this class inherits most of its functionality from <a href="qdropevent.html">QDropEvent</a>.</p>
 
55
<p>See also <a href="qdragenterevent.html">QDragEnterEvent</a>, <a href="qdragleaveevent.html">QDragLeaveEvent</a>, and <a href="qdropevent.html">QDropEvent</a>.</p>
 
56
<hr />
 
57
<h2>Member Function Documentation</h2>
 
58
<h3 class="fn"><a name="QDragMoveEvent"></a>QDragMoveEvent::QDragMoveEvent ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i>, <a href="qt.html#DropAction-enum">Qt::DropActions</a> <i>actions</i>, const <a href="qmimedata.html">QMimeData</a> * <i>data</i>, <a href="qt.html#MouseButton-enum">Qt::MouseButtons</a> <i>buttons</i>, <a href="qt.html#KeyboardModifier-enum">Qt::KeyboardModifiers</a> <i>modifiers</i>, <a href="qevent.html#Type-enum">Type</a> <i>type</i> = DragMove )</h3>
 
59
<p>Creates a <a href="qdragmoveevent.html">QDragMoveEvent</a> of the required <i>type</i> indicating that the mouse is at position <i>pos</i> given within a widget.</p>
 
60
<p>The mouse and keyboard states are specified by <i>buttons</i> and <i>modifiers</i>, and the <i>actions</i> describe the types of drag and drop operation that are possible. The drag data is passed as MIME-encoded information in <i>data</i>.</p>
 
61
<p><b>Warning:</b> Do not attempt to create a <a href="qdragmoveevent.html">QDragMoveEvent</a> yourself. These objects rely on Qt's internal state.</p>
 
62
<h3 class="fn"><a name="dtor.QDragMoveEvent"></a>QDragMoveEvent::~QDragMoveEvent ()</h3>
 
63
<p>Destroys the event.</p>
 
64
<h3 class="fn"><a name="accept"></a>void QDragMoveEvent::accept ( const <a href="qrect.html">QRect</a> &amp; <i>rectangle</i> )</h3>
 
65
<p>The same as accept(), but also notifies that future moves will also be acceptable if they remain within the <i>rectangle</i> given on the widget. This can improve performance, but may also be ignored by the underlying system.</p>
 
66
<p>If the rectangle is empty, drag move events will be sent continuously. This is useful if the source is scrolling in a timer event.</p>
 
67
<h3 class="fn"><a name="accept-3"></a>void QDragMoveEvent::accept ()</h3>
 
68
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
69
<p>Calls <a href="qdropevent.html#accept">QDropEvent::accept</a>().</p>
 
70
<h3 class="fn"><a name="answerRect"></a><a href="qrect.html">QRect</a> QDragMoveEvent::answerRect () const</h3>
 
71
<p>Returns the rectangle in the widget where the drop will occur if accepted. You can use this information to restrict drops to certain places on the widget.</p>
 
72
<h3 class="fn"><a name="ignore"></a>void QDragMoveEvent::ignore ( const <a href="qrect.html">QRect</a> &amp; <i>rectangle</i> )</h3>
 
73
<p>The opposite of the accept(const <a href="qrect.html">QRect</a>&amp;) function. Moves within the <i>rectangle</i> are not acceptable, and will be ignored.</p>
 
74
<h3 class="fn"><a name="ignore-2"></a>void QDragMoveEvent::ignore ()</h3>
 
75
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
76
<p>Calls <a href="qevent.html#ignore">QDropEvent::ignore</a>().</p>
 
77
<p /><address><hr /><div align="center">
 
78
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
79
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
80
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
81
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
82
</tr></table></div></address></body>
 
83
</html>