• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

Public Member Functions | List of all members
KServiceOffer Class Reference

#include <kuserprofile.h>

Public Member Functions

 KServiceOffer ()
 
 KServiceOffer (const KServiceOffer &)
 
 KServiceOffer (KService::Ptr _service, int _pref, bool _default)
 
bool operator< (const KServiceOffer &) const
 
bool allowAsDefault () const
 
int preference () const
 
KService::Ptr service () const
 
bool isValid () const
 

Detailed Description

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 Holds the user's preference of a service.

Definition at line 40 of file kuserprofile.h.

Constructor & Destructor Documentation

KServiceOffer::KServiceOffer ( )

Create an invalid service offer.

Definition at line 324 of file kuserprofile.cpp.

KServiceOffer::KServiceOffer ( const KServiceOffer &  _o)

Copy constructor.

Shallow copy (the KService will not be copied).

Definition at line 329 of file kuserprofile.cpp.

KServiceOffer::KServiceOffer ( KService::Ptr  _service,
int  _pref,
bool  _default 
)

Creates a new KServiceOffer.

Parameters
_servicea pointer to the KService
_prefthe user's preference value, must be positive, bigger is better
_defaulttrue if the service should be used as default

Definition at line 336 of file kuserprofile.cpp.

Member Function Documentation

bool KServiceOffer::allowAsDefault ( ) const
inline

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

Definition at line 75 of file kuserprofile.h.

bool KServiceOffer::isValid ( ) const
inline

Check whether the entry is valid.

A service is valid if its preference value is positive.

Returns
true if the service offer is valid

Definition at line 93 of file kuserprofile.h.

bool KServiceOffer::operator< ( const KServiceOffer &  _o) const

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

Definition at line 344 of file kuserprofile.cpp.

int KServiceOffer::preference ( ) const
inline

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

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

Definition at line 81 of file kuserprofile.h.

KService::Ptr KServiceOffer::service ( ) const
inline

The service which this offer is about.

Returns
the service this offer is about, can be 0 in valid offers or when not set

Definition at line 87 of file kuserprofile.h.


The documentation for this class was generated from the following files:
  • kuserprofile.h
  • kuserprofile.cpp

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.8.8
This website is maintained by Timothy Pearson.