Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-02 09:17:12

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 // Qt-Security score:significant reason:header-decls-only
0004 
0005 #ifndef QMIMEDATA_H
0006 #define QMIMEDATA_H
0007 
0008 #include <QtCore/qvariant.h>
0009 #include <QtCore/qobject.h>
0010 
0011 QT_BEGIN_NAMESPACE
0012 
0013 class QUrl;
0014 class QMimeDataPrivate;
0015 
0016 class Q_CORE_EXPORT QMimeData : public QObject
0017 {
0018     Q_OBJECT
0019 public:
0020     QMimeData();
0021     ~QMimeData();
0022 
0023     QList<QUrl> urls() const;
0024     void setUrls(const QList<QUrl> &urls);
0025     bool hasUrls() const;
0026 
0027     QString text() const;
0028     void setText(const QString &text);
0029     bool hasText() const;
0030 
0031     QString html() const;
0032     void setHtml(const QString &html);
0033     bool hasHtml() const;
0034 
0035     QVariant imageData() const;
0036     void setImageData(const QVariant &image);
0037     bool hasImage() const;
0038 
0039     QVariant colorData() const;
0040     void setColorData(const QVariant &color);
0041     bool hasColor() const;
0042 
0043     QByteArray data(const QString &mimetype) const;
0044     void setData(const QString &mimetype, const QByteArray &data);
0045     void removeFormat(const QString &mimetype);
0046 
0047     virtual bool hasFormat(const QString &mimetype) const;
0048     virtual QStringList formats() const;
0049 
0050     void clear();
0051 
0052 protected:
0053     virtual QVariant retrieveData(const QString &mimetype, QMetaType preferredType) const;
0054 
0055 private:
0056     Q_DISABLE_COPY(QMimeData)
0057     Q_DECLARE_PRIVATE(QMimeData)
0058 };
0059 
0060 QT_END_NAMESPACE
0061 
0062 #endif // QMIMEDATA_H