kdecore Library API Documentation

KCatalogue Class Reference

This class abstracts a gettext message catalog. More...

#include <kcatalogue.h>

List of all members.

Public Member Functions

 KCatalogue (const QString &name=QString::null)
 KCatalogue (const KCatalogue &rhs)
KCatalogueoperator= (const KCatalogue &rhs)
virtual ~KCatalogue ()
QString name () const
void setFileName (const QString &fileName)
const char * translate (const char *msgid) const


Detailed Description

This class abstracts a gettext message catalog.

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

See also:
KLocale

Definition at line 36 of file kcatalogue.h.


Constructor & Destructor Documentation

KCatalogue::KCatalogue const QString name = QString::null  )  [explicit]
 

Constructor.

Parameters:
name The name of the catalog

Definition at line 52 of file kcatalogue.cpp.

References name().

KCatalogue::KCatalogue const KCatalogue rhs  ) 
 

Copy constructor.

Definition at line 58 of file kcatalogue.cpp.

KCatalogue::~KCatalogue  )  [virtual]
 

Destructor.

Definition at line 72 of file kcatalogue.cpp.


Member Function Documentation

KCatalogue & KCatalogue::operator= const KCatalogue rhs  ) 
 

Assignment operator.

Definition at line 64 of file kcatalogue.cpp.

References d, fileName(), and setFileName().

QString KCatalogue::name  )  const
 

Returns the name of the catalog.

Returns:
The name of the catalog

Definition at line 79 of file kcatalogue.cpp.

Referenced by KCatalogue().

void KCatalogue::setFileName const QString fileName  ) 
 

Changes the current file name.

Parameters:
fileName The new file name

Definition at line 84 of file kcatalogue.cpp.

References QFile::encodeName(), QString::isEmpty(), and QCString::length().

Referenced by operator=().

const char * KCatalogue::translate const char *  msgid  )  const
 

Retrieves a translation of the specified message id.

Do not pass 0 or "" strings as message ids.

Parameters:
msgid The message id
Returns:
The translated message, in utf8 encoding, or 0 if not found

Definition at line 107 of file kcatalogue.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdecore Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Aug 4 05:23:09 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2003