class KServiceType

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

Definition#include <kservicetype.h>
InheritsKSycocaEntry
Inherited byKDEDesktopMimeType, KExecMimeType, KFolderType, KMimeType
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods

Protected Methods

Protected Members


Detailed Description

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)

 KServiceType ( const QString & _fullpath, const QString& _name, const QString& _icon, const QString& _comment)

Constructor. You may pass in arguments to create a servicetype with specific properties

 KServiceType ( const QString & _fullpath )

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

Parameters:
_fullpathset to "" if calling from a inherited constructor.

 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

QString  icon ()

[const virtual]

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, KFoldeType and others.

QString  comment ()

[const virtual]

Returns: the descriptive comment associated, if any.

QString  name ()

[const virtual]

Returns: the name of this service type.

Reimplemented from KSycocaEntry

QString  desktopEntryPath ()

[const]

Returns: the relative path to the desktop entry file responsible for this servicetype. For instance inode/directory.desktop, or kpart.desktop

void  save ( QDataStream& )

[virtual]

Save ourselves to the data stream.

Reimplemented from KSycocaEntry

void  load ( QDataStream& )

[virtual]

Load ourselves from the data stream.

Reimplemented from KSycocaEntry

Ptr  serviceType ( const QString& _name )

[static]

Returns: a pointer to the servicetype '_name' or 0L if the service type is unknown. VERY IMPORTANT : don't store the result in a KServiceType * !

KService::List  offers ( const QString& _servicetype )

[static]

Returns: all services supporting the given servicetype name This doesn't take care of the user profile. In fact it is used by the KServiceTypeProfile, which is the one you should use.

List  allServiceTypes ()

[static]

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.


Generated by: root@porky.devel.redhat.com on Wed May 10 08:56:52 2000, using kdoc 2.0a35.