|
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...
|
|
| QBuiltInMimes () |
|
| 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 1035 of file qmime_win.cpp.
◆ QBuiltInMimes()
QBuiltInMimes::QBuiltInMimes |
( |
| ) |
|
Definition at line 1055 of file qmime_win.cpp.
QMap< int, QString > inFormats
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
QWindowsMime()
Constructs a new conversion object, adding it to the globally accessed list of available converters...
QMap< int, QString > outFormats
static int registerMimeType(const QString &mime)
Registers the MIME type mime, and returns an ID number identifying the format on Windows.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key key and a value of value.
◆ canConvertFromMime()
bool QBuiltInMimes::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 1062 of file qmime_win.cpp.
Referenced by convertFromMime(), and QLastResortMimes::convertFromMime().
1065 return formatetc.tymed & TYMED_HGLOBAL
virtual QStringList formats() const
Returns a list of formats supported by the object.
QMap< int, QString > outFormats
const T value(const Key &key) const
Returns the value associated with the key key.
QBool contains(const QString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the list contains the string str; otherwise returns false.
bool contains(const Key &key) const
Returns true if the map contains an item with key key; otherwise returns false.
◆ canConvertToMime()
bool QBuiltInMimes::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 1125 of file qmime_win.cpp.
Referenced by convertToMime(), and QLastResortMimes::convertToMime().
const Key key(const T &value) const
Returns the first key with value value.
QMap< int, QString > inFormats
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
QList< Key > keys() const
Returns a list containing all the keys in the map in ascending order.
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 1070 of file qmime_win.cpp.
1080 const int s = html.
length();
1081 int maxsize = s + s/40 + 3;
1085 for (
int i=0; i < s; ++i) {
1094 if (ri+3 >= maxsize) {
1095 maxsize += maxsize/4;
1103 memcpy(r.data(), res.
unicode(), byteLength);
1105 r[byteLength+1] = 0;
1108 #ifndef QT_NO_DRAGANDDROP 1110 #endif //QT_NO_DRAGANDDROP 1112 return setData(data, pmedium);
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...
static int getCf(const FORMATETC &formatetc)
The QByteArray class provides an array of bytes.
int length() const
Returns the number of characters in this string.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
The QChar class provides a 16-bit Unicode character.
QMap< int, QString > outFormats
void truncate(int pos)
Truncates the string at the given position index.
const QChar * unicode() const
Returns a '\0'-terminated Unicode representation of the string.
static bool setData(const QByteArray &data, STGMEDIUM *pmedium)
const T value(const Key &key) const
Returns the value associated with the key key.
QString html() const
Returns a string if the data stored in the object is HTML (MIME type text/html); otherwise returns an...
static const char * data(const QByteArray &arr)
static QByteArray renderDataHelper(const QString &mimeType, const QMimeData *data)
void resize(int size)
Sets the size of the string to size characters.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
◆ 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 1131 of file qmime_win.cpp.
1138 qDebug(
"QBuiltInMimes::convertToMime()");
The QVariant class acts like a union for the most common Qt data types.
static QString fromWCharArray(const wchar_t *, int size=-1)
Returns a copy of the string, where the encoding of string depends on the size of wchar...
const Key key(const T &value) const
Returns the first key with value value.
char * data()
Returns a pointer to the data stored in the byte array.
QMap< int, QString > inFormats
The QByteArray class provides an array of bytes.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
Q_CORE_EXPORT void qDebug(const char *,...)
static const char * data(const QByteArray &arr)
bool canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const
Returns true if the converter can convert to the mimeType from the available formats in pDataObj...
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
static QByteArray getData(int cf, IDataObject *pDataObj)
◆ 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 1117 of file qmime_win.cpp.
virtual QStringList formats() const
Returns a list of formats supported by the object.
const Key key(const T &value) const
Returns the first key with value value.
The QVector class is a template class that provides a dynamic array.
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
static FORMATETC setCf(int cf)
QMap< int, QString > outFormats
QBool contains(const QString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the list contains the string str; otherwise returns false.
QList< Key > keys() const
Returns a list containing all the keys in the map in ascending order.
◆ 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 1151 of file qmime_win.cpp.
static int getCf(const FORMATETC &formatetc)
QMap< int, QString > inFormats
const T value(const Key &key) const
Returns the value associated with the key key.
◆ inFormats
◆ outFormats
The documentation for this class was generated from the following file: