#include <LanguageChangeDialog.h>
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. |
Makes list of available languages and lets user to change the language used in user interface of Xiaoning's Diary.
LanguageChangeDialog::LanguageChangeDialog | ( | mama_de_diary * | aParent | ) |
Constructor.
aParent | Pointer to mama_de_diary object. |
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.
languageNameList | List of names of languages. | |
languageLocaleList | List of locales. |
void LanguageChangeDialog::SetApplicationDir | ( | const QDir & | applicationDir | ) |
Stores the directory where application is located to QDir iApplicationDir.
applicationDir | Directory where application is located. |
QDir LanguageChangeDialog::iApplicationDir [private] |
Holds the directory where application is located.
QDir iApplicationDir
Ui_LanguageChangeDialog LanguageChangeDialog::ui |
Ui of the language change dialog.
Ui_LanguageChangeDialog ui