Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QWindowsMimeText Class Reference
+ Inheritance diagram for QWindowsMimeText:
+ Collaboration diagram for QWindowsMimeText:

Public Member Functions

bool canConvertToMime (const QString &mimeType, IDataObject *pDataObj) const override
 Returns true if the converter can convert to the mimeType from the available formats in pDataObj.
 
QVariant convertToMime (const QString &mime, LPDATAOBJECT pDataObj, QMetaType preferredType) const override
 
QString mimeForFormat (const FORMATETC &formatetc) const override
 Returns the mime type that will be created form the format specified in formatetc, or an empty string if this converter does not support formatetc.
 
bool canConvertFromMime (const FORMATETC &formatetc, const QMimeData *mimeData) const override
 Returns true if the converter can convert from the mimeData to the format specified in formatetc.
 
bool convertFromMime (const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM *pmedium) const override
 Convert the mimeData to the format specified in formatetc.
 
QList< FORMATETCformatsForMime (const QString &mimeType, const QMimeData *mimeData) const override
 Returns a QList of FORMATETC structures representing the different windows clipboard formats that can be provided for the mimeType from the mimeData.
 
- Public Member Functions inherited from QWindowsMimeConverter
 QWindowsMimeConverter ()
 Constructs a QWindowsMimeConverter instance.
 
virtual ~QWindowsMimeConverter ()
 Constructs a QWindowsMimeConverter instance.
 
virtual QVariant convertToMime (const QString &mimeType, IDataObject *pDataObj, QMetaType preferredType) const =0
 Returns a QVariant containing the converted data for mimeType from pDataObj.
 

Additional Inherited Members

- Static Public Member Functions inherited from QWindowsMimeConverter
static int registerMimeType (const QString &mimeType)
 Registers the MIME type mimeType, and returns an ID number identifying the format on Windows.
 

Detailed Description

Definition at line 336 of file qwindowsmimeregistry.cpp.

Member Function Documentation

◆ canConvertFromMime()

bool QWindowsMimeText::canConvertFromMime ( const FORMATETC & formatetc,
const QMimeData * mimeData ) const
overridevirtual

Returns true if the converter can convert from the mimeData to the format specified in formatetc.

All subclasses must reimplement this pure virtual function.

Implements QWindowsMimeConverter.

Definition at line 347 of file qwindowsmimeregistry.cpp.

References getCf(), QMimeData::hasText(), and mimeData.

Referenced by convertFromMime().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ canConvertToMime()

bool QWindowsMimeText::canConvertToMime ( const QString & mimeType,
IDataObject * pDataObj ) const
overridevirtual

Returns true if the converter can convert to the mimeType from the available formats in pDataObj.

All subclasses must reimplement this pure virtual function.

Implements QWindowsMimeConverter.

Definition at line 430 of file qwindowsmimeregistry.cpp.

References canGetData(), and mimeType.

Referenced by convertToMime().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convertFromMime()

bool QWindowsMimeText::convertFromMime ( const FORMATETC & formatetc,
const QMimeData * mimeData,
STGMEDIUM * pmedium ) const
overridevirtual

Convert the mimeData to the format specified in formatetc.

The converted data should then be placed in pmedium structure.

Return true if the conversion was successful.

All subclasses must reimplement this pure virtual function.

Implements QWindowsMimeConverter.

Definition at line 358 of file qwindowsmimeregistry.cpp.

References canConvertFromMime(), d, getCf(), i, j, QString::length(), mimeData, o, setData(), QByteArray::size(), str, QMimeData::text(), QString::toLocal8Bit(), and QString::unicode().

+ Here is the call graph for this function:

◆ convertToMime()

QVariant QWindowsMimeText::convertToMime ( const QString & mime,
LPDATAOBJECT pDataObj,
QMetaType preferredType ) const
override

Definition at line 457 of file qwindowsmimeregistry.cpp.

References canConvertToMime(), d, QString::fromLocal8Bit(), QString::fromWCharArray(), getData(), i, QMetaType::id(), j, mime, o, qCDebug, qstrlen(), QString::replace(), ret, str, and QString::toUtf8().

+ Here is the call graph for this function:

◆ formatsForMime()

QList< FORMATETC > QWindowsMimeText::formatsForMime ( const QString & mimeType,
const QMimeData * mimeData ) const
overridevirtual

Returns a QList of FORMATETC structures representing the different windows clipboard formats that can be provided for the mimeType from the mimeData.

All subclasses must reimplement this pure virtual function.

Implements QWindowsMimeConverter.

Definition at line 446 of file qwindowsmimeregistry.cpp.

References QMimeData::hasText(), mimeData, mimeType, and setCf().

+ Here is the call graph for this function:

◆ mimeForFormat()

QString QWindowsMimeText::mimeForFormat ( const FORMATETC & formatetc) const
overridevirtual

Returns the mime type that will be created form the format specified in formatetc, or an empty string if this converter does not support formatetc.

All subclasses must reimplement this pure virtual function.

Implements QWindowsMimeConverter.

Definition at line 437 of file qwindowsmimeregistry.cpp.

References getCf().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: