/src/libtomahawk/infosystem/infoplugins/generic/chartsplugin_data_p.h

http://github.com/tomahawk-player/tomahawk · C Header · 805 lines · 773 code · 13 blank · 19 comment · 9 complexity · 9fec1bf7c3740aea65f64b03241aada6 MD5 · raw file

  1. /* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
  2. *
  3. * Copyright 2011, Leo Franchi <lfranchi@kde.org>
  4. * Parts copied from qlocale_data_p.h, copyright 2011 Nokia Corporation and/or its subsidiary(-ies).
  5. *
  6. * Tomahawk is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Tomahawk is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef CHARTSPLUGIN_DATA_P_H
  20. #define CHARTSPLUGIN_DATA_P_H
  21. #include <QtCore/qchar.h>
  22. #include <QLocale>
  23. namespace Tomahawk {
  24. namespace CountryUtils {
  25. static const unsigned char country_code_list[] =
  26. " \0" // AnyCountry
  27. "AF\0" // Afghanistan
  28. "AL\0" // Albania
  29. "DZ\0" // Algeria
  30. "AS\0" // AmericanSamoa
  31. "AD\0" // Andorra
  32. "AO\0" // Angola
  33. "AI\0" // Anguilla
  34. "AQ\0" // Antarctica
  35. "AG\0" // AntiguaAndBarbuda
  36. "AR\0" // Argentina
  37. "AM\0" // Armenia
  38. "AW\0" // Aruba
  39. "AU\0" // Australia
  40. "AT\0" // Austria
  41. "AZ\0" // Azerbaijan
  42. "BS\0" // Bahamas
  43. "BH\0" // Bahrain
  44. "BD\0" // Bangladesh
  45. "BB\0" // Barbados
  46. "BY\0" // Belarus
  47. "BE\0" // Belgium
  48. "BZ\0" // Belize
  49. "BJ\0" // Benin
  50. "BM\0" // Bermuda
  51. "BT\0" // Bhutan
  52. "BO\0" // Bolivia
  53. "BA\0" // BosniaAndHerzegowina
  54. "BW\0" // Botswana
  55. "BV\0" // BouvetIsland
  56. "BR\0" // Brazil
  57. "IO\0" // BritishIndianOceanTerritory
  58. "BN\0" // BruneiDarussalam
  59. "BG\0" // Bulgaria
  60. "BF\0" // BurkinaFaso
  61. "BI\0" // Burundi
  62. "KH\0" // Cambodia
  63. "CM\0" // Cameroon
  64. "CA\0" // Canada
  65. "CV\0" // CapeVerde
  66. "KY\0" // CaymanIslands
  67. "CF\0" // CentralAfricanRepublic
  68. "TD\0" // Chad
  69. "CL\0" // Chile
  70. "CN\0" // China
  71. "CX\0" // ChristmasIsland
  72. "CC\0" // CocosIslands
  73. "CO\0" // Colombia
  74. "KM\0" // Comoros
  75. "CD\0" // DemocraticRepublicOfCongo
  76. "CG\0" // PeoplesRepublicOfCongo
  77. "CK\0" // CookIslands
  78. "CR\0" // CostaRica
  79. "CI\0" // IvoryCoast
  80. "HR\0" // Croatia
  81. "CU\0" // Cuba
  82. "CY\0" // Cyprus
  83. "CZ\0" // CzechRepublic
  84. "DK\0" // Denmark
  85. "DJ\0" // Djibouti
  86. "DM\0" // Dominica
  87. "DO\0" // DominicanRepublic
  88. "TL\0" // EastTimor
  89. "EC\0" // Ecuador
  90. "EG\0" // Egypt
  91. "SV\0" // ElSalvador
  92. "GQ\0" // EquatorialGuinea
  93. "ER\0" // Eritrea
  94. "EE\0" // Estonia
  95. "ET\0" // Ethiopia
  96. "FK\0" // FalklandIslands
  97. "FO\0" // FaroeIslands
  98. "FJ\0" // Fiji
  99. "FI\0" // Finland
  100. "FR\0" // France
  101. "FX\0" // MetropolitanFrance
  102. "GF\0" // FrenchGuiana
  103. "PF\0" // FrenchPolynesia
  104. "TF\0" // FrenchSouthernTerritories
  105. "GA\0" // Gabon
  106. "GM\0" // Gambia
  107. "GE\0" // Georgia
  108. "DE\0" // Germany
  109. "GH\0" // Ghana
  110. "GI\0" // Gibraltar
  111. "GR\0" // Greece
  112. "GL\0" // Greenland
  113. "GD\0" // Grenada
  114. "GP\0" // Guadeloupe
  115. "GU\0" // Guam
  116. "GT\0" // Guatemala
  117. "GN\0" // Guinea
  118. "GW\0" // GuineaBissau
  119. "GY\0" // Guyana
  120. "HT\0" // Haiti
  121. "HM\0" // HeardAndMcDonaldIslands
  122. "HN\0" // Honduras
  123. "HK\0" // HongKong
  124. "HU\0" // Hungary
  125. "IS\0" // Iceland
  126. "IN\0" // India
  127. "ID\0" // Indonesia
  128. "IR\0" // Iran
  129. "IQ\0" // Iraq
  130. "IE\0" // Ireland
  131. "IL\0" // Israel
  132. "IT\0" // Italy
  133. "JM\0" // Jamaica
  134. "JP\0" // Japan
  135. "JO\0" // Jordan
  136. "KZ\0" // Kazakhstan
  137. "KE\0" // Kenya
  138. "KI\0" // Kiribati
  139. "KP\0" // DemocraticRepublicOfKorea
  140. "KR\0" // RepublicOfKorea
  141. "KW\0" // Kuwait
  142. "KG\0" // Kyrgyzstan
  143. "LA\0" // Lao
  144. "LV\0" // Latvia
  145. "LB\0" // Lebanon
  146. "LS\0" // Lesotho
  147. "LR\0" // Liberia
  148. "LY\0" // LibyanArabJamahiriya
  149. "LI\0" // Liechtenstein
  150. "LT\0" // Lithuania
  151. "LU\0" // Luxembourg
  152. "MO\0" // Macau
  153. "MK\0" // Macedonia
  154. "MG\0" // Madagascar
  155. "MW\0" // Malawi
  156. "MY\0" // Malaysia
  157. "MV\0" // Maldives
  158. "ML\0" // Mali
  159. "MT\0" // Malta
  160. "MH\0" // MarshallIslands
  161. "MQ\0" // Martinique
  162. "MR\0" // Mauritania
  163. "MU\0" // Mauritius
  164. "YT\0" // Mayotte
  165. "MX\0" // Mexico
  166. "FM\0" // Micronesia
  167. "MD\0" // Moldova
  168. "MC\0" // Monaco
  169. "MN\0" // Mongolia
  170. "MS\0" // Montserrat
  171. "MA\0" // Morocco
  172. "MZ\0" // Mozambique
  173. "MM\0" // Myanmar
  174. "NA\0" // Namibia
  175. "NR\0" // Nauru
  176. "NP\0" // Nepal
  177. "NL\0" // Netherlands
  178. "AN\0" // NetherlandsAntilles
  179. "NC\0" // NewCaledonia
  180. "NZ\0" // NewZealand
  181. "NI\0" // Nicaragua
  182. "NE\0" // Niger
  183. "NG\0" // Nigeria
  184. "NU\0" // Niue
  185. "NF\0" // NorfolkIsland
  186. "MP\0" // NorthernMarianaIslands
  187. "NO\0" // Norway
  188. "OM\0" // Oman
  189. "PK\0" // Pakistan
  190. "PW\0" // Palau
  191. "PS\0" // PalestinianTerritory
  192. "PA\0" // Panama
  193. "PG\0" // PapuaNewGuinea
  194. "PY\0" // Paraguay
  195. "PE\0" // Peru
  196. "PH\0" // Philippines
  197. "PN\0" // Pitcairn
  198. "PL\0" // Poland
  199. "PT\0" // Portugal
  200. "PR\0" // PuertoRico
  201. "QA\0" // Qatar
  202. "RE\0" // Reunion
  203. "RO\0" // Romania
  204. "RU\0" // RussianFederation
  205. "RW\0" // Rwanda
  206. "KN\0" // SaintKittsAndNevis
  207. "LC\0" // StLucia
  208. "VC\0" // StVincentAndTheGrenadines
  209. "WS\0" // Samoa
  210. "SM\0" // SanMarino
  211. "ST\0" // SaoTomeAndPrincipe
  212. "SA\0" // SaudiArabia
  213. "SN\0" // Senegal
  214. "SC\0" // Seychelles
  215. "SL\0" // SierraLeone
  216. "SG\0" // Singapore
  217. "SK\0" // Slovakia
  218. "SI\0" // Slovenia
  219. "SB\0" // SolomonIslands
  220. "SO\0" // Somalia
  221. "ZA\0" // SouthAfrica
  222. "GS\0" // SouthGeorgiaAndTheSouthSandwichIslands
  223. "ES\0" // Spain
  224. "LK\0" // SriLanka
  225. "SH\0" // StHelena
  226. "PM\0" // StPierreAndMiquelon
  227. "SD\0" // Sudan
  228. "SR\0" // Suriname
  229. "SJ\0" // SvalbardAndJanMayenIslands
  230. "SZ\0" // Swaziland
  231. "SE\0" // Sweden
  232. "CH\0" // Switzerland
  233. "SY\0" // SyrianArabRepublic
  234. "TW\0" // Taiwan
  235. "TJ\0" // Tajikistan
  236. "TZ\0" // Tanzania
  237. "TH\0" // Thailand
  238. "TG\0" // Togo
  239. "TK\0" // Tokelau
  240. "TO\0" // Tonga
  241. "TT\0" // TrinidadAndTobago
  242. "TN\0" // Tunisia
  243. "TR\0" // Turkey
  244. "TM\0" // Turkmenistan
  245. "TC\0" // TurksAndCaicosIslands
  246. "TV\0" // Tuvalu
  247. "UG\0" // Uganda
  248. "UA\0" // Ukraine
  249. "AE\0" // UnitedArabEmirates
  250. "GB\0" // UnitedKingdom
  251. "US\0" // UnitedStates
  252. "UM\0" // UnitedStatesMinorOutlyingIslands
  253. "UY\0" // Uruguay
  254. "UZ\0" // Uzbekistan
  255. "VU\0" // Vanuatu
  256. "VA\0" // VaticanCityState
  257. "VE\0" // Venezuela
  258. "VN\0" // VietNam
  259. "VG\0" // BritishVirginIslands
  260. "VI\0" // USVirginIslands
  261. "WF\0" // WallisAndFutunaIslands
  262. "EH\0" // WesternSahara
  263. "YE\0" // Yemen
  264. "YU\0" // Yugoslavia
  265. "ZM\0" // Zambia
  266. "ZW\0" // Zimbabwe
  267. "CS\0" // SerbiaAndMontenegro
  268. "ME\0" // Montenegro
  269. "RS\0" // Serbia
  270. "BL\0" // Saint Barthelemy
  271. "MF\0" // Saint Martin
  272. "419" // LatinAmericaAndTheCaribbean
  273. ;
  274. static const char country_name_list[] =
  275. "Default\0"
  276. "Afghanistan\0"
  277. "Albania\0"
  278. "Algeria\0"
  279. "AmericanSamoa\0"
  280. "Andorra\0"
  281. "Angola\0"
  282. "Anguilla\0"
  283. "Antarctica\0"
  284. "AntiguaAndBarbuda\0"
  285. "Argentina\0"
  286. "Armenia\0"
  287. "Aruba\0"
  288. "Australia\0"
  289. "Austria\0"
  290. "Azerbaijan\0"
  291. "Bahamas\0"
  292. "Bahrain\0"
  293. "Bangladesh\0"
  294. "Barbados\0"
  295. "Belarus\0"
  296. "Belgium\0"
  297. "Belize\0"
  298. "Benin\0"
  299. "Bermuda\0"
  300. "Bhutan\0"
  301. "Bolivia\0"
  302. "BosniaAndHerzegowina\0"
  303. "Botswana\0"
  304. "BouvetIsland\0"
  305. "Brazil\0"
  306. "BritishIndianOceanTerritory\0"
  307. "BruneiDarussalam\0"
  308. "Bulgaria\0"
  309. "BurkinaFaso\0"
  310. "Burundi\0"
  311. "Cambodia\0"
  312. "Cameroon\0"
  313. "Canada\0"
  314. "CapeVerde\0"
  315. "CaymanIslands\0"
  316. "CentralAfricanRepublic\0"
  317. "Chad\0"
  318. "Chile\0"
  319. "China\0"
  320. "ChristmasIsland\0"
  321. "CocosIslands\0"
  322. "Colombia\0"
  323. "Comoros\0"
  324. "DemocraticRepublicOfCongo\0"
  325. "PeoplesRepublicOfCongo\0"
  326. "CookIslands\0"
  327. "CostaRica\0"
  328. "IvoryCoast\0"
  329. "Croatia\0"
  330. "Cuba\0"
  331. "Cyprus\0"
  332. "CzechRepublic\0"
  333. "Denmark\0"
  334. "Djibouti\0"
  335. "Dominica\0"
  336. "DominicanRepublic\0"
  337. "EastTimor\0"
  338. "Ecuador\0"
  339. "Egypt\0"
  340. "ElSalvador\0"
  341. "EquatorialGuinea\0"
  342. "Eritrea\0"
  343. "Estonia\0"
  344. "Ethiopia\0"
  345. "FalklandIslands\0"
  346. "FaroeIslands\0"
  347. "Fiji\0"
  348. "Finland\0"
  349. "France\0"
  350. "MetropolitanFrance\0"
  351. "FrenchGuiana\0"
  352. "FrenchPolynesia\0"
  353. "FrenchSouthernTerritories\0"
  354. "Gabon\0"
  355. "Gambia\0"
  356. "Georgia\0"
  357. "Germany\0"
  358. "Ghana\0"
  359. "Gibraltar\0"
  360. "Greece\0"
  361. "Greenland\0"
  362. "Grenada\0"
  363. "Guadeloupe\0"
  364. "Guam\0"
  365. "Guatemala\0"
  366. "Guinea\0"
  367. "GuineaBissau\0"
  368. "Guyana\0"
  369. "Haiti\0"
  370. "HeardAndMcDonaldIslands\0"
  371. "Honduras\0"
  372. "HongKong\0"
  373. "Hungary\0"
  374. "Iceland\0"
  375. "India\0"
  376. "Indonesia\0"
  377. "Iran\0"
  378. "Iraq\0"
  379. "Ireland\0"
  380. "Israel\0"
  381. "Italy\0"
  382. "Jamaica\0"
  383. "Japan\0"
  384. "Jordan\0"
  385. "Kazakhstan\0"
  386. "Kenya\0"
  387. "Kiribati\0"
  388. "DemocraticRepublicOfKorea\0"
  389. "RepublicOfKorea\0"
  390. "Kuwait\0"
  391. "Kyrgyzstan\0"
  392. "Lao\0"
  393. "Latvia\0"
  394. "Lebanon\0"
  395. "Lesotho\0"
  396. "Liberia\0"
  397. "LibyanArabJamahiriya\0"
  398. "Liechtenstein\0"
  399. "Lithuania\0"
  400. "Luxembourg\0"
  401. "Macau\0"
  402. "Macedonia\0"
  403. "Madagascar\0"
  404. "Malawi\0"
  405. "Malaysia\0"
  406. "Maldives\0"
  407. "Mali\0"
  408. "Malta\0"
  409. "MarshallIslands\0"
  410. "Martinique\0"
  411. "Mauritania\0"
  412. "Mauritius\0"
  413. "Mayotte\0"
  414. "Mexico\0"
  415. "Micronesia\0"
  416. "Moldova\0"
  417. "Monaco\0"
  418. "Mongolia\0"
  419. "Montserrat\0"
  420. "Morocco\0"
  421. "Mozambique\0"
  422. "Myanmar\0"
  423. "Namibia\0"
  424. "Nauru\0"
  425. "Nepal\0"
  426. "Netherlands\0"
  427. "NetherlandsAntilles\0"
  428. "NewCaledonia\0"
  429. "NewZealand\0"
  430. "Nicaragua\0"
  431. "Niger\0"
  432. "Nigeria\0"
  433. "Niue\0"
  434. "NorfolkIsland\0"
  435. "NorthernMarianaIslands\0"
  436. "Norway\0"
  437. "Oman\0"
  438. "Pakistan\0"
  439. "Palau\0"
  440. "PalestinianTerritory\0"
  441. "Panama\0"
  442. "PapuaNewGuinea\0"
  443. "Paraguay\0"
  444. "Peru\0"
  445. "Philippines\0"
  446. "Pitcairn\0"
  447. "Poland\0"
  448. "Portugal\0"
  449. "PuertoRico\0"
  450. "Qatar\0"
  451. "Reunion\0"
  452. "Romania\0"
  453. "RussianFederation\0"
  454. "Rwanda\0"
  455. "SaintKittsAndNevis\0"
  456. "StLucia\0"
  457. "StVincentAndTheGrenadines\0"
  458. "Samoa\0"
  459. "SanMarino\0"
  460. "SaoTomeAndPrincipe\0"
  461. "SaudiArabia\0"
  462. "Senegal\0"
  463. "Seychelles\0"
  464. "SierraLeone\0"
  465. "Singapore\0"
  466. "Slovakia\0"
  467. "Slovenia\0"
  468. "SolomonIslands\0"
  469. "Somalia\0"
  470. "SouthAfrica\0"
  471. "SouthGeorgiaAndTheSouthSandwichIslands\0"
  472. "Spain\0"
  473. "SriLanka\0"
  474. "StHelena\0"
  475. "StPierreAndMiquelon\0"
  476. "Sudan\0"
  477. "Suriname\0"
  478. "SvalbardAndJanMayenIslands\0"
  479. "Swaziland\0"
  480. "Sweden\0"
  481. "Switzerland\0"
  482. "SyrianArabRepublic\0"
  483. "Taiwan\0"
  484. "Tajikistan\0"
  485. "Tanzania\0"
  486. "Thailand\0"
  487. "Togo\0"
  488. "Tokelau\0"
  489. "Tonga\0"
  490. "TrinidadAndTobago\0"
  491. "Tunisia\0"
  492. "Turkey\0"
  493. "Turkmenistan\0"
  494. "TurksAndCaicosIslands\0"
  495. "Tuvalu\0"
  496. "Uganda\0"
  497. "Ukraine\0"
  498. "UnitedArabEmirates\0"
  499. "UnitedKingdom\0"
  500. "UnitedStates\0"
  501. "UnitedStatesMinorOutlyingIslands\0"
  502. "Uruguay\0"
  503. "Uzbekistan\0"
  504. "Vanuatu\0"
  505. "VaticanCityState\0"
  506. "Venezuela\0"
  507. "VietNam\0"
  508. "BritishVirginIslands\0"
  509. "USVirginIslands\0"
  510. "WallisAndFutunaIslands\0"
  511. "WesternSahara\0"
  512. "Yemen\0"
  513. "Yugoslavia\0"
  514. "Zambia\0"
  515. "Zimbabwe\0"
  516. "SerbiaAndMontenegro\0"
  517. "Montenegro\0"
  518. "Serbia\0"
  519. "Saint Barthelemy\0"
  520. "Saint Martin\0"
  521. "LatinAmericaAndTheCaribbean\0"
  522. ;
  523. static const quint16 country_name_index[] = {
  524. 0, // AnyCountry
  525. 8, // Afghanistan
  526. 20, // Albania
  527. 28, // Algeria
  528. 36, // AmericanSamoa
  529. 50, // Andorra
  530. 58, // Angola
  531. 65, // Anguilla
  532. 74, // Antarctica
  533. 85, // AntiguaAndBarbuda
  534. 103, // Argentina
  535. 113, // Armenia
  536. 121, // Aruba
  537. 127, // Australia
  538. 137, // Austria
  539. 145, // Azerbaijan
  540. 156, // Bahamas
  541. 164, // Bahrain
  542. 172, // Bangladesh
  543. 183, // Barbados
  544. 192, // Belarus
  545. 200, // Belgium
  546. 208, // Belize
  547. 215, // Benin
  548. 221, // Bermuda
  549. 229, // Bhutan
  550. 236, // Bolivia
  551. 244, // BosniaAndHerzegowina
  552. 265, // Botswana
  553. 274, // BouvetIsland
  554. 287, // Brazil
  555. 294, // BritishIndianOceanTerritory
  556. 322, // BruneiDarussalam
  557. 339, // Bulgaria
  558. 348, // BurkinaFaso
  559. 360, // Burundi
  560. 368, // Cambodia
  561. 377, // Cameroon
  562. 386, // Canada
  563. 393, // CapeVerde
  564. 403, // CaymanIslands
  565. 417, // CentralAfricanRepublic
  566. 440, // Chad
  567. 445, // Chile
  568. 451, // China
  569. 457, // ChristmasIsland
  570. 473, // CocosIslands
  571. 486, // Colombia
  572. 495, // Comoros
  573. 503, // DemocraticRepublicOfCongo
  574. 529, // PeoplesRepublicOfCongo
  575. 552, // CookIslands
  576. 564, // CostaRica
  577. 574, // IvoryCoast
  578. 585, // Croatia
  579. 593, // Cuba
  580. 598, // Cyprus
  581. 605, // CzechRepublic
  582. 619, // Denmark
  583. 627, // Djibouti
  584. 636, // Dominica
  585. 645, // DominicanRepublic
  586. 663, // EastTimor
  587. 673, // Ecuador
  588. 681, // Egypt
  589. 687, // ElSalvador
  590. 698, // EquatorialGuinea
  591. 715, // Eritrea
  592. 723, // Estonia
  593. 731, // Ethiopia
  594. 740, // FalklandIslands
  595. 756, // FaroeIslands
  596. 769, // Fiji
  597. 774, // Finland
  598. 782, // France
  599. 789, // MetropolitanFrance
  600. 808, // FrenchGuiana
  601. 821, // FrenchPolynesia
  602. 837, // FrenchSouthernTerritories
  603. 863, // Gabon
  604. 869, // Gambia
  605. 876, // Georgia
  606. 884, // Germany
  607. 892, // Ghana
  608. 898, // Gibraltar
  609. 908, // Greece
  610. 915, // Greenland
  611. 925, // Grenada
  612. 933, // Guadeloupe
  613. 944, // Guam
  614. 949, // Guatemala
  615. 959, // Guinea
  616. 966, // GuineaBissau
  617. 979, // Guyana
  618. 986, // Haiti
  619. 992, // HeardAndMcDonaldIslands
  620. 1016, // Honduras
  621. 1025, // HongKong
  622. 1034, // Hungary
  623. 1042, // Iceland
  624. 1050, // India
  625. 1056, // Indonesia
  626. 1066, // Iran
  627. 1071, // Iraq
  628. 1076, // Ireland
  629. 1084, // Israel
  630. 1091, // Italy
  631. 1097, // Jamaica
  632. 1105, // Japan
  633. 1111, // Jordan
  634. 1118, // Kazakhstan
  635. 1129, // Kenya
  636. 1135, // Kiribati
  637. 1144, // DemocraticRepublicOfKorea
  638. 1170, // RepublicOfKorea
  639. 1186, // Kuwait
  640. 1193, // Kyrgyzstan
  641. 1204, // Lao
  642. 1208, // Latvia
  643. 1215, // Lebanon
  644. 1223, // Lesotho
  645. 1231, // Liberia
  646. 1239, // LibyanArabJamahiriya
  647. 1260, // Liechtenstein
  648. 1274, // Lithuania
  649. 1284, // Luxembourg
  650. 1295, // Macau
  651. 1301, // Macedonia
  652. 1311, // Madagascar
  653. 1322, // Malawi
  654. 1329, // Malaysia
  655. 1338, // Maldives
  656. 1347, // Mali
  657. 1352, // Malta
  658. 1358, // MarshallIslands
  659. 1374, // Martinique
  660. 1385, // Mauritania
  661. 1396, // Mauritius
  662. 1406, // Mayotte
  663. 1414, // Mexico
  664. 1421, // Micronesia
  665. 1432, // Moldova
  666. 1440, // Monaco
  667. 1447, // Mongolia
  668. 1456, // Montserrat
  669. 1467, // Morocco
  670. 1475, // Mozambique
  671. 1486, // Myanmar
  672. 1494, // Namibia
  673. 1502, // Nauru
  674. 1508, // Nepal
  675. 1514, // Netherlands
  676. 1526, // NetherlandsAntilles
  677. 1546, // NewCaledonia
  678. 1559, // NewZealand
  679. 1570, // Nicaragua
  680. 1580, // Niger
  681. 1586, // Nigeria
  682. 1594, // Niue
  683. 1599, // NorfolkIsland
  684. 1613, // NorthernMarianaIslands
  685. 1636, // Norway
  686. 1643, // Oman
  687. 1648, // Pakistan
  688. 1657, // Palau
  689. 1663, // PalestinianTerritory
  690. 1684, // Panama
  691. 1691, // PapuaNewGuinea
  692. 1706, // Paraguay
  693. 1715, // Peru
  694. 1720, // Philippines
  695. 1732, // Pitcairn
  696. 1741, // Poland
  697. 1748, // Portugal
  698. 1757, // PuertoRico
  699. 1768, // Qatar
  700. 1774, // Reunion
  701. 1782, // Romania
  702. 1790, // RussianFederation
  703. 1808, // Rwanda
  704. 1815, // SaintKittsAndNevis
  705. 1834, // StLucia
  706. 1842, // StVincentAndTheGrenadines
  707. 1868, // Samoa
  708. 1874, // SanMarino
  709. 1884, // SaoTomeAndPrincipe
  710. 1903, // SaudiArabia
  711. 1915, // Senegal
  712. 1923, // Seychelles
  713. 1934, // SierraLeone
  714. 1946, // Singapore
  715. 1956, // Slovakia
  716. 1965, // Slovenia
  717. 1974, // SolomonIslands
  718. 1989, // Somalia
  719. 1997, // SouthAfrica
  720. 2009, // SouthGeorgiaAndTheSouthSandwichIslands
  721. 2048, // Spain
  722. 2054, // SriLanka
  723. 2063, // StHelena
  724. 2072, // StPierreAndMiquelon
  725. 2092, // Sudan
  726. 2098, // Suriname
  727. 2107, // SvalbardAndJanMayenIslands
  728. 2134, // Swaziland
  729. 2144, // Sweden
  730. 2151, // Switzerland
  731. 2163, // SyrianArabRepublic
  732. 2182, // Taiwan
  733. 2189, // Tajikistan
  734. 2200, // Tanzania
  735. 2209, // Thailand
  736. 2218, // Togo
  737. 2223, // Tokelau
  738. 2231, // Tonga
  739. 2237, // TrinidadAndTobago
  740. 2255, // Tunisia
  741. 2263, // Turkey
  742. 2270, // Turkmenistan
  743. 2283, // TurksAndCaicosIslands
  744. 2305, // Tuvalu
  745. 2312, // Uganda
  746. 2319, // Ukraine
  747. 2327, // UnitedArabEmirates
  748. 2346, // UnitedKingdom
  749. 2360, // UnitedStates
  750. 2373, // UnitedStatesMinorOutlyingIslands
  751. 2406, // Uruguay
  752. 2414, // Uzbekistan
  753. 2425, // Vanuatu
  754. 2433, // VaticanCityState
  755. 2450, // Venezuela
  756. 2460, // VietNam
  757. 2468, // BritishVirginIslands
  758. 2489, // USVirginIslands
  759. 2505, // WallisAndFutunaIslands
  760. 2528, // WesternSahara
  761. 2542, // Yemen
  762. 2548, // Yugoslavia
  763. 2559, // Zambia
  764. 2566, // Zimbabwe
  765. 2575, // SerbiaAndMontenegro
  766. 2595, // Montenegro
  767. 2606, // Serbia
  768. 2613, // Saint Barthelemy
  769. 2630, // Saint Martin
  770. 2643, // LatinAmericaAndTheCaribbean
  771. };
  772. // Assumes that code is a 2 letter code
  773. static QString fullCountryFromCode(const QString& countryCode)
  774. {
  775. ushort uc1 = countryCode[0].toUpper().unicode();
  776. ushort uc2 = countryCode[1].toUpper().unicode();
  777. ushort uc3 = QChar('\0').unicode(); // No, not dealign with LatinAmericaAndTheCaribbean for convenience
  778. const unsigned char *c = country_code_list;
  779. for (; *c != 0; c += 3) {
  780. if (uc1 == c[0] && uc2 == c[1] && uc3 == c[2])
  781. {
  782. uint country = (uint)((c - country_code_list)/3);
  783. if (country > uint(QLocale::LastCountry))
  784. return QLatin1String("Unknown");
  785. return QString(country_name_list + country_name_index[country]);
  786. }
  787. }
  788. return QString("Unknown");
  789. }
  790. }
  791. }
  792. #endif