Qt logo

QImageDrag Class Reference


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

#include <qdragobject.h>

Inherits QDragObject.

List of all member functions.

Public Members

Static Public Members


Detailed Description

The QImageDrag 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 )

Creates 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 )

Creates a default text drag object. dragSource must be the drag source, name is the object name.

QImageDrag::~QImageDrag ()

Destroys the image drag object and frees 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

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.


Search the documentation, FAQ, qt-interest archive and more (uses www.troll.no):


This file is part of the Qt toolkit, copyright © 1995-99 Troll Tech, all rights reserved.


Copyright © 1999 Troll TechTrademarks
Qt version 2.0.2