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