23 #include "ip2ccountry.h"
27 IP2CCountry::IP2CCountry()
31 IP2CCountry::IP2CCountry(QString name)
32 :flag(nullptr), name(name)
36 IP2CCountry::IP2CCountry(
const QPixmap *flag, QString name)
37 :flag(flag), name(name)
41 bool IP2CCountry::isValid()
const
43 return !name.isEmpty();
48 class IP2CCountryTr :
public QObject
53 static QHash<QString, IP2CCountry> all()
55 QHash<QString, IP2CCountry> map;
62 map.insert(
"ANT",
IP2CCountry(tr(
"Netherlands Antilles")));
63 map.insert(
"ARE",
IP2CCountry(tr(
"United Arab Emirates")));
66 map.insert(
"ASM",
IP2CCountry(tr(
"American Samoa")));
68 map.insert(
"ATF",
IP2CCountry(tr(
"French Southern Territories")));
69 map.insert(
"ATG",
IP2CCountry(tr(
"Antigua and Barbuda")));
81 map.insert(
"BIH",
IP2CCountry(tr(
"Bosnia and Herzegovina")));
90 map.insert(
"BVT",
IP2CCountry(tr(
"Bouvet Island")));
92 map.insert(
"CAF",
IP2CCountry(tr(
"Central African Republic")));
94 map.insert(
"CCK",
IP2CCountry(tr(
"Cocos (Keeling) Islands")));
100 map.insert(
"COD",
IP2CCountry(tr(
"Congo, the Democratic Republic of the")));
102 map.insert(
"COK",
IP2CCountry(tr(
"Cook Islands")));
108 map.insert(
"CXR",
IP2CCountry(tr(
"Christmas Island")));
109 map.insert(
"CYM",
IP2CCountry(tr(
"Cayman Islands")));
111 map.insert(
"CZE",
IP2CCountry(tr(
"Czech Republic")));
116 map.insert(
"DOM",
IP2CCountry(tr(
"Dominican Republic")));
121 map.insert(
"ESH",
IP2CCountry(tr(
"Western Sahara")));
125 map.insert(
"EU",
IP2CCountry(tr(
"European Union")));
128 map.insert(
"FLK",
IP2CCountry(tr(
"Falkland Islands (Malvinas)")));
130 map.insert(
"FRO",
IP2CCountry(tr(
"Faroe Islands")));
131 map.insert(
"FSM",
IP2CCountry(tr(
"Micronesia, Federated States of")));
133 map.insert(
"GBR",
IP2CCountry(tr(
"United Kingdom")));
141 map.insert(
"GNB",
IP2CCountry(tr(
"Guinea-Bissau")));
142 map.insert(
"GNQ",
IP2CCountry(tr(
"Equatorial Guinea")));
147 map.insert(
"GUF",
IP2CCountry(tr(
"French Guiana")));
151 map.insert(
"HMD",
IP2CCountry(tr(
"Heard Island and McDonald Islands")));
159 map.insert(
"IOT",
IP2CCountry(tr(
"British Indian Ocean Territory")));
161 map.insert(
"IRN",
IP2CCountry(tr(
"Iran, Islamic Republic of")));
175 map.insert(
"KNA",
IP2CCountry(tr(
"Saint Kitts and Nevis")));
178 map.insert(
"LAO",
IP2CCountry(tr(
"Lao People's Democratic Republic")));
183 map.insert(
"LIE",
IP2CCountry(tr(
"Liechtenstein")));
192 map.insert(
"MDA",
IP2CCountry(tr(
"Moldova, Republic of")));
196 map.insert(
"MHL",
IP2CCountry(tr(
"Marshall Islands")));
197 map.insert(
"MKD",
IP2CCountry(tr(
"Macedonia, the former Yugoslav Republic of")));
203 map.insert(
"MNP",
IP2CCountry(tr(
"Northern Mariana Islands")));
213 map.insert(
"NCL",
IP2CCountry(tr(
"New Caledonia")));
215 map.insert(
"NFK",
IP2CCountry(tr(
"Norfolk Island")));
231 map.insert(
"PNG",
IP2CCountry(tr(
"Papua New Guinea")));
234 map.insert(
"PRK",
IP2CCountry(tr(
"Korea, Democratic People's Republic of")));
237 map.insert(
"PSE",
IP2CCountry(tr(
"Palestinian Territory, Occupied")));
238 map.insert(
"PYF",
IP2CCountry(tr(
"French Polynesia")));
242 map.insert(
"RUS",
IP2CCountry(tr(
"Russian Federation")));
244 map.insert(
"SAU",
IP2CCountry(tr(
"Saudi Arabia")));
248 map.insert(
"SGS",
IP2CCountry(tr(
"South Georgia and the South Sandwich Islands")));
249 map.insert(
"SHN",
IP2CCountry(tr(
"Saint Helena, Ascension and Tristan da Cunha")));
250 map.insert(
"SJM",
IP2CCountry(tr(
"Svalbard and Jan Mayen")));
251 map.insert(
"SLB",
IP2CCountry(tr(
"Solomon Islands")));
252 map.insert(
"SLE",
IP2CCountry(tr(
"Sierra Leone")));
256 map.insert(
"SPM",
IP2CCountry(tr(
"Saint Pierre and Miquelon")));
259 map.insert(
"STP",
IP2CCountry(tr(
"Sao Tome and Principe")));
266 map.insert(
"SYR",
IP2CCountry(tr(
"Syrian Arab Republic")));
267 map.insert(
"TCA",
IP2CCountry(tr(
"Turks and Caicos Islands")));
273 map.insert(
"TKM",
IP2CCountry(tr(
"Turkmenistan")));
276 map.insert(
"TTO",
IP2CCountry(tr(
"Trinidad and Tobago")));
281 map.insert(
"TZA",
IP2CCountry(tr(
"Tanzania, United Republic of")));
284 map.insert(
"UMI",
IP2CCountry(tr(
"United States Minor Outlying Islands")));
286 map.insert(
"USA",
IP2CCountry(tr(
"United States")));
288 map.insert(
"VAT",
IP2CCountry(tr(
"Holy See (Vatican City State)")));
289 map.insert(
"VCT",
IP2CCountry(tr(
"Saint Vincent and the Grenadines")));
291 map.insert(
"VGB",
IP2CCountry(tr(
"Virgin Islands, British")));
292 map.insert(
"VIR",
IP2CCountry(tr(
"Virgin Islands, U.S.")));
295 map.insert(
"WLF",
IP2CCountry(tr(
"Wallis and Futuna")));
298 map.insert(
"ZAF",
IP2CCountry(tr(
"South Africa")));
308 return IP2CCountryTr::all();
311 #include "ip2ccountry.moc"