mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps/i18n] Derive preferences from country
Each country comes with an set of preferences, built at compile time by apps/i18n.py, used to define : - the exam mode - the method for computing quartiles - the unit system in which to output the results with units Functions to access those preferences are available in via sharedGlobalPreferences. Change-Id: I220ebaa9b9e8954dfe33cd51936f47505b98978d
This commit is contained in:
committed by
Émilie Feral
parent
e2a6edd78f
commit
2b59509fdd
@@ -16,6 +16,9 @@ public:
|
||||
void setLanguage(I18n::Language language) { m_language = language; }
|
||||
I18n::Country country() const { return m_country; }
|
||||
void setCountry(I18n::Country country) { m_country = country; }
|
||||
I18n::AvailableExamModes availableExamModes() const { return I18n::CountryPreferencesArray[static_cast<uint8_t>(m_country)].availableExamModes; }
|
||||
I18n::MethodForQuartiles methodForQuartiles() const { return I18n::CountryPreferencesArray[static_cast<uint8_t>(m_country)].methodForQuartiles; }
|
||||
Poincare::Preferences::UnitFormat unitFormat() const { return I18n::CountryPreferencesArray[static_cast<uint8_t>(m_country)].unitFormat; }
|
||||
bool isInExamMode() const { return (int8_t)examMode() > 0; }
|
||||
ExamMode examMode() const;
|
||||
void setExamMode(ExamMode examMode);
|
||||
|
||||
Reference in New Issue
Block a user