\section{KService Class Reference}
\label{classKService}\index{KService@{KService}}
Represent a service, i.e.  


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

Inheritance diagram for KService:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=57pt]{classKService__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KService:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=283pt]{classKService__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
typedef {\bf KShared\-Ptr}$<$ {\bf KService} $>$ {\bf Ptr}\label{classKService_w0}

\item 
typedef {\bf QValue\-List}$<$ {\bf Ptr} $>$ {\bf List}\label{classKService_w1}

\item 
enum {\bf DCOPService\-Type\_\-t} \{ {\bf DCOP\_\-None} =  0, 
{\bf DCOP\_\-Unique}, 
{\bf DCOP\_\-Multi}, 
{\bf DCOP\_\-Wait}
 \}
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KService} (const {\bf QString} \&\_\-name, const {\bf QString} \&\_\-exec, const {\bf QString} \&\_\-icon)
\item 
{\bf KService} (const {\bf QString} \&\_\-fullpath)
\item 
{\bf KService} ({\bf KDesktop\-File} $\ast$config)
\item 
{\bf KService} ({\bf QData\-Stream} \&\_\-str, int {\bf offset})\label{classKService_a3}

\item 
virtual {\bf QString} {\bf type} () const 
\item 
virtual {\bf QString} {\bf name} () const 
\item 
{\bf QString} {\bf exec} () const 
\item 
{\bf QString} {\bf library} () const 
\item 
{\bf QString} {\bf init} () const 
\item 
{\bf QString} {\bf icon} () const 
\item 
{\bf QPixmap} {\bf pixmap} ({\bf KIcon::Group} \_\-group, int \_\-force\_\-size=0, int \_\-state=0, {\bf QString} $\ast$\_\-path=0L) const 
\item 
bool {\bf terminal} () const 
\item 
{\bf QString} {\bf terminal\-Options} () const 
\item 
bool {\bf substitute\-Uid} () const 
\item 
{\bf QString} {\bf username} () const 
\item 
{\bf QString} {\bf desktop\-Entry\-Path} () const 
\item 
{\bf QString} {\bf desktop\-Entry\-Name} () const 
\item 
{\bf QString} {\bf menu\-Id} () const 
\item 
{\bf QString} {\bf storage\-Id} () const 
\item 
{\bf DCOPService\-Type\_\-t} {\bf DCOPService\-Type} () const 
\item 
{\bf QString} {\bf path} () const 
\item 
{\bf QString} {\bf comment} () const 
\item 
{\bf QString} {\bf generic\-Name} () const 
\item 
{\bf QString} {\bf untranslated\-Generic\-Name} () const 
\item 
{\bf QString\-List} {\bf keywords} () const 
\item 
{\bf QString\-List} {\bf categories} () const 
\item 
{\bf QString\-List} {\bf service\-Types} () const 
\item 
bool {\bf has\-Service\-Type} (const {\bf QString} \&\_\-service) const 
\item 
bool {\bf allow\-As\-Default} () const 
\item 
bool {\bf allow\-Multiple\-Files} () const 
\item 
int {\bf initial\-Preference} () const 
\item 
int {\bf initial\-Preference\-For\-Mime\-Type} (const {\bf QString} \&mime\-Type) const 
\item 
void {\bf set\-Initial\-Preference} (int i)\label{classKService_a33}

\item 
bool {\bf no\-Display} () const 
\item 
{\bf QString} {\bf parent\-App} () const 
\item 
virtual {\bf QVariant} {\bf property} (const {\bf QString} \&\_\-name) const 
\item 
{\bf QVariant} {\bf property} (const {\bf QString} \&\_\-name, QVariant::Type t) const 
\item 
virtual {\bf QString\-List} {\bf property\-Names} () const 
\item 
bool {\bf is\-Valid} () const 
\item 
{\bf QString} {\bf locate\-Local} ()
\item 
virtual void {\bf load} ({\bf QData\-Stream} \&)\label{classKService_a41}

\item 
virtual void {\bf save} ({\bf QData\-Stream} \&)\label{classKService_a42}

\item 
void {\bf set\-Menu\-Id} (const {\bf QString} \&menu\-Id)\label{classKService_a43}

\item 
void {\bf set\-Terminal} (bool b)\label{classKService_a44}

\item 
void {\bf set\-Terminal\-Options} (const {\bf QString} \&options)\label{classKService_a45}

\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf Ptr} {\bf service\-By\-Name} (const {\bf QString} \&\_\-name)
\item 
static {\bf Ptr} {\bf service\-By\-Desktop\-Path} (const {\bf QString} \&\_\-path)
\item 
static {\bf Ptr} {\bf service\-By\-Desktop\-Name} (const {\bf QString} \&\_\-name)
\item 
static {\bf Ptr} {\bf service\-By\-Menu\-Id} (const {\bf QString} \&\_\-menu\-Id)
\item 
static {\bf Ptr} {\bf service\-By\-Storage\-Id} (const {\bf QString} \&\_\-storage\-Id)
\item 
static {\bf List} {\bf all\-Services} ()
\item 
static {\bf List} {\bf all\-Init\-Services} ()
\item 
static {\bf QString} {\bf new\-Service\-Path} (bool show\-In\-Menu, const {\bf QString} \&suggested\-Name, {\bf QString} $\ast$menu\-Id=0, const {\bf QString\-List} $\ast$reserved\-Menu\-Ids=0)
\item 
static void {\bf rebuild\-KSycoca} ({\bf QWidget} $\ast$parent)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf init} ({\bf KDesktop\-File} $\ast$config)\label{classKService_b0}

\item 
{\bf QString\-List} \& {\bf access\-Service\-Types} ()\label{classKService_b1}

\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKService_b2}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KBuild\-Sycoca}\label{classKService_n0}

\end{CompactItemize}


\subsection{Detailed Description}
Represent a service, i.e. 

an application bound to one or several mimetypes (or servicetypes) as written in its desktop entry file.

A service may be a library, too. The starting point you need is often the static methods. Service types are stored as desktop files in the \char`\"{}service\char`\"{} resource..

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

{\bf KService\-Group}{\rm (p.\,\pageref{classKServiceGroup})} \end{Desc}
\begin{Desc}
\item[Author:]Torben Weis $<${\tt weis@kde.org}$>$ \end{Desc}




Definition at line 48 of file kservice.h.

\subsection{Member Enumeration Documentation}
\index{KService@{KService}!DCOPServiceType_t@{DCOPServiceType\_\-t}}
\index{DCOPServiceType_t@{DCOPServiceType\_\-t}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KService::DCOPService\-Type\_\-t}}\label{classKService_w6}


Describes the DCOP type of the service. 

\begin{itemize}
\item None - This service has no DCOP support \item Unique - This service provides a unique DCOP service. The service name is equal to the desktop\-Entry\-Name. \item Multi - This service provides a DCOP service which can be run with multiple instances in parallel. The service name of an instance is equal to the desktop\-Entry\-Name + \char`\"{}-\char`\"{} + the PID of the process. \item Wait - This service has no DCOP support, the launcher will wait till it is finished. \end{itemize}


Definition at line 213 of file kservice.h.

\subsection{Constructor \& Destructor Documentation}
\index{KService@{KService}!KService@{KService}}
\index{KService@{KService}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KService::KService (const {\bf QString} \& {\em \_\-name}, const {\bf QString} \& {\em \_\-exec}, const {\bf QString} \& {\em \_\-icon})}\label{classKService_a0}


Construct a temporary service with a given name, exec-line and icon. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-name}]the name of the service \item[{\em \_\-exec}]the executable \item[{\em \_\-icon}]the name of the icon \end{description}
\end{Desc}


Definition at line 63 of file kservice.cpp.

Referenced by service\-By\-Storage\-Id().\index{KService@{KService}!KService@{KService}}
\index{KService@{KService}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KService::KService (const {\bf QString} \& {\em \_\-fullpath})\hspace{0.3cm}{\tt  [explicit]}}\label{classKService_a1}


Construct a service and take all information from a config file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-fullpath}]Full path to the config file. \end{description}
\end{Desc}


Definition at line 79 of file kservice.cpp.

References init().\index{KService@{KService}!KService@{KService}}
\index{KService@{KService}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KService::KService ({\bf KDesktop\-File} $\ast$ {\em config})}\label{classKService_a2}


Construct a service and take all information from a desktop file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em config}]the desktop file to read \end{description}
\end{Desc}


Definition at line 87 of file kservice.cpp.

References init().

\subsection{Member Function Documentation}
\index{KService@{KService}!type@{type}}
\index{type@{type}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf QString} KService::type () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKService_a5}


Returns the type of the service. 

\begin{Desc}
\item[Returns:]the type of the service (\char`\"{}Application\char`\"{} or \char`\"{}Service\char`\"{}) \end{Desc}


Definition at line 92 of file kservice.h.\index{KService@{KService}!name@{name}}
\index{name@{name}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf QString} KService::name () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKService_a6}


Returns the name of the service. 

\begin{Desc}
\item[Returns:]the name of the service, or QString::null if not set \end{Desc}


Implements {\bf KSycoca\-Entry}.

Definition at line 98 of file kservice.h.\index{KService@{KService}!exec@{exec}}
\index{exec@{exec}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::exec () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a7}


Returns the executable. 

\begin{Desc}
\item[Returns:]the command that the service executes, or QString::null if not set \end{Desc}


Definition at line 104 of file kservice.h.\index{KService@{KService}!library@{library}}
\index{library@{library}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::library () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a8}


Returns the name of the service's library. 

\begin{Desc}
\item[Returns:]the name of the library that contains the services implementation, or QString::null if not set \end{Desc}


Definition at line 111 of file kservice.h.\index{KService@{KService}!init@{init}}
\index{init@{init}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::init () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a9}


Returns the name of the init function to call (KControl modules). 

\begin{Desc}
\item[Returns:]the name of the init function to call in this service during startup of {\bf KDE}. (KControl modules only), or QString::null if not set \end{Desc}


Definition at line 118 of file kservice.h.

Referenced by KService().\index{KService@{KService}!icon@{icon}}
\index{icon@{icon}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::icon () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a10}


Returns the name of the icon. 

\begin{Desc}
\item[Returns:]the icon associated with the service, or QString::null if not set \end{Desc}


Definition at line 125 of file kservice.h.\index{KService@{KService}!pixmap@{pixmap}}
\index{pixmap@{pixmap}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPixmap} KService::pixmap ({\bf KIcon::Group} {\em \_\-group}, int {\em \_\-force\_\-size} = {\tt 0}, int {\em \_\-state} = {\tt 0}, {\bf QString} $\ast$ {\em \_\-path} = {\tt 0L}) const}\label{classKService_a11}


Returns the pixmap that represents the icon. 

\begin{Desc}
\item[Returns:]a pixmap for this service (finds and loads {\bf icon()}{\rm (p.\,\pageref{classKService_a10})}), null if not set \end{Desc}
\begin{Desc}
\item[See also:]{\bf icon()}{\rm (p.\,\pageref{classKService_a10})} \end{Desc}


Definition at line 274 of file kservice.cpp.

References KIcon\-Loader::add\-Extra\-Desktop\-Themes(), KIcon\-Loader::extra\-Desktop\-Themes\-Added(), KGlobal::icon\-Loader(), QPixmap::is\-Null(), KIcon\-Loader::load\-Icon(), and pixmap().

Referenced by pixmap().\index{KService@{KService}!terminal@{terminal}}
\index{terminal@{terminal}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService::terminal () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a12}


Checks whethe the service should be run in a terminal. 

\begin{Desc}
\item[Returns:]true if the service is to be run in a terminal. \end{Desc}


Definition at line 138 of file kservice.h.\index{KService@{KService}!terminalOptions@{terminalOptions}}
\index{terminalOptions@{terminalOptions}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::terminal\-Options () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a13}


Returns any options associated with the terminal the service runs in, if it requires a terminal. 

The service must be a tty-oriented program. \begin{Desc}
\item[Returns:]the terminal options, or QString::null if not set \end{Desc}


Definition at line 147 of file kservice.h.\index{KService@{KService}!substituteUid@{substituteUid}}
\index{substituteUid@{substituteUid}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService::substitute\-Uid () const}\label{classKService_a14}


Checks whether the service runs with a different user id. 

\begin{Desc}
\item[Returns:]true if the service has to be run under a different uid. \end{Desc}
\begin{Desc}
\item[See also:]{\bf username()}{\rm (p.\,\pageref{classKService_a15})} \end{Desc}


Definition at line 666 of file kservice.cpp.

References QVariant::is\-Valid(), property(), and QVariant::to\-Bool().\index{KService@{KService}!username@{username}}
\index{username@{username}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::username () const}\label{classKService_a15}


Returns the user name, if the service runs with a different user id. 

\begin{Desc}
\item[Returns:]the username under which the service has to be run, or QString::null if not set \end{Desc}
\begin{Desc}
\item[See also:]substutute\-Uid()a \end{Desc}


Definition at line 671 of file kservice.cpp.

References QString::is\-Empty(), QVariant::is\-Valid(), property(), and QVariant::to\-String().\index{KService@{KService}!desktopEntryPath@{desktopEntryPath}}
\index{desktopEntryPath@{desktopEntryPath}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::desktop\-Entry\-Path () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a16}


Returns the path to the location where the service desktop entry is stored. 

This is a relative path if the desktop entry was found in any of the locations pointed to by \$KDEDIRS (e.g. \char`\"{}Internet/kppp.desktop\char`\"{}) It is a full path if the desktop entry originates from another location. \begin{Desc}
\item[Returns:]the path of the service's desktop file, or QString::null if not set \end{Desc}


Definition at line 174 of file kservice.h.

References KSycoca\-Entry::entry\-Path().

Referenced by locate\-Local().\index{KService@{KService}!desktopEntryName@{desktopEntryName}}
\index{desktopEntryName@{desktopEntryName}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::desktop\-Entry\-Name () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a17}


Returns the filename of the service desktop entry without any extension. 

E.g. \char`\"{}kppp\char`\"{} \begin{Desc}
\item[Returns:]the name of the desktop entry without path or extension, or QString::null if not set \end{Desc}


Definition at line 182 of file kservice.h.\index{KService@{KService}!menuId@{menuId}}
\index{menuId@{menuId}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::menu\-Id () const}\label{classKService_a18}


Returns the menu ID of the service desktop entry. 

The menu ID is used to add or remove the entry to a menu. \begin{Desc}
\item[Returns:]the menu ID \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 745 of file kservice.cpp.

Referenced by KService\-Group::entries(), and new\-Service\-Path().\index{KService@{KService}!storageId@{storageId}}
\index{storageId@{storageId}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::storage\-Id () const}\label{classKService_a19}


Returns a normalized ID suitable for storing in configuration files. 

It will be based on the menu-id when available and otherwise falls back to {\bf desktop\-Entry\-Path()}{\rm (p.\,\pageref{classKService_a16})} \begin{Desc}
\item[Returns:]the storage ID \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 755 of file kservice.cpp.

References KSycoca\-Entry::entry\-Path().\index{KService@{KService}!DCOPServiceType@{DCOPServiceType}}
\index{DCOPServiceType@{DCOPServiceType}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DCOPService\-Type\_\-t} KService::DCOPService\-Type () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a20}


Returns the DCOPService\-Type supported by this service. 

\begin{Desc}
\item[Returns:]the DCOPService\-Type supported by this service \end{Desc}


Definition at line 219 of file kservice.h.\index{KService@{KService}!path@{path}}
\index{path@{path}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::path () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a21}


Returns the working directory to run the program in. 

\begin{Desc}
\item[Returns:]the working directory to run the program in, or QString::null if not set \end{Desc}


Definition at line 226 of file kservice.h.\index{KService@{KService}!comment@{comment}}
\index{comment@{comment}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::comment () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a22}


Returns the descriptive comment for the service, if there is one. 

\begin{Desc}
\item[Returns:]the descriptive comment for the service, or QString::null if not set \end{Desc}


Definition at line 233 of file kservice.h.\index{KService@{KService}!genericName@{genericName}}
\index{genericName@{genericName}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::generic\-Name () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a23}


Returns the generic name for the service, if there is one (e.g. 

\char`\"{}Mail Client\char`\"{}). \begin{Desc}
\item[Returns:]the generic name, or QString::null if not set \end{Desc}


Definition at line 241 of file kservice.h.\index{KService@{KService}!untranslatedGenericName@{untranslatedGenericName}}
\index{untranslatedGenericName@{untranslatedGenericName}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::untranslated\-Generic\-Name () const}\label{classKService_a24}


Returns the untranslated (US English) generic name for the service, if there is one (e.g. 

\char`\"{}Mail Client\char`\"{}). \begin{Desc}
\item[Returns:]the generic name, or QString::null if not set \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 716 of file kservice.cpp.

References QVariant::is\-Valid(), property(), and QVariant::to\-String().\index{KService@{KService}!keywords@{keywords}}
\index{keywords@{keywords}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KService::keywords () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a25}


Returns a list of descriptive keywords the service, if there are any. 

\begin{Desc}
\item[Returns:]the list of keywords \end{Desc}


Definition at line 257 of file kservice.h.\index{KService@{KService}!categories@{categories}}
\index{categories@{categories}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KService::categories () const}\label{classKService_a26}


Returns a list of VFolder categories. 

\begin{Desc}
\item[Returns:]the list of VFolder categories \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 740 of file kservice.cpp.\index{KService@{KService}!serviceTypes@{serviceTypes}}
\index{serviceTypes@{serviceTypes}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KService::service\-Types () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a27}


Returns the service types that this service supports. 

\begin{Desc}
\item[Returns:]the list of service types that are supported \end{Desc}


Definition at line 270 of file kservice.h.\index{KService@{KService}!hasServiceType@{hasServiceType}}
\index{hasServiceType@{hasServiceType}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService::has\-Service\-Type (const {\bf QString} \& {\em \_\-service}) const}\label{classKService_a28}


Checks whether the service supports this service type. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-service}]The name of the service type you are interested in determining whether this services supports.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the service you specified is supported, otherwise false. \end{Desc}


Definition at line 347 of file kservice.cpp.

References KMime\-Type::mime\-Type(), and KService\-Type::service\-Type().\index{KService@{KService}!allowAsDefault@{allowAsDefault}}
\index{allowAsDefault@{allowAsDefault}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService::allow\-As\-Default () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a29}


Checks whether a service is used as a default setting, for example as plugin in a file manager. 

Usually that is the case, but some services may only be started when the user selected them. This kind of services returns false here. \begin{Desc}
\item[Returns:]true if the service may be used as a default setting \end{Desc}


Definition at line 288 of file kservice.h.\index{KService@{KService}!allowMultipleFiles@{allowMultipleFiles}}
\index{allowMultipleFiles@{allowMultipleFiles}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService::allow\-Multiple\-Files () const}\label{classKService_a30}


Checks whether this service can handle several files as startup arguments. 

\begin{Desc}
\item[Returns:]true if multiple files may be passed to this service at startup. False if only one file at a time may be passed. \end{Desc}


Definition at line 731 of file kservice.cpp.

References QString::find().\index{KService@{KService}!initialPreference@{initialPreference}}
\index{initialPreference@{initialPreference}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KService::initial\-Preference () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a31}


What preference to associate with this service initially (before the user has had any chance to define a profile for it). 

The bigger the value, the most preferred the service is. \begin{Desc}
\item[Returns:]the service preference level of the service \end{Desc}


Definition at line 304 of file kservice.h.\index{KService@{KService}!initialPreferenceForMimeType@{initialPreferenceForMimeType}}
\index{initialPreferenceForMimeType@{initialPreferenceForMimeType}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KService::initial\-Preference\-For\-Mime\-Type (const {\bf QString} \& {\em mime\-Type}) const}\label{classKService_a32}


What preference to associate with this service initially for handling the specified mimetype. 

(before the user has had any chance to define a profile for it). The bigger the value, the most preferred the service is. \begin{Desc}
\item[Returns:]the service preference level of the service for this mimetype \end{Desc}


Definition at line 380 of file kservice.cpp.

References KMime\-Type::mime\-Type(), and KService\-Type::service\-Type().\index{KService@{KService}!noDisplay@{noDisplay}}
\index{noDisplay@{noDisplay}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService::no\-Display () const}\label{classKService_a34}


Whether the entry should be suppressed in menus. 

\begin{Desc}
\item[Returns:]true to suppress this service \end{Desc}


Definition at line 683 of file kservice.cpp.

References QMap::end(), QMap::find(), and QString\-List::split().

Referenced by KService\-Group::child\-Count(), and KService\-Group::entries().\index{KService@{KService}!parentApp@{parentApp}}
\index{parentApp@{parentApp}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::parent\-App () const}\label{classKService_a35}


Name of the application this service belongs to. 

(Useful for e.g. plugins) \begin{Desc}
\item[Returns:]the parent application, or QString::null if not set \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 721 of file kservice.cpp.

References QMap::end(), and QMap::find().\index{KService@{KService}!property@{property}}
\index{property@{property}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QVariant} KService::property (const {\bf QString} \& {\em \_\-name}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKService_a36}


Returns the requested property. 

Some often used properties have convenience access functions like {\bf exec()}{\rm (p.\,\pageref{classKService_a7})}, service\-Types etc.

It depends upon the {\bf service\-Types()}{\rm (p.\,\pageref{classKService_a27})} of this service which properties a service can have.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-name}]the name of the property \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the property, or invalid if not found \end{Desc}
\begin{Desc}
\item[See also:]{\bf KService\-Type}{\rm (p.\,\pageref{classKServiceType})} \end{Desc}


Definition at line 468 of file kservice.cpp.

Referenced by substitute\-Uid(), untranslated\-Generic\-Name(), and username().\index{KService@{KService}!property@{property}}
\index{property@{property}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QVariant} KService::property (const {\bf QString} \& {\em \_\-name}, QVariant::Type {\em t}) const}\label{classKService_a37}


Returns the requested property. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-name}]the name of the property \item[{\em t}]the assumed type of the property \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the property, or invalid if not found \end{Desc}
\begin{Desc}
\item[See also:]{\bf KService\-Type}{\rm (p.\,\pageref{classKServiceType})} \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 483 of file kservice.cpp.

References QMap::end(), KSycoca\-Entry::entry\-Path(), QMap::find(), kd\-Debug(), and QString::to\-Int().\index{KService@{KService}!propertyNames@{propertyNames}}
\index{propertyNames@{propertyNames}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KService::property\-Names () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKService_a38}


Returns the list of all properties that this service can have. 

That means, that some of these properties may be empty. \begin{Desc}
\item[Returns:]the list of supported properties \end{Desc}


Definition at line 574 of file kservice.cpp.

References QMap::begin(), and QMap::end().\index{KService@{KService}!isValid@{isValid}}
\index{isValid@{isValid}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService::is\-Valid () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKService_a39}


Checks whether the service is valid. 

\begin{Desc}
\item[Returns:]true if the service is valid (e.g. name is not empty) \end{Desc}


Implements {\bf KSycoca\-Entry}.

Definition at line 371 of file kservice.h.\index{KService@{KService}!locateLocal@{locateLocal}}
\index{locateLocal@{locateLocal}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::locate\-Local ()}\label{classKService_a40}


Returns a path that can be used for saving changes to this service. 

\begin{Desc}
\item[Returns:]path that can be used for saving changes to this service \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 762 of file kservice.cpp.

References desktop\-Entry\-Path(), QDir::is\-Relative\-Path(), locate\-Local(), KDesktop\-File::locate\-Local(), and QString::starts\-With().\index{KService@{KService}!serviceByName@{serviceByName}}
\index{serviceByName@{serviceByName}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService::Ptr} KService::service\-By\-Name (const {\bf QString} \& {\em \_\-name})\hspace{0.3cm}{\tt  [static]}}\label{classKService_e0}


Find a service by name, i.e. 

the translated Name field. You should really not use this method, since the name is translated.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-name}]the name to search \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a pointer to the requested service or 0 if the service is unknown. {\em Very\/} {\em important:\/} Don't store the result in a KService$\ast$ ! \end{Desc}


Definition at line 608 of file kservice.cpp.

Referenced by KService\-Type\-Profile::allow\-As\-Default().\index{KService@{KService}!serviceByDesktopPath@{serviceByDesktopPath}}
\index{serviceByDesktopPath@{serviceByDesktopPath}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService::Ptr} KService::service\-By\-Desktop\-Path (const {\bf QString} \& {\em \_\-path})\hspace{0.3cm}{\tt  [static]}}\label{classKService_e1}


Find a service based on its path as returned by {\bf desktop\-Entry\-Path()}{\rm (p.\,\pageref{classKService_a16})}. 

It's usually better to use {\bf service\-By\-Storage\-Id()}{\rm (p.\,\pageref{classKService_e4})} instead.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-path}]the path of the configuration file \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a pointer to the requested service or 0 if the service is unknown. {\em Very\/} {\em important:\/} Don't store the result in a KService$\ast$ ! \end{Desc}


Definition at line 614 of file kservice.cpp.

Referenced by service\-By\-Storage\-Id().\index{KService@{KService}!serviceByDesktopName@{serviceByDesktopName}}
\index{serviceByDesktopName@{serviceByDesktopName}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService::Ptr} KService::service\-By\-Desktop\-Name (const {\bf QString} \& {\em \_\-name})\hspace{0.3cm}{\tt  [static]}}\label{classKService_e2}


Find a service by the name of its desktop file, not depending on its actual location (as long as it's under the applnk or service directories). 

For instance \char`\"{}konqbrowser\char`\"{} or \char`\"{}kcookiejar\char`\"{}. Note that the \char`\"{}.desktop\char`\"{} extension is implicit.

This is the recommended method (safe even if the user moves stuff) but note that it assumes that no two entries have the same filename.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-name}]the name of the configuration file \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a pointer to the requested service or 0 if the service is unknown. {\em Very\/} {\em important:\/} Don't store the result in a KService$\ast$ ! \end{Desc}


Definition at line 620 of file kservice.cpp.

Referenced by KRun::found\-Mime\-Type(), KURIFilter\-Data::icon\-Name(), KRun::run\-Command(), and service\-By\-Storage\-Id().\index{KService@{KService}!serviceByMenuId@{serviceByMenuId}}
\index{serviceByMenuId@{serviceByMenuId}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService::Ptr} KService::service\-By\-Menu\-Id (const {\bf QString} \& {\em \_\-menu\-Id})\hspace{0.3cm}{\tt  [static]}}\label{classKService_e3}


