Vesna
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Member Functions | Static Public Attributes | List of all members
ApplicationLanguageManager Class Reference

#include <ApplicationLanguageManager.h>

Classes

class  DataClass
 

Public Member Functions

 ApplicationLanguageManager ()
 
 ~ApplicationLanguageManager ()
 
bool Init ()
 
bool SetGlobalLanguage (const QString &language)
 SetGlobalLanguage - method sets desired language as current global (startup) language. More...
 
bool SetTemporaryLanguage (const QString &language)
 SetTemporaryLanguage - method sets desired language as temporary language Temporary language is used for temporary language changes (single translation or multiple translations within defined code section). Primary use is for printed texts (printed ticket), where it is demanded to use default application language. When application changes its application states (and its UI widgets), global language is intended to use for this. More...
 
bool ResetTemporaryLanguageToGlobal ()
 ResetTemporaryLanguageToGlobal - method resets previously set temporary language back to global language. More...
 
QStringList GetSupportedLanguages () const
 GetSupportedLanguages - returns currently supported languages. More...
 
bool IsLanguageSupported (const QString &language) const
 IsLanguageSupported - returns if desired language is suported or not. More...
 
void LogLanguageSupport () const
 LogLanguageSupport - method writes supported and default language to application logs. More...
 

Static Public Attributes

static const QString DEFAULT_APPLICATION_LANGUAGE = "default"
 

Constructor & Destructor Documentation

ApplicationLanguageManager::ApplicationLanguageManager ( )
ApplicationLanguageManager::~ApplicationLanguageManager ( )

Member Function Documentation

QStringList ApplicationLanguageManager::GetSupportedLanguages ( ) const

GetSupportedLanguages - returns currently supported languages.

Returns
QStringList of supported languages (languages are represented by 2 character abbreviations (en, sk,.ru, ...) exception is "default" language)

Here is the caller graph for this function:

bool ApplicationLanguageManager::Init ( )

Here is the call graph for this function:

bool ApplicationLanguageManager::IsLanguageSupported ( const QString &  language) const

IsLanguageSupported - returns if desired language is suported or not.

Parameters
language- language which will be considered if supported
Returns
true if language is supported, false otherwise

Here is the call graph for this function:

void ApplicationLanguageManager::LogLanguageSupport ( ) const

LogLanguageSupport - method writes supported and default language to application logs.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ApplicationLanguageManager::ResetTemporaryLanguageToGlobal ( )

ResetTemporaryLanguageToGlobal - method resets previously set temporary language back to global language.

Returns
- true on success, false otherwise

Here is the caller graph for this function:

bool ApplicationLanguageManager::SetGlobalLanguage ( const QString &  language)

SetGlobalLanguage - method sets desired language as current global (startup) language.

Parameters
language- language to be set as global language
Returns
- true on success, false otherwise

Here is the caller graph for this function:

bool ApplicationLanguageManager::SetTemporaryLanguage ( const QString &  language)

SetTemporaryLanguage - method sets desired language as temporary language Temporary language is used for temporary language changes (single translation or multiple translations within defined code section). Primary use is for printed texts (printed ticket), where it is demanded to use default application language. When application changes its application states (and its UI widgets), global language is intended to use for this.

Parameters
language- language to be set as temporary language
Returns
- true on success, false otherwise

Here is the caller graph for this function:

Member Data Documentation

const QString ApplicationLanguageManager::DEFAULT_APPLICATION_LANGUAGE = "default"
static

The documentation for this class was generated from the following files: