|
|
Represent a mime type, like "text/plain".
The starting point you need is often the static methods. See also KServiceType.
typedef KSharedPtr<KMimeType> |
typedef QValueList<Ptr> |
|
Constructor.
You may pass in arguments to create a mimetype with specific properties.
|
Construct a mimetype and take all information from a config file.
|
Construct a mimetype and take all information from a desktop file.
|
The stream must already be positionned at the correct offset
~ |
[virtual]
QString |
[const virtual]
Return the filename of the icon associated with the mimetype.
The arguments are unused, but provided so that KMimeType - derived classes can use them (e.g. KFolderType uses the URL to return one out of 2 icons)
Returns: The path to the icon associated with this MIME type.
Reimplemented from KServiceType.
QString |
[const virtual]
This function differs from the above only in that a KURL may be provided instead of a QString for convenience.
Reimplemented from KServiceType.
QPixmap |
[const virtual]
Use this function only if you don't have a special URL for which you search a pixmap.
This function is useful to find out, which icon is usually chosen for a certain mime type. Since no URL is passed, it is impossible to obey icon hints in desktop entries for example.
Parameters:
QPixmap |
[const virtual]
Find the pixmap for a given file of this mimetype.
Convenience method that uses icon(), but also locates and load the pixmap.
Parameters:
QPixmap |
[static]
Convenience method to find the pixmap for a URL
Call this one when you don't know the mimetype.
Parameters:
QString |
[static]
The same functionality as pixmapForURL, but this method returns the name of the icon to load. You'll have to use KIconLoader to load the pixmap for it. The advantage of this method is that you can store the result, and then use it later on for any kind of size.
QString |
[const]
Returns: The desriptive comment associated with the MIME type.
Reimplemented from KServiceType.
QString |
[const virtual]
The arguments are unused, but provided so that KMimeType derived classes can use them.
Returns: The descriptive comment associated with the MIME type, if any.
Reimplemented from KServiceType.
QString |
[const virtual]
This function differs from the above only in that a KURL may be provided instead of a QString for convenience.
Reimplemented from KServiceType.
const QStringList& |
[const]
Retrieve the list of patterns associated with the MIME Type.
void |
[virtual]
Load the mimetype from a stream.
Reimplemented from KServiceType.
void |
[virtual]
Save the mimetype to a stream.
Reimplemented from KServiceType.
QVariant |
[const virtual]
Reimplemented from KServiceType.
QStringList |
[const virtual]
Reimplemented from KServiceType.
Ptr |
[static]
Retrieve a pointer to the mime type _name
or a pointer to the default
mime type "application/octet-stream".
0L is never returned.
Very important: Don't store the result in a KMimeType * !
Ptr |
[static]
This function looks at mode_t first.
If that does not help it looks at the extension. This is find for FTP, FILE, TAR and friends, but is not for HTTP ( cgi scripts! ). You should use KRun instead, but this function returns immediately while KRun is async. If no extension matches, then KMimeMagic is used if the URL a local file or "application/octet-stream" is returned otherwise.
Parameters:
Returns: A pointer to the matching mimetype. 0L is never returned. Very Important: Don't store the result in a KMimeType * !
List |
[static]
Get all the mimetypes.
Useful for showing the list of available mimetypes. More memory consuming than the ones above, don't use unless really necessary.
const QString & |
[static]
Returns: name of the default mimetype Always application/octet-stream, but this method exists for performance purposes.
void |
[protected]
void |
[protected]
Reimplemented from KServiceType.
void |
[protected static]
Signal a missing mime type
void |
[protected static]
This function makes sure that the default mime type exists.
void |
[protected static]
This function makes sure that vital mime types are installed.
static bool |
[protected]
Returns true
if check for vital mime types has been done.
QStringList |
[protected]
static Ptr |
[protected]
Generated by: baudens@ke.mandrakesoft.com on Thu Oct 26 17:36:34 2000, using kdoc 2.0a40. |