<class name="QMimeData" doc="/**
&lt;p&gt;The &lt;a href=&quot;QMimeData.html#QMimeData()&quot;&gt;&lt;tt&gt;QMimeData&lt;/tt&gt;&lt;/a&gt; class provides a container for data that records information about its MIME type.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QMimeData.html#QMimeData()&quot;&gt;&lt;tt&gt;QMimeData&lt;/tt&gt;&lt;/a&gt; is used to describe information that can be stored in the &lt;a href=&quot;QClipboard.html&quot;&gt;clipboard&lt;/tt&gt;&lt;/a&gt;, and transferred via the &lt;a href=&quot;%2E%2E/dnd.html&quot;&gt;drag and drop&lt;/tt&gt;&lt;/a&gt; mechanism. &lt;a href=&quot;QMimeData.html#QMimeData()&quot;&gt;&lt;tt&gt;QMimeData&lt;/tt&gt;&lt;/a&gt; objects associate the data that they hold with the corresponding MIME types to ensure that information can be safely transferred between applications, and copied around within the same application.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QMimeData.html#QMimeData()&quot;&gt;&lt;tt&gt;QMimeData&lt;/tt&gt;&lt;/a&gt; objects are usually created using &lt;tt&gt;new&lt;/tt&gt; and supplied to &lt;a href=&quot;QDrag.html&quot;&gt;&lt;tt&gt;QDrag&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QClipboard.html&quot;&gt;&lt;tt&gt;QClipboard&lt;/tt&gt;&lt;/a&gt; objects. This is to enable Qt to manage the memory that they use.&lt;/p&gt;
&lt;p&gt;A single &lt;a href=&quot;QMimeData.html#QMimeData()&quot;&gt;&lt;tt&gt;QMimeData&lt;/tt&gt;&lt;/a&gt; object can store the same data using several different formats at the same time. The &lt;a href=&quot;QMimeData.html#formats()&quot;&gt;&lt;tt&gt;formats&lt;/tt&gt;&lt;/a&gt; function returns a list of the available formats in order of preference. The &lt;a href=&quot;QMimeData.html#data(java.lang.String)&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt; function returns the raw data associated with a MIME type, and &lt;a href=&quot;QMimeData.html#setData(java.lang.String, com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; allows you to set the data for a MIME type.&lt;/p&gt;
&lt;p&gt;For the most common MIME types, &lt;a href=&quot;QMimeData.html#QMimeData()&quot;&gt;&lt;tt&gt;QMimeData&lt;/tt&gt;&lt;/a&gt; provides convenience functions to access the data:&lt;/p&gt;
&lt;p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;thead&gt;&lt;tr valign=&quot;top&quot; class=&quot;qt-style&quot;&gt;&lt;th&gt;Tester&lt;/th&gt;&lt;th&gt;Getter&lt;/th&gt;&lt;th&gt;Setter&lt;/th&gt;&lt;th&gt;MIME Types&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;a href=&quot;QMimeData.html#hasText()&quot;&gt;&lt;tt&gt;hasText&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QMimeData.html#text()&quot;&gt;&lt;tt&gt;text&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QMimeData.html#setText(java.lang.String)&quot;&gt;&lt;tt&gt;setText&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;text/plain&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;&lt;a href=&quot;QMimeData.html#hasHtml()&quot;&gt;&lt;tt&gt;hasHtml&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QMimeData.html#html()&quot;&gt;&lt;tt&gt;html&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QMimeData.html#setHtml(java.lang.String)&quot;&gt;&lt;tt&gt;setHtml&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;text/html&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;a href=&quot;QMimeData.html#hasUrls()&quot;&gt;&lt;tt&gt;hasUrls&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QMimeData.html#urls()&quot;&gt;&lt;tt&gt;urls&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QMimeData.html#setUrls(java.util.List&lt;com.trolltech.qt.core.QUrl&gt;)&quot;&gt;&lt;tt&gt;setUrls&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;text/uri-list&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;&lt;a href=&quot;QMimeData.html#hasImage()&quot;&gt;&lt;tt&gt;hasImage&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QMimeData.html#imageData()&quot;&gt;&lt;tt&gt;imageData&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QMimeData.html#setImageData(java.lang.Object)&quot;&gt;&lt;tt&gt;setImageData&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;image/&lt;/tt&gt; *&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;a href=&quot;QMimeData.html#hasColor()&quot;&gt;&lt;tt&gt;hasColor&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QMimeData.html#colorData()&quot;&gt;&lt;tt&gt;colorData&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;QMimeData.html#setColorData(java.lang.Object)&quot;&gt;&lt;tt&gt;setColorData&lt;/tt&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;tt&gt;application/x-color&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;For example, if your write a widget that accepts URL drags, you would end up writing code like this:&lt;/p&gt;
&lt;pre&gt;    void MyWidget::dragEnterEvent(QDragEnterEvent *event)
    {
        if (event-&amp;gt;mimeData()-&amp;gt;hasUrls())
            event-&amp;gt;acceptProposedAction();
    }

    void MyWidget::dropEvent(QDropEvent *event)
    {
        if (event-&amp;gt;mimeData()-&amp;gt;hasUrls()) {
            QUrl url = event-&amp;gt;mimeData()-&amp;gt;urls();
            ...
        }
    }&lt;/pre&gt;
&lt;p&gt;There are three appraches for storing custom data in a &lt;a href=&quot;QMimeData.html#QMimeData()&quot;&gt;&lt;tt&gt;QMimeData&lt;/tt&gt;&lt;/a&gt; object:&lt;/p&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;Custom data can be stored directly in a &lt;a href=&quot;QMimeData.html#QMimeData()&quot;&gt;&lt;tt&gt;QMimeData&lt;/tt&gt;&lt;/a&gt; object as a &lt;a href=&quot;%2E%2E/core/QByteArray.html&quot;&gt;&lt;tt&gt;QByteArray&lt;/tt&gt;&lt;/a&gt; using &lt;a href=&quot;QMimeData.html#setData(java.lang.String, com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt;. For example:&lt;pre&gt;        QByteArray csvData = ...;

        QMimeData *mimeData = new QMimeData;
        mimeData-&amp;gt;setData(&amp;quot;text/csv&amp;quot;, csvData);&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;We can subclass &lt;a href=&quot;QMimeData.html#QMimeData()&quot;&gt;&lt;tt&gt;QMimeData&lt;/tt&gt;&lt;/a&gt; and reimplement &lt;a href=&quot;QMimeData.html#hasFormat(java.lang.String)&quot;&gt;&lt;tt&gt;hasFormat&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMimeData.html#formats()&quot;&gt;&lt;tt&gt;formats&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QMimeData.html#retrieveData(java.lang.String, int)&quot;&gt;&lt;tt&gt;retrieveData&lt;/tt&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;If the drag and drop operation occurs withing a single application, we can subclass &lt;a href=&quot;QMimeData.html#QMimeData()&quot;&gt;&lt;tt&gt;QMimeData&lt;/tt&gt;&lt;/a&gt; and add extra data in it, and use a qobject_cast() in the receiver's drop event handler. For example:&lt;pre&gt;    void MyWidget::dropEvent(QDropEvent *event)
    {
        const MyMimeData *myData =
                qobject_cast&amp;lt;const MyMimeData *&amp;gt;(event-&amp;gt;mimeData());
        if (myData) {
            &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; access myData's data directly (not through QMimeData's API)
        }
    }&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;a name=&quot;platform-specific-mime-types&quot;&gt;&lt;/a&gt;
&lt;h3&gt;Platform-Specific MIME Types&lt;/h3&gt;
&lt;p&gt;On Windows, &lt;a href=&quot;QMimeData.html#formats()&quot;&gt;&lt;tt&gt;formats&lt;/tt&gt;&lt;/a&gt; will also return custom formats available in the MIME data, using the &lt;tt&gt;x-qt-windows-mime&lt;/tt&gt; subtype to indicate that they represent data in non-standard formats. The formats will take the following form:&lt;/p&gt;
&lt;pre&gt;    application/x-qt-windows-mime;value=&amp;quot;&amp;lt;custom type&amp;gt;&amp;quot;&lt;/pre&gt;
&lt;p&gt;The following are examples of custom MIME types:&lt;/p&gt;
&lt;pre&gt;    application/x-qt-windows-mime;value=&amp;quot;FileGroupDescriptor&amp;quot;
    application/x-qt-windows-mime;value=&amp;quot;FileContents&amp;quot;&lt;/pre&gt;
&lt;p&gt;The &lt;tt&gt;value&lt;/tt&gt; declaration of each format describes the way in which the data is encoded.&lt;/p&gt;
&lt;p&gt;On Windows, the MIME format does not always map directly to the clipboard formats. Qt provides QWindowsMime to map clipboard formats to open-standard MIME formats. Similarly, the QMacPasteboardMime maps MIME to Mac flavors.&lt;/p&gt;

@see &lt;a href=&quot;QClipboard.html&quot;&gt;&lt;tt&gt;QClipboard&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDragEnterEvent.html&quot;&gt;&lt;tt&gt;QDragEnterEvent&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDragMoveEvent.html&quot;&gt;&lt;tt&gt;QDragMoveEvent&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDropEvent.html&quot;&gt;&lt;tt&gt;QDropEvent&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDrag.html&quot;&gt;&lt;tt&gt;QDrag&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QWindowsMime&lt;/tt&gt;
@see &lt;tt&gt;QMacPasteboardMime&lt;/tt&gt;
@see &lt;a href=&quot;%2E%2E/dnd.html&quot;&gt;Drag and Drop&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QMimeData()" doc="/**
&lt;p&gt;Constructs a new MIME data object with no data in it.&lt;/p&gt;
 */"/>
    <method name="public final void clear()" doc="/**
&lt;p&gt;Removes all the MIME type and data entries in the object.&lt;/p&gt;
 */"/>
    <method name="public final java.lang.Object colorData()" doc="/**
&lt;p&gt;Returns a color if the data stored in the object represents a color (MIME type &lt;tt&gt;application/x-color&lt;/tt&gt;); otherwise returns a null variant.&lt;/p&gt;
&lt;p&gt;A &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; is used because &lt;a href=&quot;QMimeData.html#QMimeData()&quot;&gt;&lt;tt&gt;QMimeData&lt;/tt&gt;&lt;/a&gt; belongs to the &lt;tt&gt;QtCore&lt;/tt&gt; library, whereas &lt;a href=&quot;QColor.html&quot;&gt;&lt;tt&gt;QColor&lt;/tt&gt;&lt;/a&gt; belongs to &lt;tt&gt;QtGui&lt;/tt&gt;. To convert the &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; to a &lt;a href=&quot;QColor.html&quot;&gt;&lt;tt&gt;QColor&lt;/tt&gt;&lt;/a&gt;, simply use qvariant_cast(). For example:&lt;/p&gt;
&lt;pre&gt;    if (event-&amp;gt;mimeData()-&amp;gt;hasColor()) {
        QColor color = qvariant_cast&amp;lt;QColor&amp;gt;(event-&amp;gt;mimeData()-&amp;gt;colorData());
        ...
    }&lt;/pre&gt;

@see &lt;a href=&quot;QMimeData.html#hasColor()&quot;&gt;&lt;tt&gt;hasColor&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#setColorData(java.lang.Object)&quot;&gt;&lt;tt&gt;setColorData&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#data(java.lang.String)&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.core.QByteArray data(java.lang.String mimetype)" doc="/**
&lt;p&gt;Returns the data stored in the object in the format described by the MIME type specified by &lt;tt&gt;mimetype&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#setData(java.lang.String, com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean hasColor()" doc="/**
&lt;p&gt;Returns true if the object can return a color (MIME type &lt;tt&gt;application/x-color&lt;/tt&gt;); otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#setColorData(java.lang.Object)&quot;&gt;&lt;tt&gt;setColorData&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#colorData()&quot;&gt;&lt;tt&gt;colorData&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasFormat(java.lang.String)&quot;&gt;&lt;tt&gt;hasFormat&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean hasHtml()" doc="/**
&lt;p&gt;Returns true if the object can return HTML (MIME type &lt;tt&gt;text/html&lt;/tt&gt;); otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#setHtml(java.lang.String)&quot;&gt;&lt;tt&gt;setHtml&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#html()&quot;&gt;&lt;tt&gt;html&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasFormat(java.lang.String)&quot;&gt;&lt;tt&gt;hasFormat&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean hasImage()" doc="/**
&lt;p&gt;Returns true if the object can return an image; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#setImageData(java.lang.Object)&quot;&gt;&lt;tt&gt;setImageData&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#imageData()&quot;&gt;&lt;tt&gt;imageData&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasFormat(java.lang.String)&quot;&gt;&lt;tt&gt;hasFormat&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean hasText()" doc="/**
&lt;p&gt;Returns true if the object can return plain text (MIME type &lt;tt&gt;text/plain&lt;/tt&gt;); otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#setText(java.lang.String)&quot;&gt;&lt;tt&gt;setText&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#text()&quot;&gt;&lt;tt&gt;text&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasHtml()&quot;&gt;&lt;tt&gt;hasHtml&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasFormat(java.lang.String)&quot;&gt;&lt;tt&gt;hasFormat&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean hasUrls()" doc="/**
&lt;p&gt;Returns true if the object can return a list of urls; otherwise returns false.&lt;/p&gt;
&lt;p&gt;URLs correspond to the MIME type &lt;tt&gt;text/uri-list&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#setUrls(java.util.List&lt;com.trolltech.qt.core.QUrl&gt;)&quot;&gt;&lt;tt&gt;setUrls&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#urls()&quot;&gt;&lt;tt&gt;urls&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasFormat(java.lang.String)&quot;&gt;&lt;tt&gt;hasFormat&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.String html()" doc="/**
&lt;p&gt;Returns a string if the data stored in the object is HTML (MIME type &lt;tt&gt;text/html&lt;/tt&gt;); otherwise returns an empty string.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#setHtml(java.lang.String)&quot;&gt;&lt;tt&gt;setHtml&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasHtml()&quot;&gt;&lt;tt&gt;hasHtml&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#setData(java.lang.String, com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.Object imageData()" doc="/**
&lt;p&gt;Returns a &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; storing a &lt;a href=&quot;QImage.html&quot;&gt;&lt;tt&gt;QImage&lt;/tt&gt;&lt;/a&gt; if the object can return an image; otherwise returns a null variant.&lt;/p&gt;
&lt;p&gt;A &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; is used because &lt;a href=&quot;QMimeData.html#QMimeData()&quot;&gt;&lt;tt&gt;QMimeData&lt;/tt&gt;&lt;/a&gt; belongs to the &lt;tt&gt;QtCore&lt;/tt&gt; library, whereas &lt;a href=&quot;QImage.html&quot;&gt;&lt;tt&gt;QImage&lt;/tt&gt;&lt;/a&gt; belongs to &lt;tt&gt;QtGui&lt;/tt&gt;. To convert the &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; to a &lt;a href=&quot;QImage.html&quot;&gt;&lt;tt&gt;QImage&lt;/tt&gt;&lt;/a&gt;, simply use qvariant_cast(). For example:&lt;/p&gt;
&lt;pre&gt;    if (event-&amp;gt;mimeData()-&amp;gt;hasImage()) {
        QImage image = qvariant_cast&amp;lt;QImage&amp;gt;(event-&amp;gt;mimeData()-&amp;gt;imageData());
        ...
    }&lt;/pre&gt;

