Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
geometrize::dialog::LanguageSelectWidget::LanguageSelectWidgetImpl Class Reference
Collaboration diagram for geometrize::dialog::LanguageSelectWidget::LanguageSelectWidgetImpl:
Collaboration graph
[legend]

Public Member Functions

 LanguageSelectWidgetImpl (LanguageSelectWidget *pQ)
 
LanguageSelectWidgetImpl operator= (const LanguageSelectWidgetImpl &)=delete
 
 LanguageSelectWidgetImpl (const LanguageSelectWidgetImpl &)=delete
 
 ~LanguageSelectWidgetImpl ()
 
void onLanguageChange ()
 

Private Member Functions

void populateUi ()
 

Private Attributes

LanguageSelectWidgetq
 
std::unique_ptr
< Ui::LanguageSelectWidget > 
ui
 

Constructor & Destructor Documentation

geometrize::dialog::LanguageSelectWidget::LanguageSelectWidgetImpl::LanguageSelectWidgetImpl ( LanguageSelectWidget pQ)
inline
22  : q{pQ}, ui{std::make_unique<Ui::LanguageSelectWidget>()}
23  {
24  ui->setupUi(q);
25 
26  populateUi();
27  }
LanguageSelectWidget * q
Definition: languageselectwidget.cpp:62
std::unique_ptr< Ui::LanguageSelectWidget > ui
Definition: languageselectwidget.cpp:63
void populateUi()
Definition: languageselectwidget.cpp:42
geometrize::dialog::LanguageSelectWidget::LanguageSelectWidgetImpl::LanguageSelectWidgetImpl ( const LanguageSelectWidgetImpl )
delete
geometrize::dialog::LanguageSelectWidget::LanguageSelectWidgetImpl::~LanguageSelectWidgetImpl ( )
inline
32  {
33  }

Member Function Documentation

void geometrize::dialog::LanguageSelectWidget::LanguageSelectWidgetImpl::onLanguageChange ( )
inline
36  {
37  ui->retranslateUi(q);
38  populateUi();
39  }
LanguageSelectWidget * q
Definition: languageselectwidget.cpp:62
std::unique_ptr< Ui::LanguageSelectWidget > ui
Definition: languageselectwidget.cpp:63
void populateUi()
Definition: languageselectwidget.cpp:42

Here is the call graph for this function:

LanguageSelectWidgetImpl geometrize::dialog::LanguageSelectWidget::LanguageSelectWidgetImpl::operator= ( const LanguageSelectWidgetImpl )
delete
void geometrize::dialog::LanguageSelectWidget::LanguageSelectWidgetImpl::populateUi ( )
inlineprivate
43  {
45  const std::string localeName{prefs.getLocaleName()};
46  const QLocale locale{QString::fromStdString(localeName)};
47  ui->currentLanguageNameLabel->setText(locale.nativeLanguageName());
48  ui->currentCountryNameLabel->setText(locale.nativeCountryName());
49 
50  const QString extractedLocaleName{locale.name()};
51  const QIcon icon{geometrize::getFlagIconForLocaleCode(extractedLocaleName)};
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()));
56  }
57 
58  ui->currentLocaleIconLabel->setPixmap(QPixmap(":/icons/locate.png"));
59  ui->currentLocaleNameLabel->setText(locale.name());
60  }
The GlobalPreferences class models the preferences associated with the application as a whole...
Definition: globalpreferences.h:43
std::unique_ptr< Ui::LanguageSelectWidget > ui
Definition: languageselectwidget.cpp:63
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:96

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

LanguageSelectWidget* geometrize::dialog::LanguageSelectWidget::LanguageSelectWidgetImpl::q
private
std::unique_ptr<Ui::LanguageSelectWidget> geometrize::dialog::LanguageSelectWidget::LanguageSelectWidgetImpl::ui
private

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