Qt logo

QMimeSource Class Reference


An abstract piece of formatted data. More...

#include <qmime.h>

Inherited by QDragObject and QDropEvent.

List of all member functions.

Public Members


Detailed Description

An abstract piece of formatted data.

Drag-and-drop and clipboard use this abstraction.

See also: IANA list of MIME media types

Examples: qiconview/main.cpp


Member Function Documentation

QMimeSource::~QMimeSource () [virtual]

Provided to ensure subclasses destruct correctly.

QByteArray QMimeSource::encodedData ( const char * ) const [virtual]

Returns the encoded payload of this object, in the specified MIME format.

Subclasses must override this function.

Reimplemented in QDropEvent.

const char * QMimeSource::format ( int i = 0 ) const [virtual]

Returns the ith format, or NULL.

Examples: qiconview/main.cpp

Reimplemented in QDropEvent.

bool QMimeSource::provides ( const char * mimeType ) const [virtual]

Returns TRUE if the object can provide the data in format mimeType. The default implementation iterates over format().

Note that it is often better to use the more-abstract canDecode() functions such as QTextDrag::canDecode() and QImageDrag::canDecode().

Reimplemented in QDropEvent.


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