<class name="QDropEvent" doc="/** <p>The <a href="QDropEvent.html#QDropEvent(com.trolltech.qt.core.QPoint, com.trolltech.qt.core.Qt.DropActions, com.trolltech.qt.gui.QMimeData, com.trolltech.qt.core.Qt.MouseButtons, com.trolltech.qt.core.Qt.KeyboardModifiers, com.trolltech.qt.core.QEvent.Type)"><tt>QDropEvent</tt></a> class provides an event which is sent when a drag and drop action is completed.</p> <p>When a widget accepts drop events</tt>, it will receive this event if it has accepted the most recent <a href="QDragEnterEvent.html"><tt>QDragEnterEvent</tt></a> or <a href="QDragMoveEvent.html"><tt>QDragMoveEvent</tt></a> sent to it.</p> <p>The drop event contains a proposed action, available from <a href="QDropEvent.html#proposedAction()"><tt>proposedAction</tt></a>, for the widget to either accept or ignore. If the action can be handled by the widget, you should call the <a href="QDropEvent.html#acceptProposedAction()"><tt>acceptProposedAction</tt></a> function. Since the proposed action can be a combination of <tt>Qt::DropAction</tt> values, it may be useful to either select one of these values as a default action or ask the user to select their preferred action.</p> <p>If the proposed drop action is not suitable, perhaps because your custom widget does not support that action, you can replace it with any of the <a href="QDropEvent.html#possibleActions()">possible drop actions</tt></a> by calling <a href="QDropEvent.html#setDropAction(com.trolltech.qt.core.Qt.DropAction)"><tt>setDropAction</tt></a> with your preferred action. If you set a value that is not present in the bitwise OR combination of values returned by <a href="QDropEvent.html#possibleActions()"><tt>possibleActions</tt></a>, the default copy action will be used. Once a replacement drop action has been set, call <a href="%2E%2E/core/%2E%2E/core/QEvent.html#accept()"><tt>accept</tt></a> instead of <a href="QDropEvent.html#acceptProposedAction()"><tt>acceptProposedAction</tt></a> to complete the drop operation.</p> <p>The <a href="QDropEvent.html#mimeData()"><tt>mimeData</tt></a> function provides the data dropped on the widget in a <a href="QMimeData.html"><tt>QMimeData</tt></a> object. This contains information about the MIME type of the data in addition to the data itself.</p> @see <a href="QMimeData.html"><tt>QMimeData</tt></a> @see <a href="QDrag.html"><tt>QDrag</tt></a> @see <a href="%2E%2E/dnd.html">Drag and Drop</tt></a> */"> <method name="public QDropEvent(com.trolltech.qt.core.QPoint pos, com.trolltech.qt.core.Qt.DropActions actions, com.trolltech.qt.gui.QMimeData data, com.trolltech.qt.core.Qt.MouseButtons buttons, com.trolltech.qt.core.Qt.KeyboardModifiers modifiers, com.trolltech.qt.core.QEvent.Type type)" doc="/** <p>Constructs a drop event of a certain <tt>type</tt> corresponding to a drop at the point specified by <tt>pos</tt> in the destination widget's coordinate system.</p> <p>The <tt>actions</tt> indicate which types of drag and drop operation can be performed, and the drag data is stored as MIME-encoded data in <tt>data</tt>.</p> <p>The states of the mouse buttons and keyboard modifiers at the time of the drop are specified by <tt>buttons</tt> and <tt>modifiers</tt>.</p> */"/> <method name="public QDropEvent(com.trolltech.qt.core.QPoint pos, com.trolltech.qt.core.Qt.DropActions actions, com.trolltech.qt.gui.QMimeData data, com.trolltech.qt.core.Qt.MouseButtons buttons, com.trolltech.qt.core.Qt.KeyboardModifiers modifiers)" doc="/** <p>Equivalent to <a href="QDropEvent.html#QDropEvent(com.trolltech.qt.core.QPoint, com.trolltech.qt.core.Qt.DropActions, com.trolltech.qt.gui.QMimeData, com.trolltech.qt.core.Qt.MouseButtons, com.trolltech.qt.core.Qt.KeyboardModifiers, com.trolltech.qt.core.QEvent.Type)"><tt>QDropEvent</tt></a>(<tt>pos</tt>, <tt>actions</tt>, <tt>data</tt>, <tt>buttons</tt>, <tt>modifiers</tt>, Drop). */"/> <method name="public final void acceptProposedAction()" doc="/** <p>Sets the drop action to be the proposed action.</p> @see <a href="QDropEvent.html#setDropAction(com.trolltech.qt.core.Qt.DropAction)"><tt>setDropAction</tt></a> @see <a href="QDropEvent.html#proposedAction()"><tt>proposedAction</tt></a> @see <tt>accept</tt> */"/> <method name="public final com.trolltech.qt.core.Qt.DropAction dropAction()" doc="/** <p>Returns the action to be performed on the data by the target. This may be different from the action supplied in <a href="QDropEvent.html#proposedAction()"><tt>proposedAction</tt></a> if you have called <a href="QDropEvent.html#setDropAction(com.trolltech.qt.core.Qt.DropAction)"><tt>setDropAction</tt></a> to explicitly choose a drop action.</p> @see <a href="QDropEvent.html#setDropAction(com.trolltech.qt.core.Qt.DropAction)"><tt>setDropAction</tt></a> */"/> <method name="public final com.trolltech.qt.core.Qt.KeyboardModifiers keyboardModifiers()" doc="/** <p>Returns the modifier keys that are pressed.</p> */"/> <method name="public final com.trolltech.qt.gui.QMimeData mimeData()" doc="/** <p>Returns the data that was dropped on the widget and its associated MIME type information.</p> */"/> <method name="public final com.trolltech.qt.core.Qt.MouseButtons mouseButtons()" doc="/** <p>Returns the mouse buttons that are pressed..</p> */"/> <method name="public final com.trolltech.qt.core.QPoint pos()" doc="/** <p>Returns the position where the drop was made.</p> */"/> <method name="public final com.trolltech.qt.core.Qt.DropActions possibleActions()" doc="/** <p>Returns an OR-combination of possible drop actions.</p> @see <a href="QDropEvent.html#dropAction()"><tt>dropAction</tt></a> */"/> <method name="public final com.trolltech.qt.core.Qt.DropAction proposedAction()" doc="/** <p>Returns the proposed drop action.</p> @see <a href="QDropEvent.html#dropAction()"><tt>dropAction</tt></a> */"/> <method name="public final void setDropAction(com.trolltech.qt.core.Qt.DropAction action)" doc="/** <p>Sets the <tt>action</tt> to be performed on the data by the target. Use this to override the <a href="QDropEvent.html#proposedAction()">proposed action</tt></a> with one of the <a href="QDropEvent.html#possibleActions()">possible actions</tt></a>.</p> <p>If you set a drop action that is not one of the possible actions, the drag and drop operation will default to a copy operation.</p> <p>Once you have supplied a replacement drop action, call <a href="%2E%2E/core/%2E%2E/core/QEvent.html#accept()"><tt>accept</tt></a> instead of <a href="QDropEvent.html#acceptProposedAction()"><tt>acceptProposedAction</tt></a>.</p> @see <a href="QDropEvent.html#dropAction()"><tt>dropAction</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QWidget source()" doc="/** <p>If the source of the drag operation is a widget in this application, this function returns that source; otherwise it returns 0. The source of the operation is the first parameter to the <a href="QDrag.html"><tt>QDrag</tt></a> object used instantiate the drag.</p> <p>This is useful if your widget needs special behavior when dragging to itself.</p> @see <tt>QDrag::QDrag</tt> */"/> <method name="protected final com.trolltech.qt.gui.QMimeData mdata()"/> <method name="protected final void setMdata(com.trolltech.qt.gui.QMimeData mdata)"/> <method name="protected final com.trolltech.qt.core.Qt.DropAction default_action()"/> <method name="protected final void setDefault_action(com.trolltech.qt.core.Qt.DropAction default_action)"/> <method name="protected final com.trolltech.qt.core.Qt.KeyboardModifiers modState()"/> <method name="protected final void setModState(com.trolltech.qt.core.Qt.KeyboardModifiers modState)"/> <method name="protected final java.util.List<com.trolltech.qt.core.QByteArray> fmts()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QDropEvent.html#setFmts(java.util.List<com.trolltech.qt.core.QByteArray>)"><tt>setFmts</tt></a> */"/> <method name="protected final void setFmts(java.util.List<com.trolltech.qt.core.QByteArray> fmts)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QDropEvent.html#fmts()"><tt>fmts</tt></a> */"/> <method name="protected final com.trolltech.qt.core.Qt.MouseButtons mouseState()"/> <method name="protected final void setMouseState(com.trolltech.qt.core.Qt.MouseButtons mouseState)"/> <method name="protected final com.trolltech.qt.core.Qt.DropAction drop_action()"/> <method name="protected final void setDrop_action(com.trolltech.qt.core.Qt.DropAction drop_action)"/> <method name="protected final com.trolltech.qt.core.QPoint p()"/> <method name="protected final void setP(com.trolltech.qt.core.QPoint p)"/> <method name="protected final com.trolltech.qt.core.Qt.DropActions act()"/> <method name="protected final void setAct(com.trolltech.qt.core.Qt.DropActions act)"/> </class>