import QtQuick 2.0

ListModel {
    id: countryNameModel
    ListElement {code: "AF"}
    ListElement {code: "AX"}
    ListElement {code: "AL"}
    ListElement {code: "DZ"}
    ListElement {code: "AS"}
    ListElement {code: "AD"}
    ListElement {code: "AO"}
    ListElement {code: "AI"}
    ListElement {code: "AQ"}
    ListElement {code: "AG"}
    ListElement {code: "AR"}
    ListElement {code: "AM"}
    ListElement {code: "AW"}
    ListElement {code: "AU"}
    ListElement {code: "AT"}
    ListElement {code: "AZ"}
    ListElement {code: "BS"}
    ListElement {code: "BH"}
    ListElement {code: "BD"}
    ListElement {code: "BB"}
    ListElement {code: "BY"}
    ListElement {code: "BE"}
    ListElement {code: "BZ"}
    ListElement {code: "BJ"}
    ListElement {code: "BM"}
    ListElement {code: "BT"}
    ListElement {code: "BO"}
    ListElement {code: "BA"}
    ListElement {code: "BW"}
    ListElement {code: "BV"}
    ListElement {code: "BR"}
    ListElement {code: "IO"}
    ListElement {code: "VG"}
    ListElement {code: "BN"}
    ListElement {code: "BG"}
    ListElement {code: "BF"}
    ListElement {code: "BI"}
    ListElement {code: "KH"}
    ListElement {code: "CM"}
    ListElement {code: "CA"}
    ListElement {code: "CV"}
    ListElement {code: "BQ"}
    ListElement {code: "KY"}
    ListElement {code: "CF"}
    ListElement {code: "TD"}
    ListElement {code: "CL"}
    ListElement {code: "CN"}
    ListElement {code: "CX"}
    ListElement {code: "CC"}
    ListElement {code: "CO"}
    ListElement {code: "KM"}
    ListElement {code: "CG"}
    ListElement {code: "CD"}
    ListElement {code: "CK"}
    ListElement {code: "CR"}
    ListElement {code: "CI"}
    ListElement {code: "HR"}
    ListElement {code: "CU"}
    ListElement {code: "CW"}
    ListElement {code: "CY"}
    ListElement {code: "CZ"}
    ListElement {code: "DK"}
    ListElement {code: "DJ"}
    ListElement {code: "DM"}
    ListElement {code: "DO"}
    ListElement {code: "EC"}
    ListElement {code: "EG"}
    ListElement {code: "SV"}
    ListElement {code: "GQ"}
    ListElement {code: "ER"}
    ListElement {code: "EE"}
    ListElement {code: "SZ"}
    ListElement {code: "ET"}
    ListElement {code: "FK"}
    ListElement {code: "FO"}
    ListElement {code: "FJ"}
    ListElement {code: "FI"}
    ListElement {code: "FR"}
    ListElement {code: "GF"}
    ListElement {code: "PF"}
    ListElement {code: "TF"}
    ListElement {code: "GA"}
    ListElement {code: "GM"}
    ListElement {code: "GE"}
    ListElement {code: "DE"}
    ListElement {code: "GH"}
    ListElement {code: "GI"}
    ListElement {code: "GR"}
    ListElement {code: "GL"}
    ListElement {code: "GD"}
    ListElement {code: "GP"}
    ListElement {code: "GU"}
    ListElement {code: "GT"}
    ListElement {code: "GG"}
    ListElement {code: "GN"}
    ListElement {code: "GW"}
    ListElement {code: "GY"}
    ListElement {code: "HT"}
    ListElement {code: "HM"}
    ListElement {code: "HN"}
    ListElement {code: "HK"}
    ListElement {code: "HU"}
    ListElement {code: "IS"}
    ListElement {code: "IN"}
    ListElement {code: "ID"}
    ListElement {code: "IR"}
    ListElement {code: "IQ"}
    ListElement {code: "IE"}
    ListElement {code: "IM"}
    ListElement {code: "IL"}
    ListElement {code: "IT"}
    ListElement {code: "JM"}
    ListElement {code: "JP"}
    ListElement {code: "JE"}
    ListElement {code: "JO"}
    ListElement {code: "KZ"}
    ListElement {code: "KE"}
    ListElement {code: "KI"}
    ListElement {code: "KW"}
    ListElement {code: "KG"}
    ListElement {code: "LA"}
    ListElement {code: "LV"}
    ListElement {code: "LB"}
    ListElement {code: "LS"}
    ListElement {code: "LR"}
    ListElement {code: "LY"}
    ListElement {code: "LI"}
    ListElement {code: "LT"}
    ListElement {code: "LU"}
    ListElement {code: "MO"}
    ListElement {code: "MG"}
    ListElement {code: "MW"}
    ListElement {code: "MY"}
    ListElement {code: "MV"}
    ListElement {code: "ML"}
    ListElement {code: "MT"}
    ListElement {code: "MH"}
    ListElement {code: "MQ"}
    ListElement {code: "MR"}
    ListElement {code: "MU"}
    ListElement {code: "YT"}
    ListElement {code: "MX"}
    ListElement {code: "FM"}
    ListElement {code: "MD"}
    ListElement {code: "MC"}
    ListElement {code: "MN"}
    ListElement {code: "ME"}
    ListElement {code: "MS"}
    ListElement {code: "MA"}
    ListElement {code: "MZ"}
    ListElement {code: "MM"}
    ListElement {code: "NA"}
    ListElement {code: "NR"}
    ListElement {code: "NP"}
    ListElement {code: "NL"}
    ListElement {code: "NC"}
    ListElement {code: "NZ"}
    ListElement {code: "NI"}
    ListElement {code: "NE"}
    ListElement {code: "NG"}
    ListElement {code: "NU"}
    ListElement {code: "NF"}
    ListElement {code: "KP"}
    ListElement {code: "MK"}
    ListElement {code: "MP"}
    ListElement {code: "NO"}
    ListElement {code: "OM"}
    ListElement {code: "PK"}
    ListElement {code: "PW"}
    ListElement {code: "PS"}
    ListElement {code: "PA"}
    ListElement {code: "PG"}
    ListElement {code: "PY"}
    ListElement {code: "PE"}
    ListElement {code: "PH"}
    ListElement {code: "PN"}
    ListElement {code: "PL"}
    ListElement {code: "PT"}
    ListElement {code: "PR"}
    ListElement {code: "QA"}
    ListElement {code: "RE"}
    ListElement {code: "RO"}
    ListElement {code: "RU"}
    ListElement {code: "RW"}
    ListElement {code: "WS"}
    ListElement {code: "SM"}
    ListElement {code: "ST"}
    ListElement {code: "SA"}
    ListElement {code: "SN"}
    ListElement {code: "RS"}
    ListElement {code: "SC"}
    ListElement {code: "SL"}
    ListElement {code: "SG"}
    ListElement {code: "SX"}
    ListElement {code: "SK"}
    ListElement {code: "SI"}
    ListElement {code: "SB"}
    ListElement {code: "SO"}
    ListElement {code: "ZA"}
    ListElement {code: "GS"}
    ListElement {code: "KR"}
    ListElement {code: "SS"}
    ListElement {code: "ES"}
    ListElement {code: "LK"}
    ListElement {code: "BL"}
    ListElement {code: "SH"}
    ListElement {code: "KN"}
    ListElement {code: "LC"}
    ListElement {code: "MF"}
    ListElement {code: "PM"}
    ListElement {code: "VC"}
    ListElement {code: "SD"}
    ListElement {code: "SR"}
    ListElement {code: "SJ"}
    ListElement {code: "SE"}
    ListElement {code: "CH"}
    ListElement {code: "SY"}
    ListElement {code: "TW"}
    ListElement {code: "TJ"}
    ListElement {code: "TZ"}
    ListElement {code: "TH"}
    ListElement {code: "TL"}
    ListElement {code: "TG"}
    ListElement {code: "TK"}
    ListElement {code: "TO"}
    ListElement {code: "TT"}
    ListElement {code: "TN"}
    ListElement {code: "TR"}
    ListElement {code: "TM"}
    ListElement {code: "TC"}
    ListElement {code: "TV"}
    ListElement {code: "UM"}
    ListElement {code: "VI"}
    ListElement {code: "UG"}
    ListElement {code: "UA"}
    ListElement {code: "AE"}
    ListElement {code: "GB"}
    ListElement {code: "US"}
    ListElement {code: "UY"}
    ListElement {code: "UZ"}
    ListElement {code: "VU"}
    ListElement {code: "VA"}
    ListElement {code: "VE"}
    ListElement {code: "VN"}
    ListElement {code: "WF"}
    ListElement {code: "EH"}
    ListElement {code: "YE"}
    ListElement {code: "ZM"}
    ListElement {code: "ZW"}
    ListElement {code: "XK"}
    ListElement {code: "ZZXX"}

    // Workaround to be able to use qsTr for translating the country names (qsTr doesn't work in ListModel/ListElement ... :( ..)
    function countryname(index) {
        if (countryname["text"] === undefined) {
            countryname.text = [
                        qsTr("Afghanistan"),
                        qsTr("Åland Islands"),
                        qsTr("Albania"),
                        qsTr("Algeria"),
                        qsTr("American Samoa"),
                        qsTr("Andorra"),
                        qsTr("Angola"),
                        qsTr("Anguilla"),
                        qsTr("Antarctica"),
                        qsTr("Antigua & Barbuda"),
                        qsTr("Argentina"),
                        qsTr("Armenia"),
                        qsTr("Aruba"),
                        qsTr("Australia"),
                        qsTr("Austria"),
                        qsTr("Azerbaijan"),
                        qsTr("Bahamas"),
                        qsTr("Bahrain"),
                        qsTr("Bangladesh"),
                        qsTr("Barbados"),
                        qsTr("Belarus"),
                        qsTr("Belgium"),
                        qsTr("Belize"),
                        qsTr("Benin"),
                        qsTr("Bermuda"),
                        qsTr("Bhutan"),
                        qsTr("Bolivia"),
                        qsTr("Bosnia & Herzegovina"),
                        qsTr("Botswana"),
                        qsTr("Bouvet Island"),
                        qsTr("Brazil"),
                        qsTr("British Indian Ocean Territory"),
                        qsTr("British Virgin Islands"),
                        qsTr("Brunei"),
                        qsTr("Bulgaria"),
                        qsTr("Burkina Faso"),
                        qsTr("Burundi"),
                        qsTr("Cambodia"),
                        qsTr("Cameroon"),
                        qsTr("Canada"),
                        qsTr("Cape Verde"),
                        qsTr("Caribbean Netherlands"),
                        qsTr("Cayman Islands"),
                        qsTr("Central African Republic"),
                        qsTr("Chad"),
                        qsTr("Chile"),
                        qsTr("China"),
                        qsTr("Christmas Island"),
                        qsTr("Cocos (Keeling) Islands"),
                        qsTr("Colombia"),
                        qsTr("Comoros"),
                        qsTr("Congo - Brazzaville"),
                        qsTr("Congo - Kinshasa"),
                        qsTr("Cook Islands"),
                        qsTr("Costa Rica"),
                        qsTr("Côte d’Ivoire"),
                        qsTr("Croatia"),
                        qsTr("Cuba"),
                        qsTr("Curaçao"),
                        qsTr("Cyprus"),
                        qsTr("Czechia"),
                        qsTr("Denmark"),
                        qsTr("Djibouti"),
                        qsTr("Dominica"),
                        qsTr("Dominican Republic"),
                        qsTr("Ecuador"),
                        qsTr("Egypt"),
                        qsTr("El Salvador"),
                        qsTr("Equatorial Guinea"),
                        qsTr("Eritrea"),
                        qsTr("Estonia"),
                        qsTr("Eswatini"),
                        qsTr("Ethiopia"),
                        qsTr("Falkland Islands"),
                        qsTr("Faroe Islands"),
                        qsTr("Fiji"),
                        qsTr("Finland"),
                        qsTr("France"),
                        qsTr("French Guiana"),
                        qsTr("French Polynesia"),
                        qsTr("French Southern Territories"),
                        qsTr("Gabon"),
                        qsTr("Gambia"),
                        qsTr("Georgia"),
                        qsTr("Germany"),
                        qsTr("Ghana"),
                        qsTr("Gibraltar"),
                        qsTr("Greece"),
                        qsTr("Greenland"),
                        qsTr("Grenada"),
                        qsTr("Guadeloupe"),
                        qsTr("Guam"),
                        qsTr("Guatemala"),
                        qsTr("Guernsey"),
                        qsTr("Guinea"),
                        qsTr("Guinea-Bissau"),
                        qsTr("Guyana"),
                        qsTr("Haiti"),
                        qsTr("Heard & McDonald Islands"),
                        qsTr("Honduras"),
                        qsTr("Hong Kong SAR China"),
                        qsTr("Hungary"),
                        qsTr("Iceland"),
                        qsTr("India"),
                        qsTr("Indonesia"),
                        qsTr("Iran"),
                        qsTr("Iraq"),
                        qsTr("Ireland"),
                        qsTr("Isle of Man"),
                        qsTr("Israel"),
                        qsTr("Italy"),
                        qsTr("Jamaica"),
                        qsTr("Japan"),
                        qsTr("Jersey"),
                        qsTr("Jordan"),
                        qsTr("Kazakhstan"),
                        qsTr("Kenya"),
                        qsTr("Kiribati"),
                        qsTr("Kuwait"),
                        qsTr("Kyrgyzstan"),
                        qsTr("Laos"),
                        qsTr("Latvia"),
                        qsTr("Lebanon"),
                        qsTr("Lesotho"),
                        qsTr("Liberia"),
                        qsTr("Libya"),
                        qsTr("Liechtenstein"),
                        qsTr("Lithuania"),
                        qsTr("Luxembourg"),
                        qsTr("Macao SAR China"),
                        qsTr("Madagascar"),
                        qsTr("Malawi"),
                        qsTr("Malaysia"),
                        qsTr("Maldives"),
                        qsTr("Mali"),
                        qsTr("Malta"),
                        qsTr("Marshall Islands"),
                        qsTr("Martinique"),
                        qsTr("Mauritania"),
                        qsTr("Mauritius"),
                        qsTr("Mayotte"),
                        qsTr("Mexico"),
                        qsTr("Micronesia"),
                        qsTr("Moldova"),
                        qsTr("Monaco"),
                        qsTr("Mongolia"),
                        qsTr("Montenegro"),
                        qsTr("Montserrat"),
                        qsTr("Morocco"),
                        qsTr("Mozambique"),
                        qsTr("Myanmar (Burma)"),
                        qsTr("Namibia"),
                        qsTr("Nauru"),
                        qsTr("Nepal"),
                        qsTr("Netherlands"),
                        qsTr("New Caledonia"),
                        qsTr("New Zealand"),
                        qsTr("Nicaragua"),
                        qsTr("Niger"),
                        qsTr("Nigeria"),
                        qsTr("Niue"),
                        qsTr("Norfolk Island"),
                        qsTr("North Korea"),
                        qsTr("North Macedonia"),
                        qsTr("Northern Mariana Islands"),
                        qsTr("Norway"),
                        qsTr("Oman"),
                        qsTr("Pakistan"),
                        qsTr("Palau"),
                        qsTr("Palestinian Territories"),
                        qsTr("Panama"),
                        qsTr("Papua New Guinea"),
                        qsTr("Paraguay"),
                        qsTr("Peru"),
                        qsTr("Philippines"),
                        qsTr("Pitcairn Islands"),
                        qsTr("Poland"),
                        qsTr("Portugal"),
                        qsTr("Puerto Rico"),
                        qsTr("Qatar"),
                        qsTr("Réunion"),
                        qsTr("Romania"),
                        qsTr("Russia"),
                        qsTr("Rwanda"),
                        qsTr("Samoa"),
                        qsTr("San Marino"),
                        qsTr("São Tomé & Príncipe"),
                        qsTr("Saudi Arabia"),
                        qsTr("Senegal"),
                        qsTr("Serbia"),
                        qsTr("Seychelles"),
                        qsTr("Sierra Leone"),
                        qsTr("Singapore"),
                        qsTr("Sint Maarten"),
                        qsTr("Slovakia"),
                        qsTr("Slovenia"),
                        qsTr("Solomon Islands"),
                        qsTr("Somalia"),
                        qsTr("South Africa"),
                        qsTr("South Georgia & South Sandwich Islands"),
                        qsTr("South Korea"),
                        qsTr("South Sudan"),
                        qsTr("Spain"),
                        qsTr("Sri Lanka"),
                        qsTr("St. Barthélemy"),
                        qsTr("St. Helena"),
                        qsTr("St. Kitts & Nevis"),
                        qsTr("St. Lucia"),
                        qsTr("St. Martin"),
                        qsTr("St. Pierre & Miquelon"),
                        qsTr("St. Vincent & Grenadines"),
                        qsTr("Sudan"),
                        qsTr("Suriname"),
                        qsTr("Svalbard & Jan Mayen"),
                        qsTr("Sweden"),
                        qsTr("Switzerland"),
                        qsTr("Syria"),
                        qsTr("Taiwan"),
                        qsTr("Tajikistan"),
                        qsTr("Tanzania"),
                        qsTr("Thailand"),
                        qsTr("Timor-Leste"),
                        qsTr("Togo"),
                        qsTr("Tokelau"),
                        qsTr("Tonga"),
                        qsTr("Trinidad & Tobago"),
                        qsTr("Tunisia"),
                        qsTr("Turkey"),
                        qsTr("Turkmenistan"),
                        qsTr("Turks & Caicos Islands"),
                        qsTr("Tuvalu"),
                        qsTr("U.S. Outlying Islands"),
                        qsTr("U.S. Virgin Islands"),
                        qsTr("Uganda"),
                        qsTr("Ukraine"),
                        qsTr("United Arab Emirates"),
                        qsTr("United Kingdom"),
                        qsTr("United States"),
                        qsTr("Uruguay"),
                        qsTr("Uzbekistan"),
                        qsTr("Vanuatu"),
                        qsTr("Vatican City"),
                        qsTr("Venezuela"),
                        qsTr("Vietnam"),
                        qsTr("Wallis & Futuna"),
                        qsTr("Western Sahara"),
                        qsTr("Yemen"),
                        qsTr("Zambia"),
                        qsTr("Zimbabwe "),
                        qsTr("Kosovo"),
                        qsTr("No country")
            ]
        }
        return countryname.text[index]
    }
}
