\section{KUser\-Group Class Reference}
\label{classKUserGroup}\index{KUserGroup@{KUserGroup}}
Represents a group on your system.  


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

Collaboration diagram for KUser\-Group:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=113pt]{classKUserGroup__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KUser\-Group} ({\bf KUser::UIDMode} mode=KUser::Use\-Effective\-UID)
\item 
{\bf KUser\-Group} (long gid)
\item 
{\bf KUser\-Group} (const {\bf QString} \&name)
\item 
{\bf KUser\-Group} (const char $\ast$name)
\item 
{\bf KUser\-Group} (struct group $\ast$g)
\item 
{\bf KUser\-Group} (const {\bf KUser\-Group} \&group)
\item 
{\bf KUser\-Group} \& {\bf operator=} (const {\bf KUser\-Group} \&group)
\item 
bool {\bf operator==} (const {\bf KUser\-Group} \&group) const 
\item 
bool {\bf operator!=} (const {\bf KUser\-Group} \&group) const 
\item 
bool {\bf is\-Valid} () const 
\item 
long {\bf gid} () const 
\item 
{\bf QString} {\bf name} () const 
\item 
const {\bf QValue\-List}$<$ {\bf KUser} $>$ \& {\bf users} () const 
\item 
{\bf QString\-List} {\bf user\-Names} () const 
\item 
{\bf $\sim$KUser\-Group} ()
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf QValue\-List}$<$ {\bf KUser\-Group} $>$ {\bf all\-Groups} ()
\item 
static {\bf QString\-List} {\bf all\-Group\-Names} ()
\end{CompactItemize}


\subsection{Detailed Description}
Represents a group on your system. 

This class represents a group on your system. You can either get information about the group of the current user, of fetch information about a group on the system. Instances of this class will be explicitly shared, so copying objects is very cheap and you can safely pass objects by value.

\begin{Desc}
\item[Author:]Jan Schaefer $<${\tt j\_\-schaef@informatik.uni-kl.de}$>$ \end{Desc}
\begin{Desc}
\item[Since:]3.3 \end{Desc}




Definition at line 256 of file kuser.h.

\subsection{Constructor \& Destructor Documentation}
\index{KUserGroup@{KUser\-Group}!KUserGroup@{KUserGroup}}
\index{KUserGroup@{KUserGroup}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KUser\-Group::KUser\-Group ({\bf KUser::UIDMode} {\em mode} = {\tt KUser::UseEffectiveUID})\hspace{0.3cm}{\tt  [explicit]}}\label{classKUserGroup_a0}


Create an object from the group of the current user. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mode}]if {\bf KUser::Use\-Effective\-UID}{\rm (p.\,\pageref{classKUser_w2w0})} is passed the effective user will be used. If {\bf KUser::Use\-Real\-User\-ID}{\rm (p.\,\pageref{classKUser_w2w1})} is passed the real user will be used. The real UID will be different than the effective UID in setuid programs; in such a case use the effective UID for checking permissions, and the real UID for displaying information about the group associated with the user. \end{description}
\end{Desc}


Definition at line 293 of file kuser.cpp.

References KUser$<$ T $>$::gid().

Referenced by all\-Groups().\index{KUserGroup@{KUser\-Group}!KUserGroup@{KUserGroup}}
\index{KUserGroup@{KUserGroup}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KUser\-Group::KUser\-Group (long {\em gid})\hspace{0.3cm}{\tt  [explicit]}}\label{classKUserGroup_a1}


Create an object from a group id. 

If the group does not exist, {\bf is\-Valid()}{\rm (p.\,\pageref{classKUserGroup_a9})} will return false. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gid}]the group id \end{description}
\end{Desc}


Definition at line 298 of file kuser.cpp.\index{KUserGroup@{KUser\-Group}!KUserGroup@{KUserGroup}}
\index{KUserGroup@{KUserGroup}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KUser\-Group::KUser\-Group (const {\bf QString} \& {\em name})\hspace{0.3cm}{\tt  [explicit]}}\label{classKUserGroup_a2}


Create an object from a group name. 

If the group does not exist, {\bf is\-Valid()}{\rm (p.\,\pageref{classKUserGroup_a9})} will return false. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]the name of the group \end{description}
\end{Desc}


Definition at line 302 of file kuser.cpp.

References QString::local8Bit(), and name().\index{KUserGroup@{KUser\-Group}!KUserGroup@{KUserGroup}}
\index{KUserGroup@{KUserGroup}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KUser\-Group::KUser\-Group (const char $\ast$ {\em name})\hspace{0.3cm}{\tt  [explicit]}}\label{classKUserGroup_a3}


Create an object from a group name. 

If the group does not exist, {\bf is\-Valid()}{\rm (p.\,\pageref{classKUserGroup_a9})} will return false. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]the name of the group \end{description}
\end{Desc}


Definition at line 306 of file kuser.cpp.

References name().\index{KUserGroup@{KUser\-Group}!KUserGroup@{KUserGroup}}
\index{KUserGroup@{KUserGroup}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KUser\-Group::KUser\-Group (struct group $\ast$ {\em g})\hspace{0.3cm}{\tt  [explicit]}}\label{classKUserGroup_a4}


Creates an object from a group structure. 

If the pointer is null, {\bf is\-Valid()}{\rm (p.\,\pageref{classKUserGroup_a9})} will return false. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em g}]the group structure to create the group from. \end{description}
\end{Desc}


Definition at line 310 of file kuser.cpp.\index{KUserGroup@{KUser\-Group}!KUserGroup@{KUserGroup}}
\index{KUserGroup@{KUserGroup}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KUser\-Group::KUser\-Group (const {\bf KUser\-Group} \& {\em group})}\label{classKUserGroup_a5}


Creates a new KUser\-Group instance from another KUser\-Group object. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em group}]the KUser\-Group to copy \end{description}
\end{Desc}


Definition at line 315 of file kuser.cpp.\index{KUserGroup@{KUser\-Group}!~KUserGroup@{$\sim$KUserGroup}}
\index{~KUserGroup@{$\sim$KUserGroup}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KUser\-Group::$\sim${\bf KUser\-Group} ()}\label{classKUserGroup_a14}


Destructor. 



Definition at line 423 of file kuser.cpp.

\subsection{Member Function Documentation}
\index{KUserGroup@{KUser\-Group}!operator=@{operator=}}
\index{operator=@{operator=}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KUser\-Group} \& KUser\-Group::operator= (const {\bf KUser\-Group} \& {\em group})}\label{classKUserGroup_a6}


Copies a group. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em group}]the group that should be copied \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]this group \end{Desc}


Definition at line 320 of file kuser.cpp.\index{KUserGroup@{KUser\-Group}!operator==@{operator==}}
\index{operator==@{operator==}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KUser\-Group::operator== (const {\bf KUser\-Group} \& {\em group}) const}\label{classKUserGroup_a7}


Two KUser\-Group objects are equal if {\bf is\-Valid()}{\rm (p.\,\pageref{classKUserGroup_a9})} is true and {\bf gid()}{\rm (p.\,\pageref{classKUserGroup_a10})} are identical. 

\begin{Desc}
\item[Returns:]true if the groups are identical \end{Desc}


Definition at line 325 of file kuser.cpp.

References gid(), and is\-Valid().

Referenced by operator!=().\index{KUserGroup@{KUser\-Group}!operator"!=@{operator"!=}}
\index{operator"!=@{operator"!=}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KUser\-Group::operator!= (const {\bf KUser\-Group} \& {\em group}) const}\label{classKUserGroup_a8}


Two KUser\-Group objects are not equal if either {\bf is\-Valid()}{\rm (p.\,\pageref{classKUserGroup_a9})} is not true or {\bf gid()}{\rm (p.\,\pageref{classKUserGroup_a10})} are not identical. 

\begin{Desc}
\item[Returns:]true if the groups are not identical \end{Desc}


Definition at line 334 of file kuser.cpp.

References operator==().\index{KUserGroup@{KUser\-Group}!isValid@{isValid}}
\index{isValid@{isValid}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KUser\-Group::is\-Valid () const}\label{classKUserGroup_a9}


Returns wether the group is valid. 

A KUser\-Group object can be invalid if it is created with a non-existing gid or name. \begin{Desc}
\item[Returns:]true if the group is valid \end{Desc}


Definition at line 363 of file kuser.cpp.

Referenced by operator==().\index{KUserGroup@{KUser\-Group}!gid@{gid}}
\index{gid@{gid}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}long KUser\-Group::gid () const}\label{classKUserGroup_a10}


Returns the group id of the group. 

\begin{Desc}
\item[Returns:]the group id of the group or -1 if the group is invalid \end{Desc}


Definition at line 367 of file kuser.cpp.

Referenced by operator==().\index{KUserGroup@{KUser\-Group}!name@{name}}
\index{name@{name}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KUser\-Group::name () const}\label{classKUserGroup_a11}


The name of the group. 

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


Definition at line 374 of file kuser.cpp.

Referenced by KUser\-Group().\index{KUserGroup@{KUser\-Group}!users@{users}}
\index{users@{users}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf QValue\-List}$<$ {\bf KUser} $>$ \& KUser\-Group::users () const}\label{classKUserGroup_a12}


Returns a list of all users of the group. 

\begin{Desc}
\item[Returns:]a list of all users of the group \end{Desc}


Definition at line 381 of file kuser.cpp.\index{KUserGroup@{KUser\-Group}!userNames@{userNames}}
\index{userNames@{userNames}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KUser\-Group::user\-Names () const}\label{classKUserGroup_a13}


Returns a list of all user login names of the group. 

\begin{Desc}
\item[Returns:]a list of all user login names of the group \end{Desc}


Definition at line 385 of file kuser.cpp.\index{KUserGroup@{KUser\-Group}!allGroups@{allGroups}}
\index{allGroups@{allGroups}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QValue\-List}$<$ {\bf KUser\-Group} $>$ KUser\-Group::all\-Groups ()\hspace{0.3cm}{\tt  [static]}}\label{classKUserGroup_e0}


Returns a list of all groups on this system. 



Definition at line 396 of file kuser.cpp.

References QValue\-List::append(), and KUser\-Group().

Referenced by KUser$<$ T $>$::group\-Names(), and KUser$<$ T $>$::groups().\index{KUserGroup@{KUser\-Group}!allGroupNames@{allGroupNames}}
\index{allGroupNames@{allGroupNames}!KUserGroup@{KUser\-Group}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KUser\-Group::all\-Group\-Names ()\hspace{0.3cm}{\tt  [static]}}\label{classKUserGroup_e1}


Returns a list of all group names on this system. 



Definition at line 409 of file kuser.cpp.

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