|
bool | canConvertFromMime (const FORMATETC &formatetc, const QMimeData *mimeData) const |
| Returns true if the converter can convert from the mimeData to the format specified in formatetc. More...
|
|
bool | canConvertToMime (const QString &mimeType, IDataObject *pDataObj) const |
| Returns true if the converter can convert to the mimeType from the available formats in pDataObj. More...
|
|
bool | convertFromMime (const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM *pmedium) const |
| Convert the mimeData to the format specified in formatetc. More...
|
|
QVariant | convertToMime (const QString &mime, IDataObject *pDataObj, QVariant::Type preferredType) const |
| Returns a QVariant containing the converted data for mimeType from pDataObj. More...
|
|
QVector< FORMATETC > | formatsForMime (const QString &mimeType, const QMimeData *mimeData) const |
| Returns a QVector of FORMATETC structures representing the different windows clipboard formats that can be provided for the mimeType from the mimeData. More...
|
|
QString | mimeForFormat (const FORMATETC &formatetc) const |
| 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. More...
|
|
| QWindowsMimeImage () |
|
| QWindowsMime () |
| Constructs a new conversion object, adding it to the globally accessed list of available converters. More...
|
|
virtual | ~QWindowsMime () |
| Destroys a conversion object, removing it from the global list of available converters. More...
|
|
Definition at line 882 of file qmime_win.cpp.
◆ QWindowsMimeImage()
QWindowsMimeImage::QWindowsMimeImage |
( |
| ) |
|
◆ canConvertFromMime()
bool QWindowsMimeImage::canConvertFromMime |
( |
const FORMATETC & |
formatetc, |
|
|
const QMimeData * |
mimeData |
|
) |
| const |
|
virtual |
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 QWindowsMime.
Definition at line 934 of file qmime_win.cpp.
936 int cf =
getCf(formatetc);
static int getCf(const FORMATETC &formatetc)
bool isNull() const
Returns true if it is a null image, otherwise returns false.
bool hasAlphaChannel() const
Returns true if the image has a format that respects the alpha channel, otherwise returns false...
The QImage class provides a hardware-independent image representation that allows direct access to th...
QVariant imageData() const
Returns a QVariant storing a QImage if the object can return an image; otherwise returns a null varia...
bool hasImage() const
Returns true if the object can return an image; otherwise returns false.
T qvariant_cast(const QVariant &)
◆ canConvertToMime()
bool QWindowsMimeImage::canConvertToMime |
( |
const QString & |
mimeType, |
|
|
IDataObject * |
pDataObj |
|
) |
| const |
|
virtual |
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 QWindowsMime.
Definition at line 926 of file qmime_win.cpp.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
static bool canGetData(int cf, IDataObject *pDataObj)
◆ convertFromMime()
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 QWindowsMime.
Definition at line 950 of file qmime_win.cpp.
952 int cf =
getCf(formatetc);
bool qt_write_dib(QDataStream &, QImage)
static int getCf(const FORMATETC &formatetc)
static bool qt_write_dibv5(QDataStream &s, QImage image)
bool isNull() const
Returns true if it is a null image, otherwise returns false.
The QByteArray class provides an array of bytes.
Format format() const
Returns the format of the image.
static bool setData(const QByteArray &data, STGMEDIUM *pmedium)
The QImage class provides a hardware-independent image representation that allows direct access to th...
QVariant imageData() const
Returns a QVariant storing a QImage if the object can return an image; otherwise returns a null varia...
bool hasImage() const
Returns true if the object can return an image; otherwise returns false.
QImage convertToFormat(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) const Q_REQUIRED_RESULT
Returns a copy of the image in the given format.
T qvariant_cast(const QVariant &)
The QDataStream class provides serialization of binary data to a QIODevice.
◆ convertToMime()
Returns a QVariant containing the converted data for mimeType from pDataObj.
If possible the QVariant should be of the preferredType to avoid needless conversions.
All subclasses must reimplement this pure virtual function.
Implements QWindowsMime.
Definition at line 995 of file qmime_win.cpp.
The QVariant class acts like a union for the most common Qt data types.
The QByteArray class provides an array of bytes.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
bool hasOriginalDIBV5(IDataObject *pDataObj) const
bool qt_read_dib(QDataStream &, QImage &)
The QImage class provides a hardware-independent image representation that allows direct access to th...
static const char * data(const QByteArray &arr)
The QDataStream class provides serialization of binary data to a QIODevice.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
static QByteArray getData(int cf, IDataObject *pDataObj)
bool loadFromData(const uchar *buf, int len, const char *format=0)
Loads an image from the first len bytes of the given binary data.
static bool canGetData(int cf, IDataObject *pDataObj)
static bool qt_read_dibv5(QDataStream &s, QImage &image)
◆ formatsForMime()
Returns a QVector 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 QWindowsMime.
Definition at line 905 of file qmime_win.cpp.
913 formatetcs +=
setCf(CF_DIB);
bool isNull() const
Returns true if it is a null image, otherwise returns false.
bool hasAlphaChannel() const
Returns true if the image has a format that respects the alpha channel, otherwise returns false...
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QVector class is a template class that provides a dynamic array.
static FORMATETC setCf(int cf)
The QImage class provides a hardware-independent image representation that allows direct access to th...
QVariant imageData() const
Returns a QVariant storing a QImage if the object can return an image; otherwise returns a null varia...
bool hasImage() const
Returns true if the object can return an image; otherwise returns false.
T qvariant_cast(const QVariant &)
◆ hasOriginalDIBV5()
bool QWindowsMimeImage::hasOriginalDIBV5 |
( |
IDataObject * |
pDataObj | ) |
const |
|
private |
Definition at line 973 of file qmime_win.cpp.
975 bool isSynthesized =
true;
976 IEnumFORMATETC *pEnum =NULL;
977 HRESULT res = pDataObj->EnumFormatEtc(1, &pEnum);
978 if (res == S_OK && pEnum) {
980 while ((res = pEnum->Next(1, &fc, 0)) == S_OK) {
982 CoTaskMemFree(fc.ptd);
983 if (fc.cfFormat == CF_DIB)
986 isSynthesized =
false;
992 return !isSynthesized;
struct tagFORMATETC FORMATETC
◆ mimeForFormat()
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 QWindowsMime.
Definition at line 918 of file qmime_win.cpp.
920 int cf =
getCf(formatetc);
static int getCf(const FORMATETC &formatetc)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
◆ CF_PNG
UINT QWindowsMimeImage::CF_PNG |
|
private |
The documentation for this class was generated from the following file: