\section{KService\-Offer Class Reference}
\label{classKServiceOffer}\index{KServiceOffer@{KServiceOffer}}
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, ...). Holds the user's preference of a service.  


{\tt \#include $<$kuserprofile.h$>$}

Collaboration diagram for KService\-Offer:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=80pt]{classKServiceOffer__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KService\-Offer} ()
\item 
{\bf KService\-Offer} (const {\bf KService\-Offer} \&)
\item 
{\bf KService\-Offer} ({\bf KService::Ptr} \_\-service, int \_\-pref, bool \_\-default)
\item 
bool {\bf operator$<$} (const {\bf KService\-Offer} \&) const 
\item 
bool {\bf allow\-As\-Default} () const 
\item 
int {\bf preference} () const 
\item 
{\bf KService::Ptr} {\bf service} () const 
\item 
bool {\bf is\-Valid} () const 
\end{CompactItemize}


\subsection{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, ...). Holds the user's preference of a service. 

Basically it is a reference to a {\bf KService}{\rm (p.\,\pageref{classKService})}, a number that represents the user's preference (bigger is better) and a flag whether the {\bf KService}{\rm (p.\,\pageref{classKService})} can be used as default.

\begin{Desc}
\item[See also:]{\bf KService}{\rm (p.\,\pageref{classKService})} \end{Desc}




Definition at line 40 of file kuserprofile.h.

\subsection{Constructor \& Destructor Documentation}
\index{KServiceOffer@{KService\-Offer}!KServiceOffer@{KServiceOffer}}
\index{KServiceOffer@{KServiceOffer}!KServiceOffer@{KService\-Offer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KService\-Offer::KService\-Offer ()}\label{classKServiceOffer_a0}


Create an invalid service offer. 



Definition at line 313 of file kuserprofile.cpp.\index{KServiceOffer@{KService\-Offer}!KServiceOffer@{KServiceOffer}}
\index{KServiceOffer@{KServiceOffer}!KServiceOffer@{KService\-Offer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KService\-Offer::KService\-Offer (const {\bf KService\-Offer} \&)}\label{classKServiceOffer_a1}


Copy constructor. 

Shallow copy (the {\bf KService}{\rm (p.\,\pageref{classKService})} will not be copied). 

Definition at line 318 of file kuserprofile.cpp.\index{KServiceOffer@{KService\-Offer}!KServiceOffer@{KServiceOffer}}
\index{KServiceOffer@{KServiceOffer}!KServiceOffer@{KService\-Offer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KService\-Offer::KService\-Offer ({\bf KService::Ptr} {\em \_\-service}, int {\em \_\-pref}, bool {\em \_\-default})}\label{classKServiceOffer_a2}


Creates a new KService\-Offer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-service}]a pointer to the {\bf KService}{\rm (p.\,\pageref{classKService})} \item[{\em \_\-pref}]the user's preference value, must be positive, bigger is better \item[{\em \_\-default}]true if the service should be used as default \end{description}
\end{Desc}


Definition at line 325 of file kuserprofile.cpp.

\subsection{Member Function Documentation}
\index{KServiceOffer@{KService\-Offer}!operator<@{operator$<$}}
\index{operator<@{operator$<$}!KServiceOffer@{KService\-Offer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService\-Offer::operator$<$ (const {\bf KService\-Offer} \&) const}\label{classKServiceOffer_a3}


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 333 of file kuserprofile.cpp.\index{KServiceOffer@{KService\-Offer}!allowAsDefault@{allowAsDefault}}
\index{allowAsDefault@{allowAsDefault}!KServiceOffer@{KService\-Offer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService\-Offer::allow\-As\-Default () const\hspace{0.3cm}{\tt  [inline]}}\label{classKServiceOffer_a4}


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

Left Click in a file manager, or {\bf KRun}{\rm (p.\,\pageref{classKRun})} in general). \begin{Desc}
\item[Returns:]true if the service is a allowed as default \end{Desc}


Definition at line 75 of file kuserprofile.h.\index{KServiceOffer@{KService\-Offer}!preference@{preference}}
\index{preference@{preference}!KServiceOffer@{KService\-Offer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KService\-Offer::preference () const\hspace{0.3cm}{\tt  [inline]}}\label{classKServiceOffer_a5}


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

\begin{Desc}
\item[Returns:]the preference number (negative numbers will be returned by invalid service offers) \end{Desc}


Definition at line 81 of file kuserprofile.h.\index{KServiceOffer@{KService\-Offer}!service@{service}}
\index{service@{service}!KServiceOffer@{KService\-Offer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService::Ptr} KService\-Offer::service () const\hspace{0.3cm}{\tt  [inline]}}\label{classKServiceOffer_a6}


The service which this offer is about. 

\begin{Desc}
\item[Returns:]the service this offer is about, can be 0 in valid offers or when not set \end{Desc}


Definition at line 87 of file kuserprofile.h.\index{KServiceOffer@{KService\-Offer}!isValid@{isValid}}
\index{isValid@{isValid}!KServiceOffer@{KService\-Offer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService\-Offer::is\-Valid () const\hspace{0.3cm}{\tt  [inline]}}\label{classKServiceOffer_a7}


Check whether the entry is valid. 

A service is valid if its preference value is positive. \begin{Desc}
\item[Returns:]true if the service offer is valid \end{Desc}


Definition at line 93 of file kuserprofile.h.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kuserprofile.h\item 
kuserprofile.cpp\end{CompactItemize}
