1 /****************************************************************************
2 **
3 ** DQt - D bindings for the Qt Toolkit
4 **
5 ** GNU Lesser General Public License Usage
6 ** This file may be used under the terms of the GNU Lesser
7 ** General Public License version 3 as published by the Free Software
8 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
9 ** packaging of this file. Please review the following information to
10 ** ensure the GNU Lesser General Public License version 3 requirements
11 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
12 **
13 ****************************************************************************/
14 module qt.core.mimedata;
15 extern(C++):
16 
17 import qt.config;
18 import qt.core.bytearray;
19 import qt.core.list;
20 import qt.core.object;
21 import qt.core.string;
22 import qt.core.stringlist;
23 import qt.core.url;
24 import qt.core.variant;
25 import qt.helpers;
26 
27 /+ class QUrl; +/
28 extern(C++, class) struct QMimeDataPrivate;
29 
30 class /+ Q_CORE_EXPORT +/ QMimeData : QObject
31 {
32     mixin(Q_OBJECT);
33 public:
34     this();
35     ~this();
36 
37     final QList!(QUrl) urls() const;
38     final void setUrls(ref const(QList!(QUrl)) urls);
39     final bool hasUrls() const;
40 
41     final QString text() const;
42     final void setText(ref const(QString) text);
43     final bool hasText() const;
44 
45     final QString html() const;
46     final void setHtml(ref const(QString) html);
47     final bool hasHtml() const;
48 
49     final QVariant imageData() const;
50     final void setImageData(ref const(QVariant) image);
51     final bool hasImage() const;
52 
53     final QVariant colorData() const;
54     final void setColorData(ref const(QVariant) color);
55     final bool hasColor() const;
56 
57     final QByteArray data(ref const(QString) mimetype) const;
58     final void setData(ref const(QString) mimetype, ref const(QByteArray) data);
59     final void removeFormat(ref const(QString) mimetype);
60 
61     /+ virtual +/ bool hasFormat(ref const(QString) mimetype) const;
62     /+ virtual +/ QStringList formats() const;
63 
64     final void clear();
65 protected:
66     /+ virtual +/ QVariant retrieveData(ref const(QString) mimetype,
67                                           QVariant.Type preferredType) const;
68 private:
69     /+ Q_DISABLE_COPY(QMimeData) +/
70     /+ Q_DECLARE_PRIVATE(QMimeData) +/
71 }
72