@see &lt;a href=&quot;QMimeData.html#setImageData(java.lang.Object)&quot;&gt;&lt;tt&gt;setImageData&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasImage()&quot;&gt;&lt;tt&gt;hasImage&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setColorData(java.lang.Object color)" doc="/**
&lt;p&gt;Sets the color data in the object to the given &lt;tt&gt;color&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Colors correspond to the MIME type &lt;tt&gt;application/x-color&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#colorData()&quot;&gt;&lt;tt&gt;colorData&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasColor()&quot;&gt;&lt;tt&gt;hasColor&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#setData(java.lang.String, com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setData(java.lang.String mimetype, com.trolltech.qt.core.QByteArray data)" doc="/**
&lt;p&gt;Sets the data associated with the MIME type given by &lt;tt&gt;mimetype&lt;/tt&gt; to the specified &lt;tt&gt;data&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;For the most common types of data, you can call the higher-level functions &lt;a href=&quot;QMimeData.html#setText(java.lang.String)&quot;&gt;&lt;tt&gt;setText&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMimeData.html#setHtml(java.lang.String)&quot;&gt;&lt;tt&gt;setHtml&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMimeData.html#setUrls(java.util.List&lt;com.trolltech.qt.core.QUrl&gt;)&quot;&gt;&lt;tt&gt;setUrls&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMimeData.html#setImageData(java.lang.Object)&quot;&gt;&lt;tt&gt;setImageData&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QMimeData.html#setColorData(java.lang.Object)&quot;&gt;&lt;tt&gt;setColorData&lt;/tt&gt;&lt;/a&gt; instead.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#data(java.lang.String)&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasFormat(java.lang.String)&quot;&gt;&lt;tt&gt;hasFormat&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setHtml(java.lang.String html)" doc="/**
&lt;p&gt;Sets &lt;tt&gt;html&lt;/tt&gt; as the HTML (MIME type &lt;tt&gt;text/html&lt;/tt&gt;) used to represent the data.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#html()&quot;&gt;&lt;tt&gt;html&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasHtml()&quot;&gt;&lt;tt&gt;hasHtml&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#setText(java.lang.String)&quot;&gt;&lt;tt&gt;setText&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#setData(java.lang.String, com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setImageData(java.lang.Object image)" doc="/**
&lt;p&gt;Sets the data in the object to the given &lt;tt&gt;image&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;A &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; is used because &lt;a href=&quot;QMimeData.html#QMimeData()&quot;&gt;&lt;tt&gt;QMimeData&lt;/tt&gt;&lt;/a&gt; belongs to the &lt;tt&gt;QtCore&lt;/tt&gt; library, whereas &lt;a href=&quot;QImage.html&quot;&gt;&lt;tt&gt;QImage&lt;/tt&gt;&lt;/a&gt; belongs to &lt;tt&gt;QtGui&lt;/tt&gt;. The conversion from &lt;a href=&quot;QImage.html&quot;&gt;&lt;tt&gt;QImage&lt;/tt&gt;&lt;/a&gt; to &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; is implicit. For example:&lt;/p&gt;
&lt;pre&gt;    mimeData-&amp;gt;setImageData(QImage(&amp;quot;beautifulfjord.png&amp;quot;));&lt;/pre&gt;

