Qt 4.8
Public Functions | List of all members
QMacPasteboardMimeTypeName Class Reference
Inheritance diagram for QMacPasteboardMimeTypeName:
QMacPasteboardMime

Public Functions

bool canConvert (const QString &mime, QString flav)
 Returns true if the convertor can convert (both ways) between mime and flav; otherwise returns false. More...
 
QList< QByteArrayconvertFromMime (const QString &mime, QVariant data, QString flav)
 Returns data converted from MIME type mime to Mac UTI flav. More...
 
QString convertorName ()
 Returns a name for the convertor. More...
 
QVariant convertToMime (const QString &mime, QList< QByteArray > data, QString flav)
 Returns data converted from Mac UTI flav to MIME type mime. More...
 
QString flavorFor (const QString &mime)
 Returns the Mac UTI used for MIME type mime, or 0 if this convertor does not support mime. More...
 
QString mimeFor (QString flav)
 Returns the MIME UTI used for Mac flavor flav, or 0 if this convertor does not support flav. More...
 
 QMacPasteboardMimeTypeName ()
 
 ~QMacPasteboardMimeTypeName ()
 
- Public Functions inherited from QMacPasteboardMime
 QMacPasteboardMime (char)
 Constructs a new conversion object of type t, adding it to the globally accessed list of available convertors. More...
 
virtual ~QMacPasteboardMime ()
 Destroys a conversion object, removing it from the global list of available convertors. More...
 

Additional Inherited Members

- Public Types inherited from QMacPasteboardMime
enum  QMacPasteboardMimeType {
  MIME_DND =0x01, MIME_CLIP =0x02, MIME_QT_CONVERTOR =0x04, MIME_QT3_CONVERTOR =0x08,
  MIME_ALL =MIME_DND|MIME_CLIP
}
 
- Static Public Functions inherited from QMacPasteboardMime
static QList< QMacPasteboardMime * > all (uchar)
 Returns a list of all currently defined QMacPasteboardMime objects of type t. More...
 
static QMacPasteboardMimeconvertor (uchar, const QString &mime, QString flav)
 Returns the most-recently created QMacPasteboardMime of type t that can convert between the mime and flav formats. More...
 
static QString flavorToMime (uchar, QString flav)
 Returns a MIME type of type t for flav, or 0 if none exists. More...
 
static void initialize ()
 This is an internal function. More...
 

Detailed Description

Definition at line 261 of file qmime_mac.cpp.

Constructors and Destructors

◆ QMacPasteboardMimeTypeName()

QMacPasteboardMimeTypeName::QMacPasteboardMimeTypeName ( )
inline

Definition at line 265 of file qmime_mac.cpp.

266  }
QMacPasteboardMime(char)
Constructs a new conversion object of type t, adding it to the globally accessed list of available co...
Definition: qmime_mac.cpp:180

◆ ~QMacPasteboardMimeTypeName()

QMacPasteboardMimeTypeName::~QMacPasteboardMimeTypeName ( )
inline

Definition at line 267 of file qmime_mac.cpp.

267  {
268  }

Functions

◆ canConvert()

bool QMacPasteboardMimeTypeName::canConvert ( const QString mime,
QString  flav 
)
virtual

Returns true if the convertor can convert (both ways) between mime and flav; otherwise returns false.

All subclasses must reimplement this pure virtual function.

Implements QMacPasteboardMime.

Definition at line 295 of file qmime_mac.cpp.

296 {
297  return false;
298 }

◆ convertFromMime()

QList< QByteArray > QMacPasteboardMimeTypeName::convertFromMime ( const QString mime,
QVariant  data,
QString  flav 
)
virtual

Returns data converted from MIME type mime to Mac UTI flav.

Note that Mac flavors must all be self-terminating. The return value may contain trailing data.

All subclasses must reimplement this pure virtual function.

Implements QMacPasteboardMime.

Definition at line 306 of file qmime_mac.cpp.

307 {
308  QList<QByteArray> ret;
309  ret.append(QString("x-qt-mime-type-name").toUtf8());
310  return ret;
311 }
The QString class provides a Unicode character string.
Definition: qstring.h:83
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507

◆ convertorName()

QString QMacPasteboardMimeTypeName::convertorName ( )
virtual

Returns a name for the convertor.

All subclasses must reimplement this pure virtual function.

Implements QMacPasteboardMime.

Definition at line 278 of file qmime_mac.cpp.

279 {
280  return QLatin1String("Qt-Mime-Type");
281 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString

◆ convertToMime()

QVariant QMacPasteboardMimeTypeName::convertToMime ( const QString mime,
QList< QByteArray data,
QString  flav 
)
virtual

Returns data converted from Mac UTI flav to MIME type mime.

Note that Mac flavors must all be self-terminating. The input data may contain trailing data.

All subclasses must reimplement this pure virtual function.

Implements QMacPasteboardMime.

Definition at line 300 of file qmime_mac.cpp.

301 {
302  QVariant ret;
303  return ret;
304 }
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92

◆ flavorFor()

QString QMacPasteboardMimeTypeName::flavorFor ( const QString mime)
virtual

Returns the Mac UTI used for MIME type mime, or 0 if this convertor does not support mime.

All subclasses must reimplement this pure virtual function.

Implements QMacPasteboardMime.

Definition at line 283 of file qmime_mac.cpp.

284 {
285  if(mime == QLatin1String("application/x-qt-mime-type-name"))
286  return QLatin1String("com.trolltech.qt.MimeTypeName");
287  return QString();
288 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
Definition: qstring.h:83

◆ mimeFor()

QString QMacPasteboardMimeTypeName::mimeFor ( QString  flav)
virtual

Returns the MIME UTI used for Mac flavor flav, or 0 if this convertor does not support flav.

All subclasses must reimplement this pure virtual function.

Implements QMacPasteboardMime.

Definition at line 290 of file qmime_mac.cpp.

291 {
292  return QString();
293 }
The QString class provides a Unicode character string.
Definition: qstring.h:83

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