org.kde.koala

Class KServiceType

public class KServiceType extends KSycocaEntry

A service type is the generic notion for a mimetype, a type of service instead of a type of file. For instance, KOfficeFilter is a service type. It is associated to services according to the user profile (kuserprofile.h). Service types are stored as desktop files in $KDEHOME/share/servicetypes.

See Also: KService

UNKNOWN: A service type is the generic notion for a mimetype, a type of service instead of a type of file.

Constructor Summary
protected KServiceType(Class dummy)
KServiceType(String _fullpath, String _name, String _icon, String _comment)
Constructor.
KServiceType(String _fullpath)
Construct a service type and take all informations from a config file.
KServiceType(KDesktopFile config)
Construct a service type and take all informations from a deskop file.
KServiceType(QDataStream _str, int offset)
The stream must already be positionned at the correct offset
Method Summary
Stringcomment()
Returns the descriptive comment associated, if any.
StringdesktopEntryPath()
Returns the relative path to the desktop entry file responsible for this servicetype.
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
Stringicon()
Returns the icon associated with this service type.
booleaninherits(String servTypeName)
Checks whether this service type is or inherits from servTypeName.
protected voidinit(KDesktopFile config)
Returns a list of all the supported servicetypes.
booleanisDerived()
Checks whether this service type inherits another one.
booleanisDisposed()
Has the wrapped C++ instance been deleted?
booleanisValid()
Checks whether the service type is valid.
voidload(QDataStream arg1)
Load ourselves from the data stream.
Stringname()
Returns the name of this service type.
StringparentServiceType()
If this service type inherits from another service type, return the name of the parent.
QVariantproperty(String _name)
Returns the requested property.
intpropertyDef(String _name)
Returns the type of the property with the given _name.
ArrayListpropertyDefNames()
ArrayListpropertyNames()
Returns the list of all properties of this service type.
voidsave(QDataStream arg1)
Save ourselves to the data stream.

Constructor Detail

KServiceType

protected KServiceType(Class dummy)

KServiceType

public KServiceType(String _fullpath, String _name, String _icon, String _comment)
Constructor. You may pass in arguments to create a servicetype with specific properties.

Parameters: _fullpath the path of the service type's desktop file _name the name of the service type _icon the icon name of the service type (can be null) _comment a comment (can be null)

UNKNOWN: Constructor.

KServiceType

public KServiceType(String _fullpath)
Construct a service type and take all informations from a config file.

Parameters: _fullpath path of the desktop file, set to "" if calling from a inherited constructor.

UNKNOWN: Construct a service type and take all informations from a config file.

KServiceType

public KServiceType(KDesktopFile config)
Construct a service type and take all informations from a deskop file.

Parameters: config the configuration file

UNKNOWN: Construct a service type and take all informations from a deskop file.

KServiceType

public KServiceType(QDataStream _str, int offset)
The stream must already be positionned at the correct offset

UNKNOWN:

Method Detail

comment

public String comment()
Returns the descriptive comment associated, if any.

Returns: the comment, or null

UNKNOWN: Returns the descriptive comment associated, if any.

desktopEntryPath

public String desktopEntryPath()
Returns the relative path to the desktop entry file responsible for this servicetype. For instance inode/directory.desktop, or kpart.desktop

Returns: the path of the desktop file

UNKNOWN: Returns the relative path to the desktop entry file responsible for this servicetype.

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

icon

public String icon()
Returns the icon associated with this service type. Some derived classes offer special functions which take for example an URL and returns a special icon for this URL. An example is KMimeType, KFolderType and others.

Returns: the name of the icon, can be null.

UNKNOWN: Returns the icon associated with this service type.

inherits

public boolean inherits(String servTypeName)
Checks whether this service type is or inherits from servTypeName.

Returns: true if this servicetype is or inherits from servTypeName

UNKNOWN: Checks whether this service type is or inherits from servTypeName.

init

protected void init(KDesktopFile config)
Returns a list of all the supported servicetypes. Useful for showing the list of available servicetypes in a listbox, for example. More memory consuming than the ones above, don't use unless really necessary.

Returns: the list of all services

UNKNOWN: Returns a list of all the supported servicetypes.

isDerived

public boolean isDerived()
Checks whether this service type inherits another one.

Returns: true if this service type inherits another one

See Also: KServiceType

UNKNOWN: Checks whether this service type inherits another one.

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

isValid

public boolean isValid()
Checks whether the service type is valid.

Returns: true if the service is valid (e.g. name is not empty)

UNKNOWN: Checks whether the service type is valid.

load

public void load(QDataStream arg1)
Load ourselves from the data stream.

UNKNOWN:

name

public String name()
Returns the name of this service type.

Returns: the name of the service type

UNKNOWN: Returns the name of this service type.

parentServiceType

public String parentServiceType()
If this service type inherits from another service type, return the name of the parent.

Returns: the parent service type, or String. null if not set

See Also: KServiceType

UNKNOWN: If this service type inherits from another service type, return the name of the parent.

property

public QVariant property(String _name)
Returns the requested property. Some often used properties have convenience access functions like name(), comment() etc.

Parameters: _name the name of the property

Returns: the property, or invalid if not found

UNKNOWN: Returns the requested property.

propertyDef

public int propertyDef(String _name)
Returns the type of the property with the given _name.

Parameters: _name the name of the property

Returns: the property type, or null if not found

UNKNOWN: Returns the type of the property with the given _name.

propertyDefNames

public ArrayList propertyDefNames()

propertyNames

public ArrayList propertyNames()
Returns the list of all properties of this service type.

Returns: the list of properties

UNKNOWN: Returns the list of all properties of this service type.

save

public void save(QDataStream arg1)
Save ourselves to the data stream.

UNKNOWN: