Qt Mobility Reference Documentation

QOrganizerItemAttachment Class Reference

The QOrganizerItemAttachment class contains information about a file (or other attachment) which is related to a particular organizer item. More...

 #include <QOrganizerItemAttachment>

Inherits QOrganizerItemDetail.

Public Functions

QByteArray attachmentData () const
QString attachmentMimeType () const
QString description () const
void setAttachment ( const QByteArray & data, const QString & mimeType )
void setDescription ( const QString & description )

Static Public Members

const QLatin1Constant DefinitionName
const QLatin1Constant FieldAttachmentData
const QLatin1Constant FieldAttachmentMimeType
const QLatin1Constant FieldDescription

Detailed Description

The QOrganizerItemAttachment class contains information about a file (or other attachment) which is related to a particular organizer item.

This leaf-class has been part of the default schema since version 1.2 of the Qt Mobility project.

Member Function Documentation

QByteArray QOrganizerItemAttachment::attachmentData () const

Returns the data of the attachment, if it was specified. If the attachment detail stores a url of an attachment instead of a data blob attachment, this function will return a default-constructed byte array.

QString QOrganizerItemAttachment::attachmentMimeType () const

Returns the mime type of the attachment, if known. If the mime type of the attachment was not specified, this function will return an empty QString.

QString QOrganizerItemAttachment::description () const

Returns a string for a description associated with the attachment to an organizer item.

See also setDescription().

void QOrganizerItemAttachment::setAttachment ( const QByteArray & data, const QString & mimeType )

Sets the attachment value to be the given data, and specifies that the mime-type of the attachment is the given mimeType. If the given mimeType is empty, it specifies that the attachment is of an unknown mime type. Since the data value is a free-form blob, clients must specify mimeType in order to allow other clients to interpret the attachment correctly.

void QOrganizerItemAttachment::setDescription ( const QString & description )

Sets a description associated with the attachment to an organizer item to description.

See also description().

Member Variable Documentation

const QLatin1Constant QOrganizerItemAttachment::DefinitionName

The constant string which identifies the definition of details which contain information about arbitrary attachments.

const QLatin1Constant QOrganizerItemAttachment::FieldAttachmentData

The constant key for which the attachment data value is stored in details of the QOrganizerItemAttachment type. This data can be any arbitrary blob, which means that the client should also set the mime-type associated with the attachment if possible.

const QLatin1Constant QOrganizerItemAttachment::FieldAttachmentMimeType

The constant key for which the attachment mime-type value is stored in details of the QOrganizerItemAttachment type.

const QLatin1Constant QOrganizerItemAttachment::FieldDescription

The constant key for which the attachment description value is stored in details of the QOrganizerItemAttachment type.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.