Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:07:31

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