23 #include "ip2ccountry.h"
28 IP2CCountry::IP2CCountry()
32 IP2CCountry::IP2CCountry(QString name)
33 :flag(nullptr), name(name)
37 IP2CCountry::IP2CCountry(
const QPixmap *flag, QString name)
38 :flag(flag), name(name)
42 bool IP2CCountry::isValid()
const
44 return !name.isEmpty();
49 class IP2CCountryTr :
public QObject
54 static QHash<QString, IP2CCountry> all()
56 QHash<QString, IP2CCountry> map;
63 map.insert(
"ANT",
IP2CCountry(tr(
"Netherlands Antilles")));
64 map.insert(
"ARE",
IP2CCountry(tr(
"United Arab Emirates")));
67 map.insert(
"ASM",
IP2CCountry(tr(
"American Samoa")));
69 map.insert(
"ATF",
IP2CCountry(tr(
"French Southern Territories")));
70 map.insert(
"ATG",
IP2CCountry(tr(
"Antigua and Barbuda")));
82 map.insert(
"BIH",
IP2CCountry(tr(
"Bosnia and Herzegovina")));
91 map.insert(
"BVT",
IP2CCountry(tr(
"Bouvet Island")));
93 map.insert(
"CAF",
IP2CCountry(tr(
"Central African Republic")));
95 map.insert(
"CCK",
IP2CCountry(tr(
"Cocos (Keeling) Islands")));
101 map.insert(
"COD",
IP2CCountry(tr(
"Congo, the Democratic Republic of the")));
103 map.insert(
"COK",
IP2CCountry(tr(
"Cook Islands")));
109 map.insert(
"CXR",
IP2CCountry(tr(
"Christmas Island")));
110 map.insert(
"CYM",
IP2CCountry(tr(
"Cayman Islands")));
112 map.insert(
"CZE",
IP2CCountry(tr(
"Czech Republic")));
117 map.insert(
"DOM",
IP2CCountry(tr(
"Dominican Republic")));
122 map.insert(
"ESH",
IP2CCountry(tr(
"Western Sahara")));
126 map.insert(
"EU",
IP2CCountry(tr(
"European Union")));
129 map.insert(
"FLK",
IP2CCountry(tr(
"Falkland Islands (Malvinas)")));
131 map.insert(
"FRO",
IP2CCountry(tr(
"Faroe Islands")));
132 map.insert(
"FSM",
IP2CCountry(tr(
"Micronesia, Federated States of")));
134 map.insert(
"GBR",
IP2CCountry(tr(
"United Kingdom")));
142 map.insert(
"GNB",
IP2CCountry(tr(
"Guinea-Bissau")));
143 map.insert(
"GNQ",
IP2CCountry(tr(
"Equatorial Guinea")));
148 map.insert(
"GUF",
IP2CCountry(tr(
"French Guiana")));
152 map.insert(
"HMD",
IP2CCountry(tr(
"Heard Island and McDonald Islands")));
160 map.insert(
"IOT",
IP2CCountry(tr(
"British Indian Ocean Territory")));
162 map.insert(
"IRN",
IP2CCountry(tr(
"Iran, Islamic Republic of")));
176 map.insert(
"KNA",
IP2CCountry(tr(
"Saint Kitts and Nevis")));
179 map.insert(
"LAO",
IP2CCountry(tr(
"Lao People's Democratic Republic")));
184 map.insert(
"LIE",
IP2CCountry(tr(
"Liechtenstein")));
193 map.insert(
"MDA",
IP2CCountry(tr(
"Moldova, Republic of")));
197 map.insert(
"MHL",
IP2CCountry(tr(
"Marshall Islands")));
198 map.insert(
"MKD",
IP2CCountry(tr(
"Macedonia, the former Yugoslav Republic of")));
204 map.insert(
"MNP",
IP2CCountry(tr(
"Northern Mariana Islands")));
214 map.insert(
"NCL",
IP2CCountry(tr(
"New Caledonia")));
216 map.insert(
"NFK",
IP2CCountry(tr(
"Norfolk Island")));
232 map.insert(
"PNG",
IP2CCountry(tr(
"Papua New Guinea")));
235 map.insert(
"PRK",
IP2CCountry(tr(
"Korea, Democratic People's Republic of")));
238 map.insert(
"PSE",
IP2CCountry(tr(
"Palestinian Territory, Occupied")));
239 map.insert(
"PYF",
IP2CCountry(tr(
"French Polynesia")));
243 map.insert(
"RUS",
IP2CCountry(tr(
"Russian Federation")));
245 map.insert(
"SAU",
IP2CCountry(tr(
"Saudi Arabia")));
249 map.insert(
"SGS",
IP2CCountry(tr(
"South Georgia and the South Sandwich Islands")));
250 map.insert(
"SHN",
IP2CCountry(tr(
"Saint Helena, Ascension and Tristan da Cunha")));
251 map.insert(
"SJM",
IP2CCountry(tr(
"Svalbard and Jan Mayen")));
252 map.insert(
"SLB",
IP2CCountry(tr(
"Solomon Islands")));
253 map.insert(
"SLE",
IP2CCountry(tr(
"Sierra Leone")));
257 map.insert(
"SPM",
IP2CCountry(tr(
"Saint Pierre and Miquelon")));
260 map.insert(
"STP",
IP2CCountry(tr(
"Sao Tome and Principe")));
267 map.insert(
"SYR",
IP2CCountry(tr(
"Syrian Arab Republic")));
268 map.insert(
"TCA",
IP2CCountry(tr(
"Turks and Caicos Islands")));
274 map.insert(
"TKM",
IP2CCountry(tr(
"Turkmenistan")));
277 map.insert(
"TTO",
IP2CCountry(tr(
"Trinidad and Tobago")));
282 map.insert(
"TZA",
IP2CCountry(tr(
"Tanzania, United Republic of")));
285 map.insert(
"UMI",
IP2CCountry(tr(
"United States Minor Outlying Islands")));
287 map.insert(
"USA",
IP2CCountry(tr(
"United States")));
289 map.insert(
"VAT",
IP2CCountry(tr(
"Holy See (Vatican City State)")));
290 map.insert(
"VCT",
IP2CCountry(tr(
"Saint Vincent and the Grenadines")));
292 map.insert(
"VGB",
IP2CCountry(tr(
"Virgin Islands, British")));
293 map.insert(
"VIR",
IP2CCountry(tr(
"Virgin Islands, U.S.")));
296 map.insert(
"WLF",
IP2CCountry(tr(
"Wallis and Futuna")));
299 map.insert(
"ZAF",
IP2CCountry(tr(
"South Africa")));
309 return IP2CCountryTr::all();
312 #include "ip2ccountry.moc"