46 const QLocale locale{QString::fromStdString(localeName)};
47 ui->currentLanguageNameLabel->setText(locale.nativeLanguageName());
48 ui->currentCountryNameLabel->setText(locale.nativeCountryName());
50 const QString extractedLocaleName{locale.name()};
52 assert(!icon.isNull());
53 assert(!icon.availableSizes().empty());
54 if(!icon.isNull() && !icon.availableSizes().empty()) {
55 ui->currentLanguageFlagLabel->setPixmap(icon.pixmap(icon.availableSizes().last()));
58 ui->currentLocaleIconLabel->setPixmap(QPixmap(
":/icons/locate.png"));
59 ui->currentLocaleNameLabel->setText(locale.name());
The GlobalPreferences class models the preferences associated with the application as a whole...
Definition: globalpreferences.h:43
geometrize::preferences::GlobalPreferences & getGlobalPreferences()
getGlobalPreferences Shorthand function that gets a reference to the shared global preferences object...
Definition: globalpreferences.cpp:32
std::string getLocaleName() const
getLocaleName Gets the locale name in the format "language[_script][_country]". language is a lowerca...
Definition: globalpreferences.cpp:668
QIcon getFlagIconForLocaleCode(const QString &localeCode)
getFlagIconForLocaleCode Gets a representative national flag for the given locale code...
Definition: localization.cpp:97