org.kde.koala

Class KServiceTypeProfile

public class KServiceTypeProfile extends Object implements QtSupport

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. KTrader uses KServiceTypeProfile to sort its results, so usually you can just use KTrader to find the user's preferred service.

See Also: KService KServiceType KServiceOffer KTrader

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

Constructor Summary
protected KServiceTypeProfile(Class dummy)
KServiceTypeProfile(String serviceType, String genericServiceType)
Constructor is called when the user profile is read for the first time.
KServiceTypeProfile(String serviceType)
Method Summary
protected voidaddService(String _service, int _preference, boolean _allow_as_default)
Add a service to this profile.
protected voidaddService(String _service, int _preference)
protected voidaddService(String _service)
static voidclear()
Clear all cached information
static booleanconfigurationMode()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
static KServiceTypeProfileserviceTypeProfile(String servicetype, String genericServiceType)
Returns the profile for the requested service type.
static KServiceTypeProfileserviceTypeProfile(String servicetype)
static voidsetConfigurationMode()
This method activates a special mode of KServiceTypeProfile, in which all/all and all/allfiles are excluded from the results of the queries.

Constructor Detail

KServiceTypeProfile

protected KServiceTypeProfile(Class dummy)

KServiceTypeProfile

public KServiceTypeProfile(String serviceType, String genericServiceType)
Constructor is called when the user profile is read for the first time.

Parameters: serviceType the service type (e.g. a MIME type) genericServiceType the generic service type (e.g. "Application" or "KParts/ReadOnlyPart"). Can be null, then the "Application" generic type will be used

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

KServiceTypeProfile

public KServiceTypeProfile(String serviceType)

Method Detail

addService

protected void addService(String _service, int _preference, boolean _allow_as_default)
Add a service to this profile.

Parameters: _service the name of the service _preference the user's preference value, must be positive, bigger is better _allow_as_default true if the service should be used as default

UNKNOWN: Add a service to this profile.

addService

protected void addService(String _service, int _preference)

addService

protected void addService(String _service)

clear

public static void clear()
Clear all cached information

UNKNOWN: Clear all cached information

configurationMode

public static boolean configurationMode()

UNKNOWN:

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

serviceTypeProfile

public static KServiceTypeProfile serviceTypeProfile(String servicetype, String genericServiceType)
Returns the profile for the requested service type.

Parameters: servicetype the service type (e.g. a MIME type) genericServiceType the generic service type (e.g. "Application" or "KParts/ReadOnlyPart"). Can be null, then the "Application" generic type will be used

Returns: the KServiceTypeProfile with the given arguments, or 0 if not found

UNKNOWN: Returns the profile for the requested service type.

serviceTypeProfile

public static KServiceTypeProfile serviceTypeProfile(String servicetype)

setConfigurationMode

public static void 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_.

UNKNOWN: This method activates a special mode of KServiceTypeProfile, in which all/all and all/allfiles are excluded from the results of the queries.