OpenLexocad  27.1
CountryTool.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <QLocale>
4 
5 namespace Base
6 {
7 class LX_BASE_EXPORT CountryTool
8 {
9 public:
10  static void init(); // is called automatically
11 
12  static QLocale::Country getCountryByNumeric(int numeric);
13  static QLocale::Country getCountryByAlpha2(const QString& alpha2);
14  static QLocale::Country getCountryByAlpha3(const QString& alpha3);
15  static QString getCountryName(QLocale::Country country);
16 
17 private:
18  static std::map<int, QLocale::Country> _numericCountry;
19  static std::map<QString, QLocale::Country> _alpha2Country;
20  static std::map<QString, QLocale::Country> _alpha3Country;
21  static std::map<QLocale::Country, int> _countryTranslation;
22 
23  static void _register(QLocale::Country country, int numeric, QString alpha2, QString alpha3, int translatorId = -1);
24 };
25 
26 } // namespace Base
Definition: CountryTool.h:7
Definition: AbstractXMLReader.h:5