LanguageChangeDialog Class Reference

Dialog for changing the language of user interface. More...

#include <LanguageChangeDialog.h>

List of all members.

Public Slots

void accept ()
 Change language and hide dialog.
void apply ()
 Change language without hiding dialog.

Signals

void languageChanged ()
 Signal mama_de_diary object that ui components need to reload the texts for their components.

Public Member Functions

 LanguageChangeDialog (mama_de_diary *aParent)
 Constructor.
void PopulateList (const QStringList &languageNameList, const QStringList &languageLocaleList)
 Generates list of available languages according to the language name and locale lists provided by caller.
void SetApplicationDir (const QDir &applicationDir)
 Stores the directory where application is located to QDir iApplicationDir.
void HandleUiLanguageChange ()
 Reload the texts in elemnets.

Public Attributes

Ui_LanguageChangeDialog ui
 Ui of the language change dialog.

Private Attributes

QDir iApplicationDir
 Holds the directory where application is located.


Detailed Description

Dialog for changing the language of user interface.

Makes list of available languages and lets user to change the language used in user interface of Xiaoning's Diary.


Constructor & Destructor Documentation

LanguageChangeDialog::LanguageChangeDialog ( mama_de_diary *  aParent  ) 

Constructor.

Parameters:
aParent Pointer to mama_de_diary object.
Intiates Ui of the dialog and connects aParent to languageChanged signal. mama_de_diary object is quite central part of this whole application and tells the other components to update their the texts on their components to newly selected language.


Member Function Documentation

void LanguageChangeDialog::accept (  )  [slot]

Change language and hide dialog.

Called when user clicks accept in language change dialog. emits languageChanged() signal and hides the dialog.

void LanguageChangeDialog::apply (  )  [slot]

Change language without hiding dialog.

Called when user clicks apply in language change dialog. emits languageChanged() signal.

void LanguageChangeDialog::HandleUiLanguageChange (  ) 

Reload the texts in elemnets.

Called by Xiaoning's Diary when reload of UI language is required. This may be during start of the program or when user changes the UI language.

void LanguageChangeDialog::languageChanged (  )  [signal]

Signal mama_de_diary object that ui components need to reload the texts for their components.

Emitted when user clicks apply or accept in dialog.

void LanguageChangeDialog::PopulateList ( const QStringList &  languageNameList,
const QStringList &  languageLocaleList 
)

Generates list of available languages according to the language name and locale lists provided by caller.

Parameters:
languageNameList List of names of languages.
languageLocaleList List of locales.
See also:
Language packs

void LanguageChangeDialog::SetApplicationDir ( const QDir &  applicationDir  ) 

Stores the directory where application is located to QDir iApplicationDir.

Parameters:
applicationDir Directory where application is located.
The application directory is needed when calling UiLocaleLoader::LoadLanguage(const QString &localeString, const QDir &applicationDir) from accept() and apply().


Member Data Documentation

Holds the directory where application is located.

QDir iApplicationDir

Ui_LanguageChangeDialog LanguageChangeDialog::ui

Ui of the language change dialog.

Ui_LanguageChangeDialog ui


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

Generated on Thu Mar 3 17:42:04 2011 for Xiaoning's Diary by  doxygen 1.5.9