org.kde.koala

Class KServiceOffer

public class KServiceOffer extends Object implements QtSupport

This class holds the user-specific preferences of a service (whether it can be a default offer or not, how big is the preference for this offer, ...). Basically it is a reference to a KService, a number that represents the user's preference (bigger is better) and a flag whether the KService can be used as default.

See Also: KService

UNKNOWN: Holds the user's preference of a service.

Constructor Summary
protected KServiceOffer(Class dummy)
KServiceOffer()
Create an invalid service offer.
KServiceOffer(KServiceOffer arg1)
Copy constructor.
Method Summary
booleanallowAsDefault()
Is it allowed to use this service for default actions (e.g.
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
booleanisValid()
Check whether the entry is valid.
booleanop_lt(KServiceOffer arg1)
A service is bigger that the other when it can be default (and the other is not) and its preference value it higher.
intpreference()
The bigger this number is, the better is this service.

Constructor Detail

KServiceOffer

protected KServiceOffer(Class dummy)

KServiceOffer

public KServiceOffer()
Create an invalid service offer.

UNKNOWN: Create an invalid service offer.

KServiceOffer

public KServiceOffer(KServiceOffer arg1)
Copy constructor. Shallow copy (the KService will not be copied).

UNKNOWN: Copy constructor.

Method Detail

allowAsDefault

public boolean allowAsDefault()
Is it allowed to use this service for default actions (e.g. Left Click in a file manager, or KRun in general).

Returns: true if the service is a allowed as default

UNKNOWN: Is it allowed to use this service for default actions (e.

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?

isValid

public boolean isValid()
Check whether the entry is valid. A service is valid if its preference value is positive.

Returns: true if the service offer is valid

UNKNOWN: Check whether the entry is valid.

op_lt

public boolean op_lt(KServiceOffer arg1)
A service is bigger that the other when it can be default (and the other is not) and its preference value it higher.

UNKNOWN: A service is bigger that the other when it can be default (and the other is not) and its preference value it higher.

preference

public int preference()
The bigger this number is, the better is this service.

Returns: the preference number (negative numbers will be returned by invalid service offers)

UNKNOWN: The bigger this number is, the better is this service.