KServiceTypeProfile Class Reference
KServiceTypeProfile represents the user's preferences for services of a service type. Represents the user's preferences for services of a service type. More...
#include <kuserprofile.h>
Collaboration diagram for KServiceTypeProfile:

Public Types | |
typedef QValueList< KServiceOffer > | OfferList |
Public Member Functions | |
int | preference (const QString &_service) const |
bool | allowAsDefault (const QString &_service) const |
OfferList | offers () const |
Static Public Member Functions | |
KService::Ptr | preferredService (const QString &serviceType, const QString &genericServiceType) |
KServiceTypeProfile * | serviceTypeProfile (const QString &servicetype, const QString &genericServiceType=QString::null) |
OfferList | offers (const QString &servicetype, const QString &genericServiceType=QString::null) |
const QPtrList< KServiceTypeProfile > & | serviceTypeProfiles () |
void | clear () |
void | setConfigurationMode () |
bool | configurationMode () |
Protected Member Functions | |
KServiceTypeProfile (const QString &serviceType, const QString &genericServiceType=QString::null) | |
void | addService (const QString &_service, int _preference=1, bool _allow_as_default=true) |
Detailed Description
KServiceTypeProfile represents the user's preferences for services of a service type. 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
KTrader
Definition at line 117 of file kuserprofile.h.
Constructor & Destructor Documentation
|
Constructor is called when the user profile is read for the first time.
Definition at line 189 of file kuserprofile.cpp. References KServiceTypeProfile(). Referenced by KServiceTypeProfile(). |
Member Function Documentation
|
Returns the users preference of the given service.
Definition at line 208 of file kuserprofile.cpp. References preference(). Referenced by preference(). |
|
Checks whether the given
Definition at line 217 of file kuserprofile.cpp. References allowAsDefault(). Referenced by allowAsDefault(). |
|
Returns the list of all service offers for the service types that are represented by this profile.
Definition at line 249 of file kuserprofile.cpp. References endl(), kdDebug(), and offers(). Referenced by offers(), and preferredService(). |
|
Returns the preferred service for
Definition at line 292 of file kuserprofile.cpp. References offers(), and preferredService(). Referenced by preferredService(). |
|
Returns the profile for the requested service type.
Definition at line 232 of file kuserprofile.cpp. References serviceTypeProfile(). Referenced by offers(), and serviceTypeProfile(). |
|
Returns the offers associated with a given servicetype, sorted by preference. This is what KTrader uses to get the list of offers, before applying the constraints and preferences.
If
Definition at line 105 of file kuserprofile.cpp. References endl(), kdDebug(), offers(), and serviceTypeProfile(). |
|
Returns a list of all KServiceTypeProfiles.
Definition at line 192 of file kuserprofile.h. |
|
Clear all cached information.
Definition at line 99 of file kuserprofile.cpp. |
|
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 205 of file kuserprofile.h. |
|
Add a service to this profile.
Definition at line 201 of file kuserprofile.cpp. References addService(). Referenced by addService(). |
The documentation for this class was generated from the following files: