Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

QImageDrag Class Reference

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

#include <QImageDrag>

Inherits QDragObject.

List of all members.

Writable Properties

Public Functions

Public Slots

Signals

Static Public Members

Protected Functions


Detailed 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 Qt's output formats.

For more information about drag and drop, see the QDragObject class and the drag and drop documentation.


Member Function Documentation

QImageDrag::QImageDrag ( QImage image, QWidget * dragSource = 0 )

Constructs an image drag object for the given dragSource and sets its data to the given image. The dragSource is passed to the QDragObject constructor.

QImageDrag::QImageDrag ( QWidget * dragSource = 0 )

Constructs a default image drag object for the given dragSource. The dragSource is passed to the QDragObject constructor.

QImageDrag::~QImageDrag ()

Destroys the image drag object.

bool QImageDrag::canDecode ( const QMimeSource * source )   [static]

Returns true if the information in the MIME source can be decoded into an image; otherwise returns false.

See also decode().

bool QImageDrag::decode ( const QMimeSource * source, QImage & image )   [static]

Decode the dropped information in the MIME source into the image. Returns true if successful; otherwise returns false.

See also canDecode().

bool QImageDrag::decode ( const QMimeSource * source, QPixmap & pixmap )   [static]

This is an overloaded member function, provided for convenience. It behaves essentially like the above 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().

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.


Copyright © 2004 Trolltech. Trademarks
Qt 4.0.0-tp1