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, including inherited members
- Obsolete members

### Writable Properties

- 1 writable property inherited from QObject

### Public Functions

- QImageDrag ( QImage image, QWidget * dragSource = 0 )
- QImageDrag ( QWidget * dragSource = 0 )
- ~QImageDrag ()
- virtual void setImage ( QImage image )

- 9 public functions inherited from QDragObject
- 24 public functions inherited from QObject
- 4 public functions inherited from QMimeSource

### Public Slots

- 1 public slot inherited from QObject

### Signals

- 1 signal inherited from QObject

### Static Public Members

- bool canDecode ( const QMimeSource * source )
- bool decode ( const QMimeSource * source, QImage & image )
- bool decode ( const QMimeSource * source, QPixmap & pixmap )

- 1 static public member inherited from QDragObject
- 4 static public members inherited from QObject

### Protected Functions

- 1 protected function inherited from QDragObject
- 9 protected functions inherited from QObject

## 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.