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

# QStoredDrag Class Reference

The QStoredDrag class provides a simple stored-value drag object for arbitrary MIME data. More...

    #include <QStoredDrag>

Inherits QDragObject.

Inherited by QUriDrag and QColorDrag.

- List of all members, including inherited members
- Obsolete members

### Writable Properties

- 1 writable property inherited from QObject

### Public Functions

- QStoredDrag ( const char * mimeType, QWidget * dragSource = 0 )
- ~QStoredDrag ()
- virtual QByteArray encodedData ( const char * format ) const
- virtual void setEncodedData ( const QByteArray & data )

- 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

- 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 QStoredDrag class provides a simple stored-value drag object for arbitrary MIME data.

When a block of data has only one representation, you can use a QStoredDrag to hold it.

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

## Member Function Documentation

### QStoredDrag::QStoredDrag ( const char * mimeType, QWidget * dragSource = 0 )

Constructs a QStoredDrag of the given mimeType for the given dragSource. The dragSource is passed to the QDragObject constructor, and the format is set to the mimeType.

The data will be unset. Use setEncodedData() to set it.

### QStoredDrag::~QStoredDrag ()

Destroys the drag object.

### QByteArray QStoredDrag::encodedData ( const char * format ) const `[virtual]`

Returns the stored data in the format given.

Reimplemented from QMimeSource.

See also setEncodedData().

### void QStoredDrag::setEncodedData ( const QByteArray & data ) `[virtual]`

Sets the encoded data of this drag object. The encoded data is delivered to drop sites; it must be in a strictly defined and portable format.

The drag object can't be dropped (by the user) until this function has been called.