The Q3ImageDrag class provides a drag and drop object for transferring images. More...
#include <Q3ImageDrag>
This class is part of the Qt 3 support library. It is provided to keep old source code working. We strongly advise against using it in new code. See Porting to Qt 4 for more information.
Inherits: Q3DragObject.
Q3ImageDrag ( QImage image, QWidget * dragSource = 0, const char * name = 0 ) | |
Q3ImageDrag ( QWidget * dragSource = 0, const char * name = 0 ) | |
~Q3ImageDrag () | |
virtual void | setImage ( QImage image ) |
virtual QByteArray | encodedData ( const char * fmt ) const |
virtual const char * | format ( int i ) const |
bool | canDecode ( const QMimeSource * source ) |
bool | decode ( const QMimeSource * source, QImage & image ) |
bool | decode ( const QMimeSource * source, QPixmap & pixmap ) |
The Q3ImageDrag class provides a drag and drop object for transferring images.
Images are offered to the receiving application in multiple formats, determined by Qt's output formats.
Constructs an image drag object with the given name, and sets its data to image. The dragSource is the widget that the drag operation started from.
Constructs a default image drag object with the given name. The dragSource is the widget that the drag operation started from.
Destroys the image drag object.
Returns true if the information in the MIME source can be decoded into an image; otherwise returns false.
See also decode().
Decode the dropped information in the MIME source into the image. Returns true if successful; otherwise returns false.
See also canDecode().
This is an overloaded function.
Decodes the dropped information in the MIME source into the pixmap. Returns true if successful; otherwise returns false.
This is a convenience function that converts the information to a QPixmap via a QImage.
See also canDecode().
Reimplemented from QMimeSource::encodedData().
Reimplemented from QMimeSource::format().
Sets the image to be dragged. You will need to call this if you did not pass the image during construction.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.