Find a service by its menu-id. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-menu\-Id}]the menu id of the service \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a pointer to the requested service or 0 if the service is unknown. {\em Very\/} {\em important:\/} Don't store the result in a KService$\ast$ ! \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 628 of file kservice.cpp.

Referenced by new\-Service\-Path(), and service\-By\-Storage\-Id().\index{KService@{KService}!serviceByStorageId@{serviceByStorageId}}
\index{serviceByStorageId@{serviceByStorageId}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService::Ptr} KService::service\-By\-Storage\-Id (const {\bf QString} \& {\em \_\-storage\-Id})\hspace{0.3cm}{\tt  [static]}}\label{classKService_e4}


Find a service by its storage-id or desktop-file path. 

This function will try very hard to find a matching service.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-storage\-Id}]the storage id or desktop-file path of the service \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a pointer to the requested service or 0 if the service is unknown. {\em Very\/} {\em important:\/} Don't store the result in a KService$\ast$ ! \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 634 of file kservice.cpp.

References QString::ends\-With(), QString::find\-Rev(), KService(), QString::length(), QString::mid(), service\-By\-Desktop\-Name(), service\-By\-Desktop\-Path(), service\-By\-Menu\-Id(), and QString::truncate().\index{KService@{KService}!allServices@{allServices}}
\index{allServices@{allServices}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService::List} KService::all\-Services ()\hspace{0.3cm}{\tt  [static]}}\label{classKService_e5}


Returns the whole list of services. 

Useful for being able to to display them in a list box, for example. More memory consuming than the ones above, don't use unless really necessary. \begin{Desc}
\item[Returns:]the list of all services \end{Desc}


Definition at line 603 of file kservice.cpp.\index{KService@{KService}!allInitServices@{allInitServices}}
\index{allInitServices@{allInitServices}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService::List} KService::all\-Init\-Services ()\hspace{0.3cm}{\tt  [static]}}\label{classKService_e6}


Returns all services that require initialisation. 

Only needed by \char`\"{}kcminit\char`\"{} \begin{Desc}
\item[Returns:]the list of all services that need to be initialized \end{Desc}


Definition at line 661 of file kservice.cpp.\index{KService@{KService}!newServicePath@{newServicePath}}
\index{newServicePath@{newServicePath}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::new\-Service\-Path (bool {\em show\-In\-Menu}, const {\bf QString} \& {\em suggested\-Name}, {\bf QString} $\ast$ {\em menu\-Id} = {\tt 0}, const {\bf QString\-List} $\ast$ {\em reserved\-Menu\-Ids} = {\tt 0})\hspace{0.3cm}{\tt  [static]}}\label{classKService_e7}


Returns a path that can be used to create a new KService based on {\tt suggested\-Name}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em show\-In\-Menu}]true, if the service should be shown in the {\bf KDE} menu false, if the service should be hidden from the menu \item[{\em suggested\-Name}]name to base the file on, if a service with such name already exists, a prefix will be added to make it unique. \item[{\em menu\-Id}]If provided, menu\-Id will be set to the menu id to use for the KService \item[{\em reserved\-Menu\-Ids}]If provided, the path and menu id will be chosen in such a way that the new menu id does not conflict with any of the reserved\-Menu\-Ids \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The path to use for the new KService. \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 771 of file kservice.cpp.

References QString::arg(), locate(), locate\-Local(), menu\-Id(), QString::mid(), QString::prepend(), and service\-By\-Menu\-Id().\index{KService@{KService}!rebuildKSycoca@{rebuildKSycoca}}
\index{rebuildKSycoca@{rebuildKSycoca}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KService::rebuild\-KSycoca ({\bf QWidget} $\ast$ {\em parent})\hspace{0.3cm}{\tt  [static]}}\label{classKService_e8}


Rebuild KSycoca and show a progress dialog while doing so. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]Parent widget for the progress dialog \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 827 of file kservice.cpp.

References DCOPClient::call\-Async().

Referenced by KDesktop\-Props\-Plugin::apply\-Changes().

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