The QDragObject class encapsulates MIME-based information transfer. More...
Inherits QMimeSource and QObject.
Inherited by QIconDrag, QImageDrag, QStoredDrag and QTextDrag.
List of all member functions.
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.
DragDefault- the mode is determined heuristically.
DragCopy- the data is copied, never moved.
DragMove- the data is moved, if dragged at all.
DragCopyOrMove- the user chooses the mode by using control key to switch from the default.
Constructs a drag object which is a child of dragSource and named name.
Note that the drag object will be deleted when dragSource is.
Destructs the drag object, canceling any drag-and-drop operation in which it is involved, and frees up the storage used.
Starts a drag operation using the contents of this object, using DragDefault mode.
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!).
Starts a drag operation using the contents of this object.
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.
Starts a drag operation using the contents of this object, using DragCopy mode.
See drag(DragMove) for important further information.
Starts a drag operation using the contents of this object, using DragMove mode.
Returns the currently set pixmap (which isNull() if none is set).
Returns the currently set pixmap hotspot.
Set the pixmap pm to display while dragging the object. The platform-specific implementation will use this in a loose fashion - so provide a small masked pixmap, but do not require that the user ever sees it in all its splendor. In particular, cursors on Windows 95 are of limited size.
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.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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.
Returns a pointer to the drag source where this object originated.
After the drag completes, this function will return the QWidget which received the drop, or 0 if the data was dropped on some other program.
This can be useful for detecting the case where drag-and-drop is to and from the same widget.
For internal use only.
Search the documentation, FAQ, qt-interest archive and more (uses
This file is part of the Qt toolkit, copyright © 1995-2005 Trolltech, all rights reserved.
|Copyright © 2005 Trolltech||Trademarks|
Qt version 2.3.10