@see &lt;a href=&quot;QMimeData.html#imageData()&quot;&gt;&lt;tt&gt;imageData&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasImage()&quot;&gt;&lt;tt&gt;hasImage&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#setData(java.lang.String, com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setText(java.lang.String text)" doc="/**
&lt;p&gt;Sets &lt;tt&gt;text&lt;/tt&gt; as the plain text (MIME type &lt;tt&gt;text/plain&lt;/tt&gt;) used to represent the data.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#text()&quot;&gt;&lt;tt&gt;text&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasText()&quot;&gt;&lt;tt&gt;hasText&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#setHtml(java.lang.String)&quot;&gt;&lt;tt&gt;setHtml&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#setData(java.lang.String, com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setUrls(java.util.List&lt;com.trolltech.qt.core.QUrl&gt; urls)" doc="/**
&lt;p&gt;Sets the URLs stored in the MIME data object to those specified by &lt;tt&gt;urls&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;URLs correspond to the MIME type &lt;tt&gt;text/uri-list&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#urls()&quot;&gt;&lt;tt&gt;urls&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasUrls()&quot;&gt;&lt;tt&gt;hasUrls&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#setData(java.lang.String, com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.String text()" doc="/**
&lt;p&gt;Returns a plain text (MIME type &lt;tt&gt;text/plain&lt;/tt&gt;) representation of the data.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#setText(java.lang.String)&quot;&gt;&lt;tt&gt;setText&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasText()&quot;&gt;&lt;tt&gt;hasText&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#html()&quot;&gt;&lt;tt&gt;html&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#data(java.lang.String)&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.util.List&lt;com.trolltech.qt.core.QUrl&gt; urls()" doc="/**
&lt;p&gt;Returns a list of URLs contained within the MIME data object.&lt;/p&gt;
&lt;p&gt;URLs correspond to the MIME type &lt;tt&gt;text/uri-list&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#setUrls(java.util.List&lt;com.trolltech.qt.core.QUrl&gt;)&quot;&gt;&lt;tt&gt;setUrls&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#hasUrls()&quot;&gt;&lt;tt&gt;hasUrls&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#data(java.lang.String)&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public java.util.List&lt;java.lang.String&gt; formats()" doc="/**
&lt;p&gt;Returns a list of formats supported by the object. This is a list of MIME types for which the object can return suitable data. The formats in the list are in a priority order.&lt;/p&gt;
&lt;p&gt;For the most common types of data, you can call the higher-level functions &lt;a href=&quot;QMimeData.html#hasText()&quot;&gt;&lt;tt&gt;hasText&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMimeData.html#hasHtml()&quot;&gt;&lt;tt&gt;hasHtml&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMimeData.html#hasUrls()&quot;&gt;&lt;tt&gt;hasUrls&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMimeData.html#hasImage()&quot;&gt;&lt;tt&gt;hasImage&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QMimeData.html#hasColor()&quot;&gt;&lt;tt&gt;hasColor&lt;/tt&gt;&lt;/a&gt; instead.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#hasFormat(java.lang.String)&quot;&gt;&lt;tt&gt;hasFormat&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#setData(java.lang.String, com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#data(java.lang.String)&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public boolean hasFormat(java.lang.String mimetype)" doc="/**
&lt;p&gt;Returns true if the object can return data for the MIME type specified by &lt;tt&gt;mimetype&lt;/tt&gt;; otherwise returns false.&lt;/p&gt;
&lt;p&gt;For the most common types of data, you can call the higher-level functions &lt;a href=&quot;QMimeData.html#hasText()&quot;&gt;&lt;tt&gt;hasText&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMimeData.html#hasHtml()&quot;&gt;&lt;tt&gt;hasHtml&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMimeData.html#hasUrls()&quot;&gt;&lt;tt&gt;hasUrls&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMimeData.html#hasImage()&quot;&gt;&lt;tt&gt;hasImage&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QMimeData.html#hasColor()&quot;&gt;&lt;tt&gt;hasColor&lt;/tt&gt;&lt;/a&gt; instead.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#formats()&quot;&gt;&lt;tt&gt;formats&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#setData(java.lang.String, com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMimeData.html#data(java.lang.String)&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected java.lang.Object retrieveData(java.lang.String mimetype, int preferredType)" doc="/**
&lt;p&gt;Returns a variant with the given &lt;tt&gt;preferredType&lt;/tt&gt; containing data for the MIME type specified by &lt;tt&gt;mimetype&lt;/tt&gt;. If the object does not support the MIME type or variant type given, a null variant is returned instead.&lt;/p&gt;
&lt;p&gt;This function is called by the general &lt;a href=&quot;QMimeData.html#data(java.lang.String)&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt; getter and by the convenience getters (&lt;a href=&quot;QMimeData.html#text()&quot;&gt;&lt;tt&gt;text&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMimeData.html#html()&quot;&gt;&lt;tt&gt;html&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMimeData.html#urls()&quot;&gt;&lt;tt&gt;urls&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMimeData.html#imageData()&quot;&gt;&lt;tt&gt;imageData&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QMimeData.html#colorData()&quot;&gt;&lt;tt&gt;colorData&lt;/tt&gt;&lt;/a&gt;). You can reimplement it if you want to store your data using a custom data structure (instead of a &lt;a href=&quot;%2E%2E/core/QByteArray.html&quot;&gt;&lt;tt&gt;QByteArray&lt;/tt&gt;&lt;/a&gt;, which is what &lt;a href=&quot;QMimeData.html#setData(java.lang.String, com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; provides). You would then also need to reimplement &lt;a href=&quot;QMimeData.html#hasFormat(java.lang.String)&quot;&gt;&lt;tt&gt;hasFormat&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QMimeData.html#formats()&quot;&gt;&lt;tt&gt;formats&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QMimeData.html#data(java.lang.String)&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt; */"/>
</class>
