Qtopia Home - Classes - Hierachy - Annotated - Functions - Licenses - Reference |
|
The QDragObject class encapsulates MIME-based information transfer. More...
#include <qdragobject.h>
Inherits QObject and QMimeSource.
Inherited by QStoredDrag, QTextDrag, and QImageDrag.
The QDragObject class encapsulates MIME-based information transfer.
QDragObject is the base class for all data that needs to be transferred between and within applications, both for drag-and-drop and for the clipboard.
See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.
See the QClipboard documentation for an overview of how to provide cut-and-paste in your application.
See also
This enum type decides which of several types of drag each individual drag is. The available types are:
Note that the drag object will be deleted when dragSource is.
The function returns TRUE if the caller should delete the original copy of the dragged data (but also note target()).
Note that if the drag contains references to information (eg. file names is a QUriDrag are references) then the return value should always be ignored, as the target is expected to manipulate the referred-to content directly. On X11 the return value should always be correct anyway, but on Windows this is not necessarily the case (eg. the file manager starts a background process to move files, so the source must not delete the files!)
At this point, the object becomes owned by Qt, not the application. You should not delete the drag object nor anything it references. The actual transfer of data to the target application will be done during future event processing - after that time the drag object will be deleted.
Returns TRUE if the dragged data was dragged as a move, indicating that the caller should remove the original source of the data (the drag object must continue to have a copy).
Normally one of simpler drag(), dragMove(), or dragCopy() functions would be used instead.
Warning: in Qt 1.x, drag operations all return FALSE. This will change in later versions - the functions are provided in this way to assist preemptive development - code both move and copy with Qt 1.x to be prepared.
See drag(DragMove) for important further information.
The hotspot is the point on (or off) the pixmap that should be under the cursor as it is dragged. It is relative to the top-left pixel of the pixmap.
Uses a hotspot that positions the pixmap below and to the right of the mouse pointer. This allows the user to clearly see the point on the window which they are dragging the data onto.
This can be useful for detecting the case where drag-and-drop is to and from the same widget.
This file is part of the Qtopia platform, copyright © 1995-2005 Trolltech, all rights reserved.
| Copyright © 2005 Trolltech | Trademarks | Qtopia version 2.2.0
|