OpendTect-6_4  6.4
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Private Member Functions | Friends | List of all members
TextTranslateMgr Class Reference
Inheritance diagram for TextTranslateMgr:
[legend]

Public Member Functions

 TextTranslateMgr ()
 
 ~TextTranslateMgr ()
 
int nrSupportedLanguages () const
 
uiString getLanguageUserName (int) const
 
BufferString getLocaleName (int) const
 
bool setLanguage (int, uiString &errmsg)
 
int currentLanguage () const
 
int changeCount () const
 
const ::QTranslator * getQTranslator (const char *appl) const
 
const ::QLocale * getQLocale () const
 
bool addLanguage (TextTranslatorLanguage *)
 Returns false if it was not added. More...
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false)
 
bool attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false)
 
void detachCB (NotifierAccess &, const CallBack &)
 
void detachCB (NotifierAccess *notif, const CallBack &cb)
 
bool isNotifierAttached (NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 

Static Public Member Functions

static bool loadTranslations ()
 
static void GetLocalizationDir (FilePath &)
 
static char cApplicationEnd ()
 

Public Attributes

Notifier< TextTranslateMgrlanguageChange
 

Protected Member Functions

void loadUSEnglish ()
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

Protected Attributes

int dirtycount_
 
ObjectSet< TextTranslatorLanguagelanguages_
 
int currentlanguageidx_
 

Static Private Member Functions

static uiString tr (const char *text, const char *disambiguation=0, int pluralnr=-1)
 
static uiString legacyTr (const char *text, const char *disambiguation=0, int pluralnr=-1)
 

Friends

class TextTranslatorLanguage
 

Detailed Description

Manager that keeps track of translations. By default, it only handles English plural, but it can be extended with more languages.

Constructor & Destructor Documentation

TextTranslateMgr::TextTranslateMgr ( )
TextTranslateMgr::~TextTranslateMgr ( )

Member Function Documentation

bool TextTranslateMgr::addLanguage ( TextTranslatorLanguage )

Returns false if it was not added.

static char TextTranslateMgr::cApplicationEnd ( )
inlinestatic
int TextTranslateMgr::changeCount ( ) const
inline
int TextTranslateMgr::currentLanguage ( ) const
uiString TextTranslateMgr::getLanguageUserName ( int  ) const
BufferString TextTranslateMgr::getLocaleName ( int  ) const
static void TextTranslateMgr::GetLocalizationDir ( FilePath )
static
const :: QLocale* TextTranslateMgr::getQLocale ( ) const
const :: QTranslator* TextTranslateMgr::getQTranslator ( const char *  appl) const
static uiString TextTranslateMgr::legacyTr ( const char *  text,
const char *  disambiguation = 0,
int  pluralnr = -1 
)
inlinestaticprivate
static bool TextTranslateMgr::loadTranslations ( )
static

Can be called from executables to load The dGBCommon plugin, wich loads all languages.

void TextTranslateMgr::loadUSEnglish ( )
protected
int TextTranslateMgr::nrSupportedLanguages ( ) const
bool TextTranslateMgr::setLanguage ( int  ,
uiString errmsg 
)
static uiString TextTranslateMgr::tr ( const char *  text,
const char *  disambiguation = 0,
int  pluralnr = -1 
)
inlinestaticprivate

Friends And Related Function Documentation

friend class TextTranslatorLanguage
friend

Member Data Documentation

int TextTranslateMgr::currentlanguageidx_
protected
int TextTranslateMgr::dirtycount_
protected
Notifier<TextTranslateMgr> TextTranslateMgr::languageChange

Triggers both on new languages and changed languages.

ObjectSet<TextTranslatorLanguage> TextTranslateMgr::languages_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019