KServiceTypeProfile

KServiceTypeProfile Namespace Reference

Functions

void clearCache ()
 
KSERVICE_EXPORT void deleteServiceTypeProfile (const QString &serviceType)
 
KSERVICE_EXPORT bool hasProfile (const QString &serviceType)
 
KServiceOfferList sortServiceTypeOffers (const KServiceOfferList &list, const QString &servicetype)
 
KSERVICE_EXPORT void writeServiceTypeProfile (const QString &serviceType, const KService::List &services, const KService::List &disabledServices=KService::List())
 

Detailed Description

Returns the offers in the profile for the requested service type.

KServiceTypeProfile represents the user's preferences for services of a service type.

Parameters
listlist of offers (including initialPreference)
servicetypethe service type
Returns
the weighted and sorted offer list

used by KServiceTypeTrader

It consists of a list of services (service offers) for the service type that is sorted by the user's preference. KServiceTypeTrader uses KServiceTypeProfile to get results sorted according to the user's preference.

See also
KService
KServiceType
KServiceTypeTrader

Represents the user's preferences for services of a service type

Function Documentation

◆ clearCache()

void KServiceTypeProfile::clearCache ( )

Clear all cached information.

, for KServiceTypeFactory

Definition at line 94 of file kservicetypeprofile.cpp.

◆ deleteServiceTypeProfile()

void KServiceTypeProfile::deleteServiceTypeProfile ( const QString serviceType)

Delete the complete profile for a given servicetype, reverting to the default preference order (the one specified by InitialPreference in the .desktop files).

Do not use this for MIME types.

Parameters
serviceTypeThe name of the servicetype.

Definition at line 216 of file kservicetypeprofile.cpp.

◆ hasProfile()

bool KServiceTypeProfile::hasProfile ( const QString serviceType)

, for KServiceTypeTrader & unit test

Definition at line 166 of file kservicetypeprofile.cpp.

◆ writeServiceTypeProfile()

void KServiceTypeProfile::writeServiceTypeProfile ( const QString serviceType,
const KService::List services,
const KService::List disabledServices = KService::List() 
)

Write the complete profile for a given servicetype.

Do not use this for MIME types.

Parameters
serviceTypeThe name of the servicetype.
servicesOrdered list of services, from the preferred one to the least preferred one.
disabledServicesList of services which are normally associated with this serviceType, but which should be disabled, i.e. trader queries will not return them.
Deprecated:
since 5.66, unused.

Definition at line 172 of file kservicetypeprofile.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:54:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.