\section{KCatalogue Class Reference}
\label{classKCatalogue}\index{KCatalogue@{KCatalogue}}
This class abstracts a gettext message catalog.  


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

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KCatalogue} (const {\bf QString} \&name=QString::null, const {\bf QString} \&language=QString::null)
\item 
{\bf KCatalogue} (const {\bf KCatalogue} \&rhs)
\item 
{\bf KCatalogue} \& {\bf operator=} (const {\bf KCatalogue} \&rhs)
\item 
virtual {\bf $\sim$KCatalogue} ()
\item 
{\bf QString} {\bf name} () const 
\item 
{\bf QString} {\bf language} () const 
\item 
int {\bf plural\-Type} () const 
\item 
void {\bf set\-Plural\-Type} (int plural\-Type)
\item 
const char $\ast$ {\bf translate} (const char $\ast$msgid) const 
\end{CompactItemize}


\subsection{Detailed Description}
This class abstracts a gettext message catalog. 

It will take care of opening the file and reading the catalog.

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




Definition at line 37 of file kcatalogue.h.

\subsection{Constructor \& Destructor Documentation}
\index{KCatalogue@{KCatalogue}!KCatalogue@{KCatalogue}}
\index{KCatalogue@{KCatalogue}!KCatalogue@{KCatalogue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KCatalogue::KCatalogue (const {\bf QString} \& {\em name} = {\tt QString::null}, const {\bf QString} \& {\em language} = {\tt QString::null})\hspace{0.3cm}{\tt  [explicit]}}\label{classKCatalogue_a0}


Constructor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]The name of the catalog \item[{\em language}]The language of this catalog \end{description}
\end{Desc}


Definition at line 55 of file kcatalogue.cpp.

References QString::arg(), QString::from\-Latin1(), language(), and name().\index{KCatalogue@{KCatalogue}!KCatalogue@{KCatalogue}}
\index{KCatalogue@{KCatalogue}!KCatalogue@{KCatalogue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KCatalogue::KCatalogue (const {\bf KCatalogue} \& {\em rhs})}\label{classKCatalogue_a1}


Copy constructor. 



Definition at line 73 of file kcatalogue.cpp.\index{KCatalogue@{KCatalogue}!~KCatalogue@{$\sim$KCatalogue}}
\index{~KCatalogue@{$\sim$KCatalogue}!KCatalogue@{KCatalogue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KCatalogue::$\sim${\bf KCatalogue} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKCatalogue_a3}


Destructor. 



Definition at line 89 of file kcatalogue.cpp.

\subsection{Member Function Documentation}
\index{KCatalogue@{KCatalogue}!operator=@{operator=}}
\index{operator=@{operator=}!KCatalogue@{KCatalogue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KCatalogue} \& KCatalogue::operator= (const {\bf KCatalogue} \& {\em rhs})}\label{classKCatalogue_a2}


Assignment operator. 



Definition at line 79 of file kcatalogue.cpp.

References QString::d(), and name().\index{KCatalogue@{KCatalogue}!name@{name}}
\index{name@{name}!KCatalogue@{KCatalogue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KCatalogue::name () const}\label{classKCatalogue_a4}


Returns the name of the catalog. 

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


Definition at line 96 of file kcatalogue.cpp.

Referenced by KCatalogue(), and operator=().\index{KCatalogue@{KCatalogue}!language@{language}}
\index{language@{language}!KCatalogue@{KCatalogue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KCatalogue::language () const}\label{classKCatalogue_a5}


Returns the language of the catalog. 

\begin{Desc}
\item[Returns:]The language of the catalog \end{Desc}


Definition at line 101 of file kcatalogue.cpp.

Referenced by KCatalogue().\index{KCatalogue@{KCatalogue}!pluralType@{pluralType}}
\index{pluralType@{pluralType}!KCatalogue@{KCatalogue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KCatalogue::plural\-Type () const}\label{classKCatalogue_a6}


Returns the plural type for the catalog. 

This type is based on the language of the catalog and is cached for performance.

\begin{Desc}
\item[Returns:]The plural type for the catalog \end{Desc}


Definition at line 111 of file kcatalogue.cpp.\index{KCatalogue@{KCatalogue}!setPluralType@{setPluralType}}
\index{setPluralType@{setPluralType}!KCatalogue@{KCatalogue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCatalogue::set\-Plural\-Type (int {\em plural\-Type})}\label{classKCatalogue_a7}


Sets the plural type for the catalog. 

The caller has probably looked it up in a kdelibs.mo-catalog for the appropriate language

\begin{Desc}
\item[Returns:]The plural type for the catalog \end{Desc}


Definition at line 106 of file kcatalogue.cpp.\index{KCatalogue@{KCatalogue}!translate@{translate}}
\index{translate@{translate}!KCatalogue@{KCatalogue}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ KCatalogue::translate (const char $\ast$ {\em msgid}) const}\label{classKCatalogue_a8}


Retrieves a translation of the specified message id. 

Do not pass 0 or \char`\"{}\char`\"{} strings as message ids.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em msgid}]The message id\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The translated message, in utf8 encoding, or 0 if not found \end{Desc}


Definition at line 140 of file kcatalogue.cpp.

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