1 | // Copyright (C) 2018 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QINTERNALMIMEDATA_P_H |
5 | #define QINTERNALMIMEDATA_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists for the convenience |
12 | // of other Qt classes. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <QtCore/qbytearray.h> |
19 | #include <QtCore/qmimedata.h> |
20 | #include <QtCore/qstring.h> |
21 | #include <QtCore/qstringlist.h> |
22 | #include <QtCore/qvariant.h> |
23 | #include <QtGui/private/qtguiglobal_p.h> |
24 | |
25 | QT_BEGIN_NAMESPACE |
26 | |
27 | class QEventLoop; |
28 | class QMouseEvent; |
29 | class QPlatformDrag; |
30 | |
31 | class Q_GUI_EXPORT QInternalMimeData : public QMimeData |
32 | { |
33 | Q_OBJECT |
34 | public: |
35 | QInternalMimeData(); |
36 | ~QInternalMimeData(); |
37 | |
38 | bool hasFormat(const QString &mimeType) const override; |
39 | QStringList formats() const override; |
40 | static bool canReadData(const QString &mimeType); |
41 | |
42 | |
43 | static QStringList formatsHelper(const QMimeData *data); |
44 | static bool hasFormatHelper(const QString &mimeType, const QMimeData *data); |
45 | static QByteArray renderDataHelper(const QString &mimeType, const QMimeData *data); |
46 | |
47 | protected: |
48 | QVariant retrieveData(const QString &mimeType, QMetaType type) const override; |
49 | |
50 | virtual bool hasFormat_sys(const QString &mimeType) const = 0; |
51 | virtual QStringList formats_sys() const = 0; |
52 | virtual QVariant retrieveData_sys(const QString &mimeType, QMetaType type) const = 0; |
53 | }; |
54 | |
55 | QT_END_NAMESPACE |
56 | |
57 | #endif // QINTERNALMIMEDATA_P_H |
58 | |