class KServiceTypeProfile

# class KServiceTypeProfile | This class holds the offers for a service type (e. More...
Definition | `#include <kuserprofile.h>`
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- typedef QValueList OfferList

#### Public Methods

- ~KServiceTypeProfile ()
- int preference ( const QString& _service ) const
- bool allowAsDefault ( const QString& _service ) const
- OfferList offers () const

#### Public Static Methods

- static KService::Ptr preferredService ( const QString & serviceType, const QString & genericServiceType )
- static KServiceTypeProfile* serviceTypeProfile ( const QString& servicetype, const QString & genericServiceType = QString::null )
- static OfferList offers ( const QString& servicetype, const QString& genericServiceType = QString::null )
- static const QPtrList<KServiceTypeProfile>& serviceTypeProfiles ()
- static void clear ()
- static void setConfigurationMode ()
- static bool configurationMode ()

#### Protected Methods

- KServiceTypeProfile ( const QString& _servicetype, const QString& _genericServiceType = QString::null )
- void addService ( const QString& _service, int _preference = 1, bool _allow_as_default = TRUE )

## Detailed Description

This class holds the offers for a service type (e.g. in old terms "the bindings for a mimetype")

typedef QValueList<KServiceOffer> OfferList | ### OfferList

~KServiceTypeProfile () | ### ~KServiceTypeProfile

int preference ( const QString& _service ) | ### preference

[const]

Returns: the users preference of this special service or 0 if the service is unknown.

bool allowAsDefault ( const QString& _service ) | ### allowAsDefault

[const]

OfferList offers () | ### offers

[const]

KService::Ptr preferredService ( const QString & serviceType, const QString & genericServiceType ) | ### preferredService

[static]

preferredService(m,true) is equivalent to preferredService(m,"Application") preferredService(m,false) is equivalent to preferredService(m,QString::null) This call allows e.g. preferredService(m,"KParts/ReadOnlyPart").

Returns: the preferred service (convenience method) for _serviceType and _genericServiceType (Application, type of component, or empty).

KServiceTypeProfile* serviceTypeProfile ( const QString& servicetype, const QString & genericServiceType = QString::null ) | ### serviceTypeProfile

[static]

Returns: the profile for the requested service type.

OfferList offers ( const QString& servicetype, const QString& genericServiceType = QString::null ) | ### offers

[static]

If `genericServiceType` is specified a list is returned with the offers associated with the combination of the two service types. This is almost like an "foo in ServiceTypes" constraint in the Trader, but the difference is that to order the offers, we will look at entries specifically for those two service types. Typically, this is used for getting the list of embeddable components that can handle a given mimetype. In that case, `servicetype` is the mimetype and `genericServiceType` is "KParts/ReadOnlyPart".

Returns: the offers associated with a given servicetype, sorted by preference This is what KTrader uses to get the list of offers, before applying the constraints and preferences.

const QPtrList<KServiceTypeProfile>& serviceTypeProfiles () | ### serviceTypeProfiles

[static]

void clear () | ### clear

[static]

Clear all cached information

void setConfigurationMode () | ### setConfigurationMode

[static]

This method activates a special mode of KServiceTypeProfile, in which all/all and all/allfiles are excluded from the results of the queries. It is meant for the configuration module _only_. @internal.

bool configurationMode () | ### configurationMode

[static]

KServiceTypeProfile ( const QString& _servicetype, const QString& _genericServiceType = QString::null ) | ### KServiceTypeProfile

[protected]

Constructor is called when the user profile is read for the first time.

void addService ( const QString& _service, int _preference = 1, bool _allow_as_default = TRUE ) | ### addService

[protected]

Add a service to this profile.

Generated by: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:57 2003, using kdoc 2.0a54.