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 (kdecore) [public ]
Inherited byKDEDesktopMimeType, KExecMimeType, KFolderType, KMimeType
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

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)

typedef KSharedPtr<KServiceType> Ptr

Ptr

typedef QValueList List

List

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

KServiceType

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

 KServiceType ( const QString & _fullpath )

KServiceType

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

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

 KServiceType ( KDesktopFile *config)

KServiceType

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

 KServiceType ( QDataStream& _str, int offset )

KServiceType

The stream must already be positionned at the correct offset

 ~KServiceType ()

~KServiceType

[virtual]

QString  icon ()

icon

[const]

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.

QString  comment ()

comment

[const]

Returns: the descriptive comment associated, if any.

QString  name ()

name

[const]

Returns: the name of this service type.

Reimplemented from KSycocaEntry.

QString  desktopEntryPath ()

desktopEntryPath

[const]

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

bool  isDerived ()

isDerived

[const]

Returns: true if this service type inherits another one

QString  parentServiceType ()

parentServiceType

[const]

If this service type inherits from another service type, return the name of the parent. Otherwise QString::null.

QVariant  property ( const QString& _name )

property

[const virtual]

QStringList  propertyNames ()

propertyNames

[const virtual]

bool  isValid ()

isValid

[const]

Reimplemented from KSycocaEntry.

QVariant::Type  propertyDef ( const QString& _name )

propertyDef

[const virtual]

QStringList  propertyDefNames ()

propertyDefNames

[const virtual]

const QMap<QString,QVariant::Type>&  propertyDefs ()

propertyDefs

[const virtual]

void  save ( QDataStream& )

save

[virtual]

Save ourselves to the data stream.

Reimplemented from KSycocaEntry.

void  load ( QDataStream& )

load

[virtual]

Load ourselves from the data stream.

Reimplemented from KSycocaEntry.

Ptr  serviceType ( const QString& _name )

serviceType

[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 )

offers

[static]

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

List  allServiceTypes ()

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.

void  init ( KDesktopFile *config )

init

[protected]

QString m_strName

m_strName

[protected]

QString m_strIcon

m_strIcon

[protected]

QString m_strComment

m_strComment

[protected]

QMap<QString,QVariant> m_mapProps

m_mapProps

[protected]

QMap<QString,QVariant::Type> m_mapPropDefs

m_mapPropDefs

[protected]

bool m_bValid

m_bValid

[protected]

bool m_bDerived

m_bDerived

[protected]

void  virtual_hook ( int id, void* data )

virtual_hook

[protected virtual]

Reimplemented from KSycocaEntry.


Generated by: dfaure on faure on Tue Apr 16 08:49:48 2002, using kdoc 2.0a53.