Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qmacmimeregistry_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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 QMACMIMEREGISTRY_H
5#define QMACMIMEREGISTRY_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 purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18
19#include <QtGui/private/qtguiglobal_p.h>
20#include <QtGui/qutimimeconverter.h>
21
22#include <CoreFoundation/CoreFoundation.h>
23
24QT_BEGIN_NAMESPACE
25
26namespace QMacMimeRegistry {
27 Q_GUI_EXPORT void initializeMimeTypes();
28 Q_GUI_EXPORT void destroyMimeTypes();
29
30 Q_GUI_EXPORT void registerMimeConverter(QUtiMimeConverter *);
31 Q_GUI_EXPORT void unregisterMimeConverter(QUtiMimeConverter *);
32
34 Q_GUI_EXPORT QString flavorToMime(QUtiMimeConverter::HandlerScope scope, const QString &flav);
35
36 Q_GUI_EXPORT void registerDraggedTypes(const QStringList &types);
37 Q_GUI_EXPORT const QStringList& enabledDraggedTypes();
38};
39
40QT_END_NAMESPACE
41
42#endif // QMACMIMEREGISTRY_H
QList< QUtiMimeConverter * > MimeList
The QUtiMimeConverter class converts between a MIME type and a \l{https://developer....
virtual QString utiForMime(const QString &mime) const =0
Returns the Mac UTI used for MIME type mime, or an empty string if this converter does not support co...
bool canConvert(const QString &mime, const QString &uti) const
Returns true if the converter can convert (both ways) between mime and uti; otherwise returns false.
virtual QString mimeForUti(const QString &uti) const =0
Returns the MIME type used for Mac UTI uti, or an empty string if this converter does not support con...
virtual QList< QByteArray > convertFromMime(const QString &mime, const QVariant &data, const QString &uti) const =0
Returns data converted from MIME type mime to Mac UTI uti.
virtual QVariant convertToMime(const QString &mime, const QList< QByteArray > &data, const QString &uti) const =0
Returns data converted from Mac UTI uti to MIME type mime.
HandlerScope scope() const
virtual int count(const QMimeData *mimeData) const
Returns the item count for the given mimeData.
void unregisterMimeConverter(QUtiMimeConverter *macMime)
const QStringList & enabledDraggedTypes()
QList< QUtiMimeConverter * > all(QUtiMimeConverter::HandlerScope scope)
QString flavorToMime(QUtiMimeConverter::HandlerScope scope, const QString &uti)
void registerDraggedTypes(const QStringList &types)
void registerMimeConverter(QUtiMimeConverter *macMime)