QtGui/qmime.h Source File
Go to the documentation of this file.
56 virtual ~QMimeSource();
57 virtual const char*
format(
int n = 0)
const = 0;
58 virtual bool provides(
const char*)
const;
59 virtual QByteArray encodedData(
const char*)
const = 0;
66 typedef struct tagFORMATETC FORMATETC;
67 typedef struct tagSTGMEDIUM STGMEDIUM;
79 class Q_GUI_EXPORT QWindowsMime
83 virtual ~QWindowsMime();
86 virtual bool canConvertFromMime(
const FORMATETC &formatetc,
const QMimeData *mimeData)
const = 0;
87 virtual bool convertFromMime(
const FORMATETC &formatetc,
const QMimeData *mimeData, STGMEDIUM * pmedium)
const = 0;
91 virtual bool canConvertToMime(
const QString &mimeType, IDataObject *pDataObj)
const = 0;
93 virtual QString mimeForFormat(
const FORMATETC &formatetc)
const = 0;
95 static int registerMimeType(
const QString &mime);
98 friend class QClipboardWatcher;
99 friend class QDragManager;
100 friend class QDropData;
101 friend class QOleDataObject;
103 static QWindowsMime *converterToMime(
const QString &mimeType, IDataObject *pDataObj);
104 static QStringList allMimesForFormats(IDataObject *pDataObj);
105 static QWindowsMime *converterFromMime(
const FORMATETC &formatetc,
const QMimeData *mimeData);
110 #if defined(Q_WS_MAC)
118 class Q_GUI_EXPORT QMacMime {
121 enum QMacMimeType { MIME_DND=0x01, MIME_CLIP=0x02, MIME_QT_CONVERTOR=0x04, MIME_ALL=MIME_DND|MIME_CLIP };
122 explicit QMacMime(
char) { Q_UNUSED(type); }
123 virtual ~QMacMime() { }
125 static void initialize() { }
128 static QMacMime *convertor(QMacMimeType,
const QString &,
int) {
return 0; }
129 static QString flavorToMime(QMacMimeType,
int) {
return QString(); }
131 virtual QString convertorName()=0;
132 virtual int countFlavors()=0;
133 virtual int flavor(
int index)=0;
134 virtual bool canConvert(
const QString &mime,
int flav)=0;
135 virtual QString mimeFor(
int flav)=0;
136 virtual int flavorFor(
const QString &mime)=0;
141 class Q_GUI_EXPORT QMacPasteboardMime {
144 enum QMacPasteboardMimeType { MIME_DND=0x01,
146 MIME_QT_CONVERTOR=0x04,
147 MIME_QT3_CONVERTOR=0x08,
148 MIME_ALL=MIME_DND|MIME_CLIP
150 explicit QMacPasteboardMime(
char);
151 virtual ~QMacPasteboardMime();
153 static void initialize();
156 static QMacPasteboardMime *convertor(uchar,
const QString &mime,
QString flav);
159 virtual QString convertorName() = 0;
169 Q_GUI_EXPORT
void qRegisterDraggedTypes(
const QStringList &types);
GLuint GLuint GLsizei GLenum type
#define QT_END_INCLUDE_NAMESPACE
#define QT_BEGIN_NAMESPACE
GLsizei GLsizei GLenum GLenum const GLvoid * data
GLenum GLsizei GLenum format
#define QT_BEGIN_INCLUDE_NAMESPACE