KServiceTypeProfile

KDE 4.5 PyKDE API Reference

- KDE's Python API

# KServiceTypeProfile Namespace Reference

`from PyKDE4.kdecore.KServiceTypeProfile import *`

## Detailed Description

KServiceTypeProfile represents the user's preferences for services of a service type. 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

See also:
  KServiceType

See also:
  KServiceTypeTrader

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

## Functions
| clearCache ()
bool | configurationMode ()
| deleteServiceTypeProfile (QString serviceType)
bool | hasProfile (QString serviceType)
| setConfigurationMode ()
| writeServiceTypeProfile (QString serviceType, [KSharedPtr] services, [KSharedPtr] disabledServices=KService.List())

## Function Documentation

clearCache | ( |  | ) |

Clear all cached information @internal, for KServiceTypeFactory

bool configurationMode | ( |  | ) |

Internal:

deleteServiceTypeProfile | ( | 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.

bool hasProfile | ( | QString | serviceType
| ) |  |  |

@internal, for KServiceTypeTrader

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_.

Internal:

writeServiceTypeProfile | ( | QString | serviceType,
|  | [KSharedPtr] | services,
|  | [KSharedPtr] | 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.