Eneboo - Documentación para desarrolladores
|
The QImageDrag class provides a drag and drop object for transferring images. Más...
#include <qdragobject.h>
Métodos públicos | |
QImageDrag (QImage image, QWidget *dragSource=0, const char *name=0) | |
QImageDrag (QWidget *dragSource=0, const char *name=0) | |
~QImageDrag () | |
virtual void | setImage (QImage image) |
const char * | format (int i) const |
virtual QByteArray | encodedData (const char *) const |
QImageDrag (QImage image, QWidget *dragSource=0, const char *name=0) | |
QImageDrag (QWidget *dragSource=0, const char *name=0) | |
~QImageDrag () | |
virtual void | setImage (QImage image) |
const char * | format (int i) const |
virtual QByteArray | encodedData (const char *) const |
Métodos públicos estáticos | |
static bool | canDecode (const QMimeSource *e) |
static bool | decode (const QMimeSource *e, QImage &i) |
static bool | decode (const QMimeSource *e, QPixmap &i) |
static bool | canDecode (const QMimeSource *e) |
static bool | decode (const QMimeSource *e, QImage &i) |
static bool | decode (const QMimeSource *e, QPixmap &i) |
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.
Constructs an image drag object and sets its data 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 image drag object. dragSource must be the drag source; name is the object name.
QImageDrag::~QImageDrag | ( | ) |
Destroys the image drag object and frees up all allocated resources.
QImageDrag::QImageDrag | ( | QWidget * | dragSource = 0 , |
const char * | name = 0 |
||
) |
QImageDrag::~QImageDrag | ( | ) |
bool QImageDrag::canDecode | ( | const QMimeSource * | e | ) | [static] |
Returns TRUE if the information in mime source e can be decoded into an image; otherwise returns FALSE.
static bool QImageDrag::canDecode | ( | const QMimeSource * | e | ) | [static] |
bool QImageDrag::decode | ( | const QMimeSource * | e, |
QImage & | img | ||
) | [static] |
Attempts to decode the dropped information in mime source e into img. Returns TRUE if successful; otherwise returns FALSE.
static bool QImageDrag::decode | ( | const QMimeSource * | e, |
QImage & | i | ||
) | [static] |
bool QImageDrag::decode | ( | const QMimeSource * | e, |
QPixmap & | pm | ||
) | [static] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Attempts to decode the dropped information in mime source e into pixmap pm. Returns TRUE if successful; otherwise returns FALSE.
This is a convenience function that converts to a QPixmap via a QImage.
static bool QImageDrag::decode | ( | const QMimeSource * | e, |
QPixmap & | i | ||
) | [static] |
virtual QByteArray QImageDrag::encodedData | ( | const char * | ) | const [virtual] |
Returns the encoded data of this object in the specified MIME format.
Subclasses must reimplement this function.
Implementa QMimeSource.
QByteArray QImageDrag::encodedData | ( | const char * | fmt | ) | const [virtual] |
Implementa QMimeSource.
const char * QImageDrag::format | ( | int | i | ) | const [virtual] |
Implementa QMimeSource.
const char* QImageDrag::format | ( | int | i | ) | const [virtual] |
Returns the {i}-th supported MIME format, or 0.
Implementa QMimeSource.
void QImageDrag::setImage | ( | QImage | image | ) | [virtual] |
Sets the image to be dragged to image. You will need to call this if you did not pass the image during construction.
virtual void QImageDrag::setImage | ( | QImage | image | ) | [virtual] |