QImageDrag(3qt)

NAME
QImageDrag - Drag-and-drop object for transferring images

#include <qdragobject.h>

Inherits QDragObject.

  Public Members
QImageDrag ( QImage image, QWidget * dragSource = 0, const char * name = 0 )
QImageDrag ( QWidget * dragSource = 0, const char * name = 0 )
~QImageDrag ()
virtual void setImage ( QImage image )

  Static Public Members
bool canDecode ( const QMimeSource * e )
bool decode ( const QMimeSource * e, QImage & i )
bool decode ( const QMimeSource * e, QPixmap & i )

DESCRIPTION
The QImageDrag class provides a drag-and-drop object for transferring images.

Images are offered to the receiving application in multiple formats, determined by the output formats in Qt.

For detailed information about drag-and-drop, see the QDragObject class.

MEMBER FUNCTION DOCUMENTATION

QImageDrag::QImageDrag ( QImage image, QWidget * dragSource = 0, const char * name = 0 )
Constructs an image drag object and sets it to image. dragSource must be the drag source, name is the object name.

QImageDrag::QImageDrag ( QWidget * dragSource = 0, const char * name = 0 )
Constructs a default text drag object. dragSource must be the drag source, name is the object name.

QImageDrag::~QImageDrag ()
Destructs the image drag object and frees up all allocated resources.

bool QImageDrag::canDecode ( const QMimeSource * e ) [static]
Returns TRUE if the information in e can be decoded into an image.

See also decode().

Examples: desktop/desktop.cpp

bool QImageDrag::decode ( const QMimeSource * e, QImage & img ) [static]
Attempts to decode the dropped information in e into img, returning TRUE if successful.

See also canDecode().

bool QImageDrag::decode ( const QMimeSource * e, QPixmap & pm ) [static]
Attempts to decode the dropped information in e into pm, returning TRUE if successful.

This is a convenience function that converts to pm via a QImage.

See also canDecode().

Examples: desktop/desktop.cpp

QByteArray QImageDrag::encodedData ( const char * fmt ) const [virtual]
Reimplemented for internal reasons; the API is not affected.

const char * QImageDrag::format ( int i ) const [virtual]
Reimplemented for internal reasons; the API is not affected.

Reimplemented from QMimeSource.

void QImageDrag::setImage ( QImage image ) [virtual]
Sets the image to be dragged. You will need to call this if you did not pass the image during construction.

SEE ALSO
http://doc.trolltech.com/qimagedrag.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports make our job much simpler. Thank you.

In case of content or formattting problems with this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qimagedrag.3) and the Qt version (2.3.0).