FX::QTransString Class Reference

#include <QTrans.h>

List of all members.


Detailed Description

Provides a delayed translation string.

QTrans::tr() returns one of these which basically accumulates argument inserts via arg() and then when asked to cast to FXString, actually performs the translation based upon any parameter specialisations defined for the current locale in the translation file.

QTransString also can convert to arbitrary language ids, but this functionality is protected as QTransString has an implicit conversion to FXString. It can even invoke a functor to return what language id to use, a facility used by Tn to return Just-In-Time-Help strings to multiple clients in multiple languages in a thread safe fashion. If you want this extended functionality, subclass QTransString.

Definition at line 52 of file QTrans.h.

Public Member Functions

 QTransString (QTransString &o)
QTransStringoperator= (QTransString &)
 ~QTransString ()
QTransStringarg (const FXString &str, FXint fieldwidth=0)
QTransStringarg (char c, FXint fieldwidth=0)
QTransStringarg (FXlong num, FXint fieldwidth=0, FXint base=10)
QTransStringarg (FXulong num, FXint fieldwidth=0, FXint base=10)
QTransStringarg (FXint num, FXint fieldwidth=0, FXint base=10)
QTransStringarg (FXuint num, FXint fieldwidth=0, FXint base=10)
QTransStringarg (double num, FXint fieldwidth=0, FXchar fmt='g', int prec=-1)
 operator FXString ()
const FXchartext ()
void save (FXStream &s) const
void load (FXStream &s)

Protected Types

typedef Generic::Functor<
Generic::TL::create< const
FXString * >::value > 
GetLangIdSpec

Protected Member Functions

 QTransString ()
 QTransString (const char *context, const char *text, const char *hint, const FXString *langid=0)
bool empty () const throw ()
QTransString copy () const
GetLangIdSpeclangIdFunc () const throw ()
void setLangIdFunc (GetLangIdSpec *idfunc) throw ()
FXString translate (const FXString *id=0)
void contents (const char *&context, const char *&text, const char *&hint) const

Friends

class QTrans
struct QTransStringPrivate


The documentation for this class was generated from the following file:
(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:37:46 2009 for TnFOX by doxygen v1.4.7