Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QMimeType class provides MIME type information. More...
#include <QMimeType>
The QMimeType class provides MIME type information.
A QMimeType object is a light-weight value which provides MIME type information.
IconType describes the properties of the content an icon represents.
Constant | Value | Description |
---|---|---|
QMimeType::Default | 0 | The icon is displayed for content with no special properties. |
QMimeType::DrmValid | 1 | The icon is displayed for drm protected content with current valid rights. |
QMimeType::DrmInvalid | 2 | The icon is displayed for drm protected content with no current valid rights. |
Constructs a null QMimeType.
Constructs a QMimeType object. If the parameter ext_or_id is a MIME type, it is interpreted as a filename if all of the following conditions hold:
Otherwise, if it is interpreted as a file name, the file extension (ie, for /foo/bar.txt this will be .txt) is used to determine the MIME type. If it does not appear to be a registered file extension, or a valid file, then it is treated as an unknown MIME type.
Constructs a QMimeType from the type() of lnk.
Constructs a copy of the QMimeType other.
Adds an association to the system between a mimeType and an application, with icon and permission.
Returns the QContent of the default application associated with this MIME type, or an invalid QContent if none is associated.
See also QtopiaService::binding().
Returns a list of QContent objects of the applications associated with this MIME type, or an empty list if none is associated.
Returns a list of applications that have registered associations with the mimetype of the content object.
This is an overloaded member function, provided for convenience.
Returns a list of applications that have registered associations with the mimeType.
Returns the system marked default from the list of applications that have registered associations with the mimetype of the content object.
See also setDefaultApplicationFor().
This is an overloaded member function, provided for convenience.
Returns the system marked default from the list of applications that have registered associations with the mimeType.
Returns a description of the MIME Type. This is usually based on the application() associated with the type.
Returns the first extension associated with the MIME type.
Returns the list of file extensions associated with the MIME type.
Constructs a QMimeType from a file extension.
To note, do not include the period.
Constructs a QMimeType from a fileName.
Constructs a QMimeType from the mime type ID string mimeId.
This does not perform any validation of the mime type ID, if validation is required consider using the QMimeType() constructor instead.
Returns an iconType icon appropriate for the MIME type.
Returns the MIME type identifier. eg. image/jpeg
Returns true if the QMimeType is null.
Returns the permission type used by the associated application to open a file of this MIME type. If no application is associated or the application does not support DRM, then QDrmRights::Unrestricted is returned.
Returns the permissions used by the associated applications. Permissions are mapped one to one with the list returned by applications().
Removes an association from the system between a mimeType and an application.
Set the system marked default from the list of applications that have registered associations with the mimeType to the content object.
See also defaultApplicationFor().
Assigns the value of the QMimeType other to a mime type.
Compares the mime type with the QMimeType other and returns true if they are equal.
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |