org.kde.koala
public class KMimeType extends KServiceType
See Also: KServiceType
UNKNOWN: Represent a mime type, like "text/plain", and the data that is associated with it.
Constructor Summary | |
---|---|
protected | KMimeType(Class dummy) |
KMimeType(String _fullpath, String _type, String _icon, String _comment, String[] _patterns)
Constructor.
| |
KMimeType(String _fullpath)
Construct a mimetype and take all information from a config file. | |
KMimeType(KDesktopFile config)
Construct a mimetype and take all information from a desktop file. | |
KMimeType(QDataStream _str, int offset)
The stream must already be positionned at the correct offset |
Method Summary | |
---|---|
protected static void | buildDefaultType()
This function makes sure that the default mime type exists. |
protected static void | checkEssentialMimeTypes()
This function makes sure that vital mime types are installed. |
String | comment()
Returns the descriptive comment associated with the MIME type. |
String | comment(String arg1, boolean arg2)
Returns the descriptive comment associated with the MIME type.
|
String | comment(KURL arg1, boolean arg2)
Returns the descriptive comment associated with the MIME type.
|
static String | defaultMimeType()
Returns the name of the default mimetype.
|
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
protected static void | errorMissingMimeType(String _type)
Signal a missing mime type. |
static String | favIconForURL(KURL url)
Return the "favicon" (see http://www.favicon.com) for the given url ,
if available. |
protected void | finalize() Deletes the wrapped C++ instance |
String | icon(String arg1, boolean arg2)
Return the filename of the icon associated with the mimetype.
|
String | icon(KURL arg1, boolean arg2)
Return the filename of the icon associated with the mimetype.
|
static String | iconForURL(KURL _url, long _mode)
The same functionality as pixmapForURL(), but this method returns the name
of the icon to load. |
static String | iconForURL(KURL _url) |
protected void | init(KDesktopFile arg1) |
boolean | is(String mimeTypeName)
Do not use name()=="somename" anymore, to check for a given mimetype.
|
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
void | load(QDataStream qs)
Load the mimetype from a stream. |
protected void | loadInternal(QDataStream arg1)
Determines the mimetype of file based on it's name and returns the
matching pattern if any. |
String | parentMimeType()
If this mimetype inherits from ("is also") another mimetype,
return the name of the parent.
|
ArrayList | patterns()
Retrieve the list of patterns associated with the MIME Type. |
protected int | patternsAccuracy() |
QPixmap | pixmap(int group, int force_size, int state, StringBuffer path)
Use this function only if you don't have a special URL
for which you search a pixmap.
|
QPixmap | pixmap(int group, int force_size, int state) |
QPixmap | pixmap(int group, int force_size) |
QPixmap | pixmap(int group) |
QPixmap | pixmap(KURL _url, int _group, int _force_size, int _state, StringBuffer _path)
Find the pixmap for a given file of this mimetype.
|
QPixmap | pixmap(KURL _url, int _group, int _force_size, int _state) |
QPixmap | pixmap(KURL _url, int _group, int _force_size) |
QPixmap | pixmap(KURL _url, int _group) |
static QPixmap | pixmapForURL(KURL _url, long _mode, int _group, int _force_size, int _state, StringBuffer _path)
Convenience method to find the pixmap for a URL.
|
static QPixmap | pixmapForURL(KURL _url, long _mode, int _group, int _force_size, int _state) |
static QPixmap | pixmapForURL(KURL _url, long _mode, int _group, int _force_size) |
static QPixmap | pixmapForURL(KURL _url, long _mode, int _group) |
static QPixmap | pixmapForURL(KURL _url, long _mode) |
static QPixmap | pixmapForURL(KURL _url) |
QVariant | property(String _name)
Returns the property with the given _name. |
ArrayList | propertyNames()
Retrieves a list of all properties associated with this
KMimeType. |
void | save(QDataStream qs)
Save the mimetype to a stream. |
Parameters: _fullpath the path to the configuration file (.desktop) _type the mime type itself _icon the name of the icon that represens the mime type _comment a comment describing the mime type _patterns a list of file globs that describes the names (or extensions) of the files with this mime type
UNKNOWN: Constructor.
Parameters: _fullpath the path to the configuration file (.desktop)
UNKNOWN: Construct a mimetype and take all information from a config file.
Parameters: config the desktop configuration file that describes the mime type
UNKNOWN: Construct a mimetype and take all information from a desktop file.
UNKNOWN:
UNKNOWN: This function makes sure that the default mime type exists.
UNKNOWN: This function makes sure that vital mime types are installed.
Returns: the descriptive comment associated with the MIME type
UNKNOWN: Returns the descriptive comment associated with the MIME type.
Returns: The descriptive comment associated with the MIME type, if any.
UNKNOWN: Returns the descriptive comment associated with the MIME type.
Returns: The descriptive comment associated with the MIME type, if any.
UNKNOWN: Returns the descriptive comment associated with the MIME type.
Returns: the name of the default mime type, always "application/octet-stream"
UNKNOWN: Returns the name of the default mimetype.
Parameters: _type the missinf mime type
UNKNOWN: Signal a missing mime type.
url
,
if available. Does NOT attempt to download the favicon, it only returns
one that is already available.
If unavailable, returns null.Parameters: url the URL of the favicon
Returns: the name of the favicon, or null
UNKNOWN: Return the "favicon" (see http://www.
Returns: The path to the icon associated with this MIME type.
UNKNOWN: Return the filename of the icon associated with the mimetype.
Returns: The path to the icon associated with this MIME type.
UNKNOWN: Return the filename of the icon associated with the mimetype.
Parameters: _url URL for the file _mode the mode of the file. The mode may modify the icon with overlays that show special properties of the icon. Use 0 for default
Returns: the name of the icon. The name of a default icon if there is no icon for the mime type
UNKNOWN: The same functionality as pixmapForURL(), but this method returns the name of the icon to load.
UNKNOWN: Do not use name()=="somename" anymore, to check for a given mimetype.
Parameters: qs the stream to load from
UNKNOWN: Load the mimetype from a stream.
UNKNOWN:
Returns: the parent mime type, or null if not set
UNKNOWN: If this mimetype inherits from ("is also") another mimetype, return the name of the parent.
Returns: a list of file globs that describe the file names (or, usually, the extensions) of files with this mime type
UNKNOWN: Retrieve the list of patterns associated with the MIME Type.
Parameters: group The icon group where the icon is going to be used. force_size Override globallly configured icon size.
Use 0 for the default size state The icon state, one of: KIcon
.DefaultState,
KIcon
.ActiveState or KIcon
.DisabledState. path Output parameter to get the full path. Seldom needed.
Ignored if 0
Returns: the pixmap of the mime type, can be a default icon if not found
UNKNOWN: Use this function only if you don't have a special URL for which you search a pixmap.
Parameters: _url URL for the file. _group The icon group where the icon is going to be used. _force_size Override globallly configured icon size. Use 0 for the default size _state The icon state, one of: KIcon.DefaultState, KIcon.ActiveState or KIcon.DisabledState. _path Output parameter to get the full path. Seldom needed. Ignored if 0
Returns: the pixmap of the URL, can be a default icon if not found
UNKNOWN: Find the pixmap for a given file of this mimetype.
Parameters: _url URL for the file. _mode the mode of the file. The mode may modify the icon with overlays that show special properties of the icon. Use 0 for default _group The icon group where the icon is going to be used. _force_size Override globally configured icon size. Use 0 for the default size _state The icon state, one of: KIcon.DefaultState, KIcon.ActiveState or KIcon.DisabledState. _path Output parameter to get the full path. Seldom needed. Ignored if 0
Returns: the pixmap of the URL, can be a default icon if not found
UNKNOWN: Convenience method to find the pixmap for a URL.
_name.
Parameters: _name the name of the property
Returns: the value of the property
See Also: KMimeType
UNKNOWN: Returns the property with the given _name.
Returns: a list of all property names
See Also: KMimeType
UNKNOWN: Retrieves a list of all properties associated with this KMimeType.
Parameters: qs the stream to save to
UNKNOWN: Save the mimetype to a stream.