\section{KService\-Group Class Reference}
\label{classKServiceGroup}\index{KServiceGroup@{KServiceGroup}}
This class is typically used like this:.  


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

Inheritance diagram for KService\-Group:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=61pt]{classKServiceGroup__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KService\-Group:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=287pt]{classKServiceGroup__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
typedef {\bf KShared\-Ptr}$<$ {\bf KService\-Group} $>$ {\bf Ptr}\label{classKServiceGroup_w0}

\item 
typedef {\bf KShared\-Ptr}$<$ {\bf KSycoca\-Entry} $>$ {\bf SPtr}\label{classKServiceGroup_w1}

\item 
typedef {\bf QValue\-List}$<$ {\bf SPtr} $>$ {\bf List}\label{classKServiceGroup_w2}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KService\-Group} (const  {\bf QString} \&name)
\begin{CompactList}\small\item\em Construct a dummy servicegroup indexed with {\tt name} \begin{Desc}
\item[Since:]3.1. \end{Desc}
\item\end{CompactList}\item 
{\bf KService\-Group} (const  {\bf QString} \&\_\-fullpath, const  {\bf QString} \&\_\-relpath)
\begin{CompactList}\small\item\em Construct a service and take all informations from a config file. \item\end{CompactList}\item 
{\bf KService\-Group} ({\bf QData\-Stream} \&\_\-str, int {\bf offset}, bool deep)\label{classKServiceGroup_a2}

\item 
bool {\bf is\-Valid} () const 
\item 
virtual {\bf QString} {\bf name} () const 
\begin{CompactList}\small\item\em Name used for indexing. \item\end{CompactList}\item 
virtual {\bf QString} {\bf rel\-Path} () const \label{classKServiceGroup_a6}

\item 
{\bf QString} {\bf caption} () const 
\item 
{\bf QString} {\bf icon} () const 
\item 
{\bf QString} {\bf comment} () const 
\item 
int {\bf child\-Count} ()
\item 
bool {\bf no\-Display} () const 
\item 
virtual void {\bf load} ({\bf QData\-Stream} \&)\label{classKServiceGroup_a12}

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

\item 
virtual {\bf List} {\bf entries} (bool sorted, bool exclude\-No\-Display)
\begin{CompactList}\small\item\em List of all Services and Service\-Groups within this Service\-Group. \item\end{CompactList}\item 
virtual {\bf List} {\bf entries} (bool sorted=false)
\begin{CompactList}\small\item\em As above with exclude\-No\-Display true. \item\end{CompactList}\item 
{\bf QString} {\bf base\-Group\-Name} () const 
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Ptr} {\bf base\-Group} (const  {\bf QString} \&base\-Group\-Name)
\item 
{\bf Ptr} {\bf root} ()\label{classKServiceGroup_e1}

\item 
{\bf Ptr} {\bf group} (const  {\bf QString} \&rel\-Path)\label{classKServiceGroup_e2}

\item 
{\bf Ptr} {\bf child\-Group} (const  {\bf QString} \&parent)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf add\-Entry} ({\bf KSycoca\-Entry} $\ast$entry)\label{classKServiceGroup_b0}

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

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf QString} {\bf m\_\-str\-Caption}\label{classKServiceGroup_p0}

\item 
{\bf QString} {\bf m\_\-str\-Icon}\label{classKServiceGroup_p1}

\item 
{\bf QString} {\bf m\_\-str\-Comment}\label{classKServiceGroup_p2}

\item 
{\bf List} {\bf m\_\-service\-List}\label{classKServiceGroup_p3}

\item 
bool {\bf m\_\-b\-Deep}\label{classKServiceGroup_p4}

\item 
{\bf QString} {\bf m\_\-str\-Base\-Group\-Name}\label{classKServiceGroup_p5}

\item 
int {\bf m\_\-child\-Count}\label{classKServiceGroup_p6}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KBuild\-Service\-Group\-Factory}\label{classKServiceGroup_n0}

\end{CompactItemize}


\subsection{Detailed Description}
This class is typically used like this:. 

// Lookup screensaver group {\bf KService\-Group::Ptr} group = {\bf KService\-Group::base\-Group}{\rm (p.\,\pageref{classKServiceGroup_e0})}(\char`\"{}screensavers\char`\"{}); if (!group $|$$|$ !group-$>${\bf is\-Valid()}{\rm (p.\,\pageref{classKServiceGroup_a4})}) return;

{\bf KService\-Group::List} list = group-$>${\bf entries()}{\rm (p.\,\pageref{classKServiceGroup_a14})};

// Iterate over all entries in the group for( {\bf KService\-Group::List::Const\-Iterator} it = list.begin(); it != list.end(); it++) \{ {\bf KSycoca\-Entry} $\ast$p = ($\ast$it); if (p-$>$is\-Type(KST\_\-KService)) \{ {\bf KService}{\rm (p.\,\pageref{classKService})} $\ast$s = static\_\-cast$<$KService $\ast$$>$(p); printf(\char`\"{}Name = \%s$\backslash$n\char`\"{}, s-$>${\bf name()}{\rm (p.\,\pageref{classKServiceGroup_a5})}.latin1()); \} else if (p-$>$is\-Type(KST\_\-KService\-Group)) \{ KService\-Group $\ast$g = static\_\-cast$<$KService\-Group $\ast$$>$(p); // Sub group ... \} \} 



Definition at line 63 of file kservicegroup.h.

\subsection{Constructor \& Destructor Documentation}
\index{KServiceGroup@{KService\-Group}!KServiceGroup@{KServiceGroup}}
\index{KServiceGroup@{KServiceGroup}!KServiceGroup@{KService\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KService\-Group::KService\-Group (const {\bf QString} \& {\em name})}\label{classKServiceGroup_a0}


Construct a dummy servicegroup indexed with {\tt name} \begin{Desc}
\item[Since:]3.1. \end{Desc}




Definition at line 40 of file kservicegroup.cpp.

References KSycoca\-Entry::m\_\-b\-Deleted, and name().\index{KServiceGroup@{KService\-Group}!KServiceGroup@{KServiceGroup}}
\index{KServiceGroup@{KServiceGroup}!KServiceGroup@{KService\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KService\-Group::KService\-Group (const {\bf QString} \& {\em \_\-fullpath}, const {\bf QString} \& {\em \_\-relpath})}\label{classKServiceGroup_a1}


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

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


Definition at line 47 of file kservicegroup.cpp.

References QString::find\-Rev(), QString::is\-Empty(), QString::left(), QString::length(), KSycoca\-Entry::m\_\-b\-Deleted, QString::mid(), KConfig\-Base::read\-Bool\-Entry(), KConfig\-Base::read\-Entry(), QString::right(), and KConfig\-Base::set\-Desktop\-Group().

\subsection{Member Function Documentation}
\index{KServiceGroup@{KService\-Group}!isValid@{isValid}}
\index{isValid@{isValid}!KServiceGroup@{KService\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService\-Group::is\-Valid () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKServiceGroup_a4}


\begin{Desc}
\item[Returns:]true \end{Desc}


Implements {\bf KSycoca\-Entry}.

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


Name used for indexing. 



Implements {\bf KSycoca\-Entry}.

Definition at line 102 of file kservicegroup.h.

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

Referenced by entries(), and KService\-Group().\index{KServiceGroup@{KService\-Group}!caption@{caption}}
\index{caption@{caption}!KServiceGroup@{KService\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService\-Group::caption () const\hspace{0.3cm}{\tt  [inline]}}\label{classKServiceGroup_a7}


\begin{Desc}
\item[Returns:]the caption of this group \end{Desc}


Definition at line 108 of file kservicegroup.h.\index{KServiceGroup@{KService\-Group}!icon@{icon}}
\index{icon@{icon}!KServiceGroup@{KService\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService\-Group::icon () const\hspace{0.3cm}{\tt  [inline]}}\label{classKServiceGroup_a8}


\begin{Desc}
\item[Returns:]the icon associated with the group. \end{Desc}


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


\begin{Desc}
\item[Returns:]the descriptive comment for the group, if there is one. \end{Desc}


Definition at line 118 of file kservicegroup.h.\index{KServiceGroup@{KService\-Group}!childCount@{childCount}}
\index{childCount@{childCount}!KServiceGroup@{KService\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KService\-Group::child\-Count ()}\label{classKServiceGroup_a10}


\begin{Desc}
\item[Returns:]the total number of displayable services in this group and any of its subgroups. \end{Desc}


Definition at line 93 of file kservicegroup.cpp.

References QValue\-List::begin(), QValue\-List::end(), KSycoca\-Entry::is\-Type(), and KService::no\-Display().\index{KServiceGroup@{KService\-Group}!noDisplay@{noDisplay}}
\index{noDisplay@{noDisplay}!KServiceGroup@{KService\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService\-Group::no\-Display () const}\label{classKServiceGroup_a11}


\begin{Desc}
\item[Returns:]true if the No\-Display flag was set, i.e. if this group should be hidden from menus, while still being in ksycoca. \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 120 of file kservicegroup.cpp.

Referenced by entries().\index{KServiceGroup@{KService\-Group}!entries@{entries}}
\index{entries@{entries}!KServiceGroup@{KService\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService\-Group::List} KService\-Group::entries (bool {\em sorted}, bool {\em exclude\-No\-Display})\hspace{0.3cm}{\tt  [virtual]}}\label{classKServiceGroup_a14}


List of all Services and Service\-Groups within this Service\-Group. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sorted}]indicates whether to sort items \item[{\em whether}]to include items marked \char`\"{}No\-Display\char`\"{} \end{description}
\end{Desc}


Definition at line 202 of file kservicegroup.cpp.

References QValue\-List::append(), QValue\-List$<$ KSortable\-Item$<$ T, Key $>$ $>$::begin(), QValue\-List::begin(), QValue\-List$<$ KSortable\-Item$<$ T, Key $>$ $>$::end(), QValue\-List::end(), QString::find\-Rev(), QString::from\-Utf8(), KSortable\-Value\-List$<$ T, Key $>$::insert(), KSycoca\-Entry::is\-Type(), KStd\-Accel::key(), QString::length(), KSycoca\-Entry::List, QString::local8Bit(), m\_\-service\-List, QString::mid(), KStd\-Accel::name(), KSycoca\-Entry::name(), name(), KService::no\-Display(), no\-Display(), QValue\-List::remove(), KSortable\-Value\-List$<$ T, Key $>$::sort(), and QString::truncate().

Referenced by entries().\index{KServiceGroup@{KService\-Group}!entries@{entries}}
\index{entries@{entries}!KServiceGroup@{KService\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService\-Group::List} KService\-Group::entries (bool {\em sorted} = false)\hspace{0.3cm}{\tt  [virtual]}}\label{classKServiceGroup_a15}


As above with exclude\-No\-Display true. 



Definition at line 196 of file kservicegroup.cpp.

References entries().\index{KServiceGroup@{KService\-Group}!baseGroupName@{baseGroupName}}
\index{baseGroupName@{baseGroupName}!KServiceGroup@{KService\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService\-Group::base\-Group\-Name () const\hspace{0.3cm}{\tt  [inline]}}\label{classKServiceGroup_a16}


\begin{Desc}
\item[Returns:]non-empty string if the group is a special base group. By default, \char`\"{}Settings/\char`\"{} is the kcontrol base group (\char`\"{}settings\char`\"{}) and \char`\"{}System/Screensavers/\char`\"{} is the screensavers base group (\char`\"{}screensavers\char`\"{}). This allows moving the groups without breaking those apps.\end{Desc}
The base group is defined by the X-KDE-Base\-Group key in the .directory file. 

Definition at line 165 of file kservicegroup.h.\index{KServiceGroup@{KService\-Group}!baseGroup@{baseGroup}}
\index{baseGroup@{baseGroup}!KServiceGroup@{KService\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService\-Group::Ptr} KService\-Group::base\-Group (const {\bf QString} \& {\em base\-Group\-Name})\hspace{0.3cm}{\tt  [static]}}\label{classKServiceGroup_e0}


\begin{Desc}
\item[Returns:]the group for the given base\-Group\-Name Can return 0L if the directory (or the .directory file) was deleted. \end{Desc}


Definition at line 331 of file kservicegroup.cpp.\index{KServiceGroup@{KService\-Group}!childGroup@{childGroup}}
\index{childGroup@{childGroup}!KServiceGroup@{KService\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService\-Group::Ptr} KService\-Group::child\-Group (const {\bf QString} \& {\em parent})\hspace{0.3cm}{\tt  [static]}}\label{classKServiceGroup_e3}


\begin{Desc}
\item[Returns:]the group of services that have X-KDE-Parent\-App equal to {\tt parent} \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 350 of file kservicegroup.cpp.

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