KDECore
KServiceTypeProfile Namespace Reference
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:
-
list list of offers (including initialPreference) servicetype the service type
- Returns:
- the weighted and sorted offer list
- See also:
- KService
KServiceTypeTrader Represents the user's preferences for services of a service type
Functions | |
void | clearCache () |
bool | configurationMode () |
void | deleteServiceTypeProfile (const QString &serviceType) |
bool | hasProfile (const QString &serviceType) |
void | setConfigurationMode () |
KServiceOfferList | sortServiceTypeOffers (const KServiceOfferList &list, const QString &servicetype) |
void | writeServiceTypeProfile (const QString &serviceType, const KService::List &services, const KService::List &disabledServices=KService::List()) |
Function Documentation
void KServiceTypeProfile::clearCache | ( | ) |
bool KServiceTypeProfile::configurationMode | ( | ) |
Definition at line 223 of file kservicetypeprofile.cpp.
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 mimetypes.
- Parameters:
-
serviceType The name of the servicetype.
Definition at line 208 of file kservicetypeprofile.cpp.
Definition at line 162 of file kservicetypeprofile.cpp.
void KServiceTypeProfile::setConfigurationMode | ( | ) |
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_.
Definition at line 218 of file kservicetypeprofile.cpp.
KServiceOfferList KServiceTypeProfile::sortServiceTypeOffers | ( | const KServiceOfferList & | list, | |
const QString & | servicetype | |||
) |
Definition at line 111 of file kservicetypeprofile.cpp.
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 mimetypes.
- Parameters:
-
serviceType The name of the servicetype. services Ordered list of services, from the preferred one to the least preferred one. disabledServices List of services which are normally associated with this serviceType, but which should be disabled, i.e. trader queries will not return them.
Definition at line 168 of file kservicetypeprofile.cpp.