Warning, file /include/QtCore/qlocale.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #ifndef QLOCALE_H
0005 #define QLOCALE_H
0006
0007 #include <QtCore/qvariant.h>
0008 #include <QtCore/qstring.h>
0009 #include <QtCore/qobjectdefs.h>
0010 #include <QtCore/qshareddata.h>
0011
0012 QT_BEGIN_NAMESPACE
0013
0014 class QCalendar;
0015 class QDataStream;
0016 class QDate;
0017 class QDateTime;
0018 class QLocale;
0019 class QTime;
0020 class QVariant;
0021 class QTextStream;
0022 class QTextStreamPrivate;
0023
0024 class QLocalePrivate;
0025
0026 Q_CORE_EXPORT size_t qHash(const QLocale &key, size_t seed = 0) noexcept;
0027
0028 class Q_CORE_EXPORT QLocale
0029 {
0030 Q_GADGET
0031 friend class QString;
0032 friend class QByteArray;
0033 friend class QIntValidator;
0034 friend class QDoubleValidatorPrivate;
0035 friend class QTextStream;
0036 friend class QTextStreamPrivate;
0037
0038 public:
0039 static constexpr int DefaultTwoDigitBaseYear = 1900;
0040
0041
0042
0043 enum Language : ushort {
0044 AnyLanguage = 0,
0045 C = 1,
0046 Abkhazian = 2,
0047 Afar = 3,
0048 Afrikaans = 4,
0049 Aghem = 5,
0050 Akan = 6,
0051 Akkadian = 7,
0052 Akoose = 8,
0053 Albanian = 9,
0054 AmericanSignLanguage = 10,
0055 Amharic = 11,
0056 AncientEgyptian = 12,
0057 AncientGreek = 13,
0058 Arabic = 14,
0059 Aragonese = 15,
0060 Aramaic = 16,
0061 Armenian = 17,
0062 Assamese = 18,
0063 Asturian = 19,
0064 Asu = 20,
0065 Atsam = 21,
0066 Avaric = 22,
0067 Avestan = 23,
0068 Aymara = 24,
0069 Azerbaijani = 25,
0070 Bafia = 26,
0071 Balinese = 27,
0072 Bambara = 28,
0073 Bamun = 29,
0074 Bangla = 30,
0075 Basaa = 31,
0076 Bashkir = 32,
0077 Basque = 33,
0078 BatakToba = 34,
0079 Belarusian = 35,
0080 Bemba = 36,
0081 Bena = 37,
0082 Bhojpuri = 38,
0083 Bislama = 39,
0084 Blin = 40,
0085 Bodo = 41,
0086 Bosnian = 42,
0087 Breton = 43,
0088 Buginese = 44,
0089 Bulgarian = 45,
0090 Burmese = 46,
0091 Cantonese = 47,
0092 Catalan = 48,
0093 Cebuano = 49,
0094 CentralAtlasTamazight = 50,
0095 CentralKurdish = 51,
0096 Chakma = 52,
0097 Chamorro = 53,
0098 Chechen = 54,
0099 Cherokee = 55,
0100 Chickasaw = 56,
0101 Chiga = 57,
0102 Chinese = 58,
0103 Church = 59,
0104 Chuvash = 60,
0105 Colognian = 61,
0106 Coptic = 62,
0107 Cornish = 63,
0108 Corsican = 64,
0109 Cree = 65,
0110 Croatian = 66,
0111 Czech = 67,
0112 Danish = 68,
0113 Divehi = 69,
0114 Dogri = 70,
0115 Duala = 71,
0116 Dutch = 72,
0117 Dzongkha = 73,
0118 Embu = 74,
0119 English = 75,
0120 Erzya = 76,
0121 Esperanto = 77,
0122 Estonian = 78,
0123 Ewe = 79,
0124 Ewondo = 80,
0125 Faroese = 81,
0126 Fijian = 82,
0127 Filipino = 83,
0128 Finnish = 84,
0129 French = 85,
0130 Friulian = 86,
0131 Fulah = 87,
0132 Gaelic = 88,
0133 Ga = 89,
0134 Galician = 90,
0135 Ganda = 91,
0136 Geez = 92,
0137 Georgian = 93,
0138 German = 94,
0139 Gothic = 95,
0140 Greek = 96,
0141 Guarani = 97,
0142 Gujarati = 98,
0143 Gusii = 99,
0144 Haitian = 100,
0145 Hausa = 101,
0146 Hawaiian = 102,
0147 Hebrew = 103,
0148 Herero = 104,
0149 Hindi = 105,
0150 HiriMotu = 106,
0151 Hungarian = 107,
0152 Icelandic = 108,
0153 Ido = 109,
0154 Igbo = 110,
0155 InariSami = 111,
0156 Indonesian = 112,
0157 Ingush = 113,
0158 Interlingua = 114,
0159 Interlingue = 115,
0160 Inuktitut = 116,
0161 Inupiaq = 117,
0162 Irish = 118,
0163 Italian = 119,
0164 Japanese = 120,
0165 Javanese = 121,
0166 Jju = 122,
0167 JolaFonyi = 123,
0168 Kabuverdianu = 124,
0169 Kabyle = 125,
0170 Kako = 126,
0171 Kalaallisut = 127,
0172 Kalenjin = 128,
0173 Kamba = 129,
0174 Kannada = 130,
0175 Kanuri = 131,
0176 Kashmiri = 132,
0177 Kazakh = 133,
0178 Kenyang = 134,
0179 Khmer = 135,
0180 Kiche = 136,
0181 Kikuyu = 137,
0182 Kinyarwanda = 138,
0183 Komi = 139,
0184 Kongo = 140,
0185 Konkani = 141,
0186 Korean = 142,
0187 Koro = 143,
0188 KoyraboroSenni = 144,
0189 KoyraChiini = 145,
0190 Kpelle = 146,
0191 Kuanyama = 147,
0192 Kurdish = 148,
0193 Kwasio = 149,
0194 Kyrgyz = 150,
0195 Lakota = 151,
0196 Langi = 152,
0197 Lao = 153,
0198 Latin = 154,
0199 Latvian = 155,
0200 Lezghian = 156,
0201 Limburgish = 157,
0202 Lingala = 158,
0203 LiteraryChinese = 159,
0204 Lithuanian = 160,
0205 Lojban = 161,
0206 LowerSorbian = 162,
0207 LowGerman = 163,
0208 LubaKatanga = 164,
0209 LuleSami = 165,
0210 Luo = 166,
0211 Luxembourgish = 167,
0212 Luyia = 168,
0213 Macedonian = 169,
0214 Machame = 170,
0215 Maithili = 171,
0216 MakhuwaMeetto = 172,
0217 Makonde = 173,
0218 Malagasy = 174,
0219 Malayalam = 175,
0220 Malay = 176,
0221 Maltese = 177,
0222 Mandingo = 178,
0223 Manipuri = 179,
0224 Manx = 180,
0225 Maori = 181,
0226 Mapuche = 182,
0227 Marathi = 183,
0228 Marshallese = 184,
0229 Masai = 185,
0230 Mazanderani = 186,
0231 Mende = 187,
0232 Meru = 188,
0233 Meta = 189,
0234 Mohawk = 190,
0235 Mongolian = 191,
0236 Morisyen = 192,
0237 Mundang = 193,
0238 Muscogee = 194,
0239 Nama = 195,
0240 NauruLanguage = 196,
0241 Navajo = 197,
0242 Ndonga = 198,
0243 Nepali = 199,
0244 Newari = 200,
0245 Ngiemboon = 201,
0246 Ngomba = 202,
0247 NigerianPidgin = 203,
0248 Nko = 204,
0249 NorthernLuri = 205,
0250 NorthernSami = 206,
0251 NorthernSotho = 207,
0252 NorthNdebele = 208,
0253 NorwegianBokmal = 209,
0254 NorwegianNynorsk = 210,
0255 Nuer = 211,
0256 Nyanja = 212,
0257 Nyankole = 213,
0258 Occitan = 214,
0259 Odia = 215,
0260 Ojibwa = 216,
0261 OldIrish = 217,
0262 OldNorse = 218,
0263 OldPersian = 219,
0264 Oromo = 220,
0265 Osage = 221,
0266 Ossetic = 222,
0267 Pahlavi = 223,
0268 Palauan = 224,
0269 Pali = 225,
0270 Papiamento = 226,
0271 Pashto = 227,
0272 Persian = 228,
0273 Phoenician = 229,
0274 Polish = 230,
0275 Portuguese = 231,
0276 Prussian = 232,
0277 Punjabi = 233,
0278 Quechua = 234,
0279 Romanian = 235,
0280 Romansh = 236,
0281 Rombo = 237,
0282 Rundi = 238,
0283 Russian = 239,
0284 Rwa = 240,
0285 Saho = 241,
0286 Sakha = 242,
0287 Samburu = 243,
0288 Samoan = 244,
0289 Sango = 245,
0290 Sangu = 246,
0291 Sanskrit = 247,
0292 Santali = 248,
0293 Sardinian = 249,
0294 Saurashtra = 250,
0295 Sena = 251,
0296 Serbian = 252,
0297 Shambala = 253,
0298 Shona = 254,
0299 SichuanYi = 255,
0300 Sicilian = 256,
0301 Sidamo = 257,
0302 Silesian = 258,
0303 Sindhi = 259,
0304 Sinhala = 260,
0305 SkoltSami = 261,
0306 Slovak = 262,
0307 Slovenian = 263,
0308 Soga = 264,
0309 Somali = 265,
0310 SouthernKurdish = 266,
0311 SouthernSami = 267,
0312 SouthernSotho = 268,
0313 SouthNdebele = 269,
0314 Spanish = 270,
0315 StandardMoroccanTamazight = 271,
0316 Sundanese = 272,
0317 Swahili = 273,
0318 Swati = 274,
0319 Swedish = 275,
0320 SwissGerman = 276,
0321 Syriac = 277,
0322 Tachelhit = 278,
0323 Tahitian = 279,
0324 TaiDam = 280,
0325 Taita = 281,
0326 Tajik = 282,
0327 Tamil = 283,
0328 Taroko = 284,
0329 Tasawaq = 285,
0330 Tatar = 286,
0331 Telugu = 287,
0332 Teso = 288,
0333 Thai = 289,
0334 Tibetan = 290,
0335 Tigre = 291,
0336 Tigrinya = 292,
0337 TokelauLanguage = 293,
0338 TokPisin = 294,
0339 Tongan = 295,
0340 Tsonga = 296,
0341 Tswana = 297,
0342 Turkish = 298,
0343 Turkmen = 299,
0344 TuvaluLanguage = 300,
0345 Tyap = 301,
0346 Ugaritic = 302,
0347 Ukrainian = 303,
0348 UpperSorbian = 304,
0349 Urdu = 305,
0350 Uyghur = 306,
0351 Uzbek = 307,
0352 Vai = 308,
0353 Venda = 309,
0354 Vietnamese = 310,
0355 Volapuk = 311,
0356 Vunjo = 312,
0357 Walloon = 313,
0358 Walser = 314,
0359 Warlpiri = 315,
0360 Welsh = 316,
0361 WesternBalochi = 317,
0362 WesternFrisian = 318,
0363 Wolaytta = 319,
0364 Wolof = 320,
0365 Xhosa = 321,
0366 Yangben = 322,
0367 Yiddish = 323,
0368 Yoruba = 324,
0369 Zarma = 325,
0370 Zhuang = 326,
0371 Zulu = 327,
0372 Kaingang = 328,
0373 Nheengatu = 329,
0374 Haryanvi = 330,
0375 NorthernFrisian = 331,
0376 Rajasthani = 332,
0377 Moksha = 333,
0378 TokiPona = 334,
0379 Pijin = 335,
0380 Obolo = 336,
0381 Baluchi = 337,
0382 Ligurian = 338,
0383 Rohingya = 339,
0384 Torwali = 340,
0385 Anii = 341,
0386 Kangri = 342,
0387 Venetian = 343,
0388
0389 Afan = Oromo,
0390 Bengali = Bangla,
0391 Bhutani = Dzongkha,
0392 Byelorussian = Belarusian,
0393 Cambodian = Khmer,
0394 CentralMoroccoTamazight = CentralAtlasTamazight,
0395 Chewa = Nyanja,
0396 Frisian = WesternFrisian,
0397 Greenlandic = Kalaallisut,
0398 Inupiak = Inupiaq,
0399 Kirghiz = Kyrgyz,
0400 Kurundi = Rundi,
0401 Kwanyama = Kuanyama,
0402 Navaho = Navajo,
0403 Oriya = Odia,
0404 RhaetoRomance = Romansh,
0405 Uighur = Uyghur,
0406 Uigur = Uyghur,
0407 Walamo = Wolaytta,
0408
0409 LastLanguage = Venetian
0410 };
0411
0412 enum Script : ushort {
0413 AnyScript = 0,
0414 AdlamScript = 1,
0415 AhomScript = 2,
0416 AnatolianHieroglyphsScript = 3,
0417 ArabicScript = 4,
0418 ArmenianScript = 5,
0419 AvestanScript = 6,
0420 BalineseScript = 7,
0421 BamumScript = 8,
0422 BanglaScript = 9,
0423 BassaVahScript = 10,
0424 BatakScript = 11,
0425 BhaiksukiScript = 12,
0426 BopomofoScript = 13,
0427 BrahmiScript = 14,
0428 BrailleScript = 15,
0429 BugineseScript = 16,
0430 BuhidScript = 17,
0431 CanadianAboriginalScript = 18,
0432 CarianScript = 19,
0433 CaucasianAlbanianScript = 20,
0434 ChakmaScript = 21,
0435 ChamScript = 22,
0436 CherokeeScript = 23,
0437 CopticScript = 24,
0438 CuneiformScript = 25,
0439 CypriotScript = 26,
0440 CyrillicScript = 27,
0441 DeseretScript = 28,
0442 DevanagariScript = 29,
0443 DuployanScript = 30,
0444 EgyptianHieroglyphsScript = 31,
0445 ElbasanScript = 32,
0446 EthiopicScript = 33,
0447 FraserScript = 34,
0448 GeorgianScript = 35,
0449 GlagoliticScript = 36,
0450 GothicScript = 37,
0451 GranthaScript = 38,
0452 GreekScript = 39,
0453 GujaratiScript = 40,
0454 GurmukhiScript = 41,
0455 HangulScript = 42,
0456 HanScript = 43,
0457 HanunooScript = 44,
0458 HanWithBopomofoScript = 45,
0459 HatranScript = 46,
0460 HebrewScript = 47,
0461 HiraganaScript = 48,
0462 ImperialAramaicScript = 49,
0463 InscriptionalPahlaviScript = 50,
0464 InscriptionalParthianScript = 51,
0465 JamoScript = 52,
0466 JapaneseScript = 53,
0467 JavaneseScript = 54,
0468 KaithiScript = 55,
0469 KannadaScript = 56,
0470 KatakanaScript = 57,
0471 KayahLiScript = 58,
0472 KharoshthiScript = 59,
0473 KhmerScript = 60,
0474 KhojkiScript = 61,
0475 KhudawadiScript = 62,
0476 KoreanScript = 63,
0477 LannaScript = 64,
0478 LaoScript = 65,
0479 LatinScript = 66,
0480 LepchaScript = 67,
0481 LimbuScript = 68,
0482 LinearAScript = 69,
0483 LinearBScript = 70,
0484 LycianScript = 71,
0485 LydianScript = 72,
0486 MahajaniScript = 73,
0487 MalayalamScript = 74,
0488 MandaeanScript = 75,
0489 ManichaeanScript = 76,
0490 MarchenScript = 77,
0491 MeiteiMayekScript = 78,
0492 MendeScript = 79,
0493 MeroiticCursiveScript = 80,
0494 MeroiticScript = 81,
0495 ModiScript = 82,
0496 MongolianScript = 83,
0497 MroScript = 84,
0498 MultaniScript = 85,
0499 MyanmarScript = 86,
0500 NabataeanScript = 87,
0501 NewaScript = 88,
0502 NewTaiLueScript = 89,
0503 NkoScript = 90,
0504 OdiaScript = 91,
0505 OghamScript = 92,
0506 OlChikiScript = 93,
0507 OldHungarianScript = 94,
0508 OldItalicScript = 95,
0509 OldNorthArabianScript = 96,
0510 OldPermicScript = 97,
0511 OldPersianScript = 98,
0512 OldSouthArabianScript = 99,
0513 OrkhonScript = 100,
0514 OsageScript = 101,
0515 OsmanyaScript = 102,
0516 PahawhHmongScript = 103,
0517 PalmyreneScript = 104,
0518 PauCinHauScript = 105,
0519 PhagsPaScript = 106,
0520 PhoenicianScript = 107,
0521 PollardPhoneticScript = 108,
0522 PsalterPahlaviScript = 109,
0523 RejangScript = 110,
0524 RunicScript = 111,
0525 SamaritanScript = 112,
0526 SaurashtraScript = 113,
0527 SharadaScript = 114,
0528 ShavianScript = 115,
0529 SiddhamScript = 116,
0530 SignWritingScript = 117,
0531 SimplifiedHanScript = 118,
0532 SinhalaScript = 119,
0533 SoraSompengScript = 120,
0534 SundaneseScript = 121,
0535 SylotiNagriScript = 122,
0536 SyriacScript = 123,
0537 TagalogScript = 124,
0538 TagbanwaScript = 125,
0539 TaiLeScript = 126,
0540 TaiVietScript = 127,
0541 TakriScript = 128,
0542 TamilScript = 129,
0543 TangutScript = 130,
0544 TeluguScript = 131,
0545 ThaanaScript = 132,
0546 ThaiScript = 133,
0547 TibetanScript = 134,
0548 TifinaghScript = 135,
0549 TirhutaScript = 136,
0550 TraditionalHanScript = 137,
0551 UgariticScript = 138,
0552 VaiScript = 139,
0553 VarangKshitiScript = 140,
0554 YiScript = 141,
0555 HanifiScript = 142,
0556
0557 BengaliScript = BanglaScript,
0558 MendeKikakuiScript = MendeScript,
0559 OriyaScript = OdiaScript,
0560 SimplifiedChineseScript = SimplifiedHanScript,
0561 TraditionalChineseScript = TraditionalHanScript,
0562
0563 LastScript = HanifiScript
0564 };
0565
0566
0567 enum Country : ushort {
0568 AnyTerritory = 0,
0569 Afghanistan = 1,
0570 AlandIslands = 2,
0571 Albania = 3,
0572 Algeria = 4,
0573 AmericanSamoa = 5,
0574 Andorra = 6,
0575 Angola = 7,
0576 Anguilla = 8,
0577 Antarctica = 9,
0578 AntiguaAndBarbuda = 10,
0579 Argentina = 11,
0580 Armenia = 12,
0581 Aruba = 13,
0582 AscensionIsland = 14,
0583 Australia = 15,
0584 Austria = 16,
0585 Azerbaijan = 17,
0586 Bahamas = 18,
0587 Bahrain = 19,
0588 Bangladesh = 20,
0589 Barbados = 21,
0590 Belarus = 22,
0591 Belgium = 23,
0592 Belize = 24,
0593 Benin = 25,
0594 Bermuda = 26,
0595 Bhutan = 27,
0596 Bolivia = 28,
0597 BosniaAndHerzegovina = 29,
0598 Botswana = 30,
0599 BouvetIsland = 31,
0600 Brazil = 32,
0601 BritishIndianOceanTerritory = 33,
0602 BritishVirginIslands = 34,
0603 Brunei = 35,
0604 Bulgaria = 36,
0605 BurkinaFaso = 37,
0606 Burundi = 38,
0607 Cambodia = 39,
0608 Cameroon = 40,
0609 Canada = 41,
0610 CanaryIslands = 42,
0611 CapeVerde = 43,
0612 CaribbeanNetherlands = 44,
0613 CaymanIslands = 45,
0614 CentralAfricanRepublic = 46,
0615 CeutaAndMelilla = 47,
0616 Chad = 48,
0617 Chile = 49,
0618 China = 50,
0619 ChristmasIsland = 51,
0620 ClippertonIsland = 52,
0621 CocosIslands = 53,
0622 Colombia = 54,
0623 Comoros = 55,
0624 CongoBrazzaville = 56,
0625 CongoKinshasa = 57,
0626 CookIslands = 58,
0627 CostaRica = 59,
0628 Croatia = 60,
0629 Cuba = 61,
0630 Curacao = 62,
0631 Cyprus = 63,
0632 Czechia = 64,
0633 Denmark = 65,
0634 DiegoGarcia = 66,
0635 Djibouti = 67,
0636 Dominica = 68,
0637 DominicanRepublic = 69,
0638 Ecuador = 70,
0639 Egypt = 71,
0640 ElSalvador = 72,
0641 EquatorialGuinea = 73,
0642 Eritrea = 74,
0643 Estonia = 75,
0644 Eswatini = 76,
0645 Ethiopia = 77,
0646 Europe = 78,
0647 EuropeanUnion = 79,
0648 FalklandIslands = 80,
0649 FaroeIslands = 81,
0650 Fiji = 82,
0651 Finland = 83,
0652 France = 84,
0653 FrenchGuiana = 85,
0654 FrenchPolynesia = 86,
0655 FrenchSouthernTerritories = 87,
0656 Gabon = 88,
0657 Gambia = 89,
0658 Georgia = 90,
0659 Germany = 91,
0660 Ghana = 92,
0661 Gibraltar = 93,
0662 Greece = 94,
0663 Greenland = 95,
0664 Grenada = 96,
0665 Guadeloupe = 97,
0666 Guam = 98,
0667 Guatemala = 99,
0668 Guernsey = 100,
0669 GuineaBissau = 101,
0670 Guinea = 102,
0671 Guyana = 103,
0672 Haiti = 104,
0673 HeardAndMcDonaldIslands = 105,
0674 Honduras = 106,
0675 HongKong = 107,
0676 Hungary = 108,
0677 Iceland = 109,
0678 India = 110,
0679 Indonesia = 111,
0680 Iran = 112,
0681 Iraq = 113,
0682 Ireland = 114,
0683 IsleOfMan = 115,
0684 Israel = 116,
0685 Italy = 117,
0686 IvoryCoast = 118,
0687 Jamaica = 119,
0688 Japan = 120,
0689 Jersey = 121,
0690 Jordan = 122,
0691 Kazakhstan = 123,
0692 Kenya = 124,
0693 Kiribati = 125,
0694 Kosovo = 126,
0695 Kuwait = 127,
0696 Kyrgyzstan = 128,
0697 Laos = 129,
0698 LatinAmerica = 130,
0699 Latvia = 131,
0700 Lebanon = 132,
0701 Lesotho = 133,
0702 Liberia = 134,
0703 Libya = 135,
0704 Liechtenstein = 136,
0705 Lithuania = 137,
0706 Luxembourg = 138,
0707 Macao = 139,
0708 Macedonia = 140,
0709 Madagascar = 141,
0710 Malawi = 142,
0711 Malaysia = 143,
0712 Maldives = 144,
0713 Mali = 145,
0714 Malta = 146,
0715 MarshallIslands = 147,
0716 Martinique = 148,
0717 Mauritania = 149,
0718 Mauritius = 150,
0719 Mayotte = 151,
0720 Mexico = 152,
0721 Micronesia = 153,
0722 Moldova = 154,
0723 Monaco = 155,
0724 Mongolia = 156,
0725 Montenegro = 157,
0726 Montserrat = 158,
0727 Morocco = 159,
0728 Mozambique = 160,
0729 Myanmar = 161,
0730 Namibia = 162,
0731 NauruTerritory = 163,
0732 Nepal = 164,
0733 Netherlands = 165,
0734 NewCaledonia = 166,
0735 NewZealand = 167,
0736 Nicaragua = 168,
0737 Nigeria = 169,
0738 Niger = 170,
0739 Niue = 171,
0740 NorfolkIsland = 172,
0741 NorthernMarianaIslands = 173,
0742 NorthKorea = 174,
0743 Norway = 175,
0744 Oman = 176,
0745 OutlyingOceania = 177,
0746 Pakistan = 178,
0747 Palau = 179,
0748 PalestinianTerritories = 180,
0749 Panama = 181,
0750 PapuaNewGuinea = 182,
0751 Paraguay = 183,
0752 Peru = 184,
0753 Philippines = 185,
0754 Pitcairn = 186,
0755 Poland = 187,
0756 Portugal = 188,
0757 PuertoRico = 189,
0758 Qatar = 190,
0759 Reunion = 191,
0760 Romania = 192,
0761 Russia = 193,
0762 Rwanda = 194,
0763 SaintBarthelemy = 195,
0764 SaintHelena = 196,
0765 SaintKittsAndNevis = 197,
0766 SaintLucia = 198,
0767 SaintMartin = 199,
0768 SaintPierreAndMiquelon = 200,
0769 SaintVincentAndGrenadines = 201,
0770 Samoa = 202,
0771 SanMarino = 203,
0772 SaoTomeAndPrincipe = 204,
0773 SaudiArabia = 205,
0774 Senegal = 206,
0775 Serbia = 207,
0776 Seychelles = 208,
0777 SierraLeone = 209,
0778 Singapore = 210,
0779 SintMaarten = 211,
0780 Slovakia = 212,
0781 Slovenia = 213,
0782 SolomonIslands = 214,
0783 Somalia = 215,
0784 SouthAfrica = 216,
0785 SouthGeorgiaAndSouthSandwichIslands = 217,
0786 SouthKorea = 218,
0787 SouthSudan = 219,
0788 Spain = 220,
0789 SriLanka = 221,
0790 Sudan = 222,
0791 Suriname = 223,
0792 SvalbardAndJanMayen = 224,
0793 Sweden = 225,
0794 Switzerland = 226,
0795 Syria = 227,
0796 Taiwan = 228,
0797 Tajikistan = 229,
0798 Tanzania = 230,
0799 Thailand = 231,
0800 TimorLeste = 232,
0801 Togo = 233,
0802 TokelauTerritory = 234,
0803 Tonga = 235,
0804 TrinidadAndTobago = 236,
0805 TristanDaCunha = 237,
0806 Tunisia = 238,
0807 Turkey = 239,
0808 Turkmenistan = 240,
0809 TurksAndCaicosIslands = 241,
0810 TuvaluTerritory = 242,
0811 Uganda = 243,
0812 Ukraine = 244,
0813 UnitedArabEmirates = 245,
0814 UnitedKingdom = 246,
0815 UnitedStatesOutlyingIslands = 247,
0816 UnitedStates = 248,
0817 UnitedStatesVirginIslands = 249,
0818 Uruguay = 250,
0819 Uzbekistan = 251,
0820 Vanuatu = 252,
0821 VaticanCity = 253,
0822 Venezuela = 254,
0823 Vietnam = 255,
0824 WallisAndFutuna = 256,
0825 WesternSahara = 257,
0826 World = 258,
0827 Yemen = 259,
0828 Zambia = 260,
0829 Zimbabwe = 261,
0830
0831 AnyCountry = AnyTerritory,
0832 Bonaire = CaribbeanNetherlands,
0833 BosniaAndHerzegowina = BosniaAndHerzegovina,
0834 CuraSao = Curacao,
0835 CzechRepublic = Czechia,
0836 DemocraticRepublicOfCongo = CongoKinshasa,
0837 DemocraticRepublicOfKorea = NorthKorea,
0838 EastTimor = TimorLeste,
0839 LatinAmericaAndTheCaribbean = LatinAmerica,
0840 Macau = Macao,
0841 NauruCountry = NauruTerritory,
0842 PeoplesRepublicOfCongo = CongoBrazzaville,
0843 RepublicOfKorea = SouthKorea,
0844 RussianFederation = Russia,
0845 SaintVincentAndTheGrenadines = SaintVincentAndGrenadines,
0846 SouthGeorgiaAndTheSouthSandwichIslands = SouthGeorgiaAndSouthSandwichIslands,
0847 SvalbardAndJanMayenIslands = SvalbardAndJanMayen,
0848 Swaziland = Eswatini,
0849 SyrianArabRepublic = Syria,
0850 TokelauCountry = TokelauTerritory,
0851 TuvaluCountry = TuvaluTerritory,
0852 UnitedStatesMinorOutlyingIslands = UnitedStatesOutlyingIslands,
0853 VaticanCityState = VaticanCity,
0854 WallisAndFutunaIslands = WallisAndFutuna,
0855
0856 LastTerritory = Zimbabwe,
0857 LastCountry = LastTerritory
0858 };
0859
0860
0861 using Territory = Country;
0862
0863 Q_ENUM(Language)
0864 Q_ENUM(Country)
0865 Q_ENUM(Script)
0866
0867 enum MeasurementSystem {
0868 MetricSystem,
0869 ImperialUSSystem,
0870 ImperialUKSystem,
0871 ImperialSystem = ImperialUSSystem
0872 };
0873 Q_ENUM(MeasurementSystem)
0874
0875 enum FormatType { LongFormat, ShortFormat, NarrowFormat };
0876 Q_ENUM(FormatType)
0877 enum NumberOption {
0878 DefaultNumberOptions = 0x0,
0879 OmitGroupSeparator = 0x01,
0880 RejectGroupSeparator = 0x02,
0881 OmitLeadingZeroInExponent = 0x04,
0882 RejectLeadingZeroInExponent = 0x08,
0883 IncludeTrailingZeroesAfterDot = 0x10,
0884 RejectTrailingZeroesAfterDot = 0x20
0885 };
0886 Q_DECLARE_FLAGS(NumberOptions, NumberOption)
0887 Q_FLAG(NumberOptions)
0888
0889 enum FloatingPointPrecisionOption {
0890 FloatingPointShortest = -128
0891 };
0892
0893 enum class TagSeparator : char { Dash = '-', Underscore = '_' };
0894 Q_ENUM(TagSeparator)
0895
0896 enum CurrencySymbolFormat {
0897 CurrencyIsoCode,
0898 CurrencySymbol,
0899 CurrencyDisplayName
0900 };
0901 Q_ENUM(CurrencySymbolFormat)
0902
0903 enum DataSizeFormat {
0904
0905 DataSizeBase1000 = 1,
0906 DataSizeSIQuantifiers = 2,
0907
0908
0909 DataSizeIecFormat = 0,
0910 DataSizeTraditionalFormat = DataSizeSIQuantifiers,
0911 DataSizeSIFormat = DataSizeBase1000 | DataSizeSIQuantifiers
0912 };
0913 Q_DECLARE_FLAGS(DataSizeFormats, DataSizeFormat)
0914 Q_FLAG(DataSizeFormats)
0915
0916 QLocale();
0917 QT_CORE_INLINE_SINCE(6, 4)
0918 explicit QLocale(const QString &name);
0919 explicit QLocale(QStringView name);
0920 QLocale(Language language, Territory territory);
0921 QLocale(Language language, Script script = AnyScript, Territory territory = AnyTerritory);
0922 QLocale(const QLocale &other) noexcept;
0923 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QLocale)
0924 QLocale &operator=(const QLocale &other) noexcept;
0925 ~QLocale();
0926
0927 void swap(QLocale &other) noexcept { d.swap(other.d); }
0928
0929 Language language() const;
0930 Script script() const;
0931 Territory territory() const;
0932 #if QT_DEPRECATED_SINCE(6, 6)
0933 QT_DEPRECATED_VERSION_X_6_6("Use territory() instead")
0934 Country country() const;
0935 #endif
0936
0937 #if QT_CORE_REMOVED_SINCE(6, 7)
0938 QString name() const;
0939 QString bcp47Name() const;
0940 #endif
0941 QString name(TagSeparator separator = TagSeparator::Underscore) const;
0942 QString bcp47Name(TagSeparator separator = TagSeparator::Dash) const;
0943
0944 QString nativeLanguageName() const;
0945 QString nativeTerritoryName() const;
0946 #if QT_DEPRECATED_SINCE(6, 6)
0947 QT_DEPRECATED_VERSION_X_6_6("Use nativeTerritoryName() instead")
0948 QString nativeCountryName() const;
0949 #endif
0950
0951 short toShort(const QString &s, bool *ok = nullptr) const
0952 { return toShort(qToStringViewIgnoringNull(s), ok); }
0953 ushort toUShort(const QString &s, bool *ok = nullptr) const
0954 { return toUShort(qToStringViewIgnoringNull(s), ok); }
0955 int toInt(const QString &s, bool *ok = nullptr) const
0956 { return toInt(qToStringViewIgnoringNull(s), ok); }
0957 uint toUInt(const QString &s, bool *ok = nullptr) const
0958 { return toUInt(qToStringViewIgnoringNull(s), ok); }
0959 long toLong(const QString &s, bool *ok = nullptr) const
0960 { return toLong(qToStringViewIgnoringNull(s), ok); }
0961 ulong toULong(const QString &s, bool *ok = nullptr) const
0962 { return toULong(qToStringViewIgnoringNull(s), ok); }
0963 qlonglong toLongLong(const QString &s, bool *ok = nullptr) const
0964 { return toLongLong(qToStringViewIgnoringNull(s), ok); }
0965 qulonglong toULongLong(const QString &s, bool *ok = nullptr) const
0966 { return toULongLong(qToStringViewIgnoringNull(s), ok); }
0967 float toFloat(const QString &s, bool *ok = nullptr) const
0968 { return toFloat(qToStringViewIgnoringNull(s), ok); }
0969 double toDouble(const QString &s, bool *ok = nullptr) const
0970 { return toDouble(qToStringViewIgnoringNull(s), ok); }
0971
0972 short toShort(QStringView s, bool *ok = nullptr) const;
0973 ushort toUShort(QStringView s, bool *ok = nullptr) const;
0974 int toInt(QStringView s, bool *ok = nullptr) const;
0975 uint toUInt(QStringView s, bool *ok = nullptr) const;
0976 long toLong(QStringView s, bool *ok = nullptr) const;
0977 ulong toULong(QStringView s, bool *ok = nullptr) const;
0978 qlonglong toLongLong(QStringView s, bool *ok = nullptr) const;
0979 qulonglong toULongLong(QStringView s, bool *ok = nullptr) const;
0980 float toFloat(QStringView s, bool *ok = nullptr) const;
0981 double toDouble(QStringView s, bool *ok = nullptr) const;
0982
0983 QString toString(qlonglong i) const;
0984 QString toString(qulonglong i) const;
0985 QString toString(long i) const { return toString(qlonglong(i)); }
0986 QString toString(ulong i) const { return toString(qulonglong(i)); }
0987 QString toString(short i) const { return toString(qlonglong(i)); }
0988 QString toString(ushort i) const { return toString(qulonglong(i)); }
0989 QString toString(int i) const { return toString(qlonglong(i)); }
0990 QString toString(uint i) const { return toString(qulonglong(i)); }
0991 QString toString(double f, char format = 'g', int precision = 6) const;
0992 QString toString(float f, char format = 'g', int precision = 6) const
0993 { return toString(double(f), format, precision); }
0994
0995
0996 QString toString(QDate date, const QString &format) const;
0997 QString toString(QTime time, const QString &format) const;
0998 QString toString(const QDateTime &dateTime, const QString &format) const
0999 { return toString(dateTime, qToStringViewIgnoringNull(format)); }
1000 QString toString(QDate date, QStringView format) const;
1001 QString toString(QTime time, QStringView format) const;
1002 QString toString(const QDateTime &dateTime, QStringView format) const;
1003 QString toString(QDate date, FormatType format = LongFormat) const;
1004 QString toString(QTime time, FormatType format = LongFormat) const;
1005 QString toString(const QDateTime &dateTime, FormatType format = LongFormat) const;
1006
1007
1008
1009
1010
1011 QString toString(QDate date, QStringView format, QCalendar cal) const;
1012 QString toString(QDate date, FormatType format, QCalendar cal) const;
1013 QString toString(const QDateTime &dateTime, FormatType format, QCalendar cal) const;
1014 QString toString(const QDateTime &dateTime, QStringView format, QCalendar cal) const;
1015
1016 QString dateFormat(FormatType format = LongFormat) const;
1017 QString timeFormat(FormatType format = LongFormat) const;
1018 QString dateTimeFormat(FormatType format = LongFormat) const;
1019
1020
1021 #if QT_CONFIG(datestring)
1022 QTime toTime(const QString &string, FormatType = LongFormat) const;
1023 QTime toTime(const QString &string, const QString &format) const;
1024 # if QT_CORE_REMOVED_SINCE(6, 7)
1025 QDate toDate(const QString &string, FormatType = LongFormat) const;
1026 QDate toDate(const QString &string, const QString &format) const;
1027 QDateTime toDateTime(const QString &string, FormatType format = LongFormat) const;
1028 QDateTime toDateTime(const QString &string, const QString &format) const;
1029
1030 QDate toDate(const QString &string, FormatType format, QCalendar cal) const;
1031 QDate toDate(const QString &string, const QString &format, QCalendar cal) const;
1032 QDateTime toDateTime(const QString &string, FormatType format, QCalendar cal) const;
1033 QDateTime toDateTime(const QString &string, const QString &format, QCalendar cal) const;
1034 # endif
1035 QDate toDate(const QString &string, FormatType = LongFormat,
1036 int baseYear = DefaultTwoDigitBaseYear) const;
1037 QDate toDate(const QString &string, const QString &format,
1038 int baseYear = DefaultTwoDigitBaseYear) const;
1039 QDateTime toDateTime(const QString &string, FormatType format = LongFormat,
1040 int baseYear = DefaultTwoDigitBaseYear) const;
1041 QDateTime toDateTime(const QString &string, const QString &format,
1042 int baseYear = DefaultTwoDigitBaseYear) const;
1043
1044 QDate toDate(const QString &string, FormatType format, QCalendar cal,
1045 int baseYear = DefaultTwoDigitBaseYear) const;
1046 QDate toDate(const QString &string, const QString &format, QCalendar cal,
1047 int baseYear = DefaultTwoDigitBaseYear) const;
1048 QDateTime toDateTime(const QString &string, FormatType format, QCalendar cal,
1049 int baseYear = DefaultTwoDigitBaseYear) const;
1050 QDateTime toDateTime(const QString &string, const QString &format, QCalendar cal,
1051 int baseYear = DefaultTwoDigitBaseYear) const;
1052 #endif
1053
1054 QString decimalPoint() const;
1055 QString groupSeparator() const;
1056 QString percent() const;
1057 QString zeroDigit() const;
1058 QString negativeSign() const;
1059 QString positiveSign() const;
1060 QString exponential() const;
1061
1062 QString monthName(int, FormatType format = LongFormat) const;
1063 QString standaloneMonthName(int, FormatType format = LongFormat) const;
1064 QString dayName(int, FormatType format = LongFormat) const;
1065 QString standaloneDayName(int, FormatType format = LongFormat) const;
1066
1067 Qt::DayOfWeek firstDayOfWeek() const;
1068 QList<Qt::DayOfWeek> weekdays() const;
1069
1070 QString amText() const;
1071 QString pmText() const;
1072
1073 MeasurementSystem measurementSystem() const;
1074 QLocale collation() const;
1075 Qt::LayoutDirection textDirection() const;
1076
1077 QString toUpper(const QString &str) const;
1078 QString toLower(const QString &str) const;
1079
1080 QString currencySymbol(CurrencySymbolFormat = CurrencySymbol) const;
1081 QString toCurrencyString(qlonglong, const QString &symbol = QString()) const;
1082 QString toCurrencyString(qulonglong, const QString &symbol = QString()) const;
1083 QString toCurrencyString(short i, const QString &symbol = QString()) const
1084 { return toCurrencyString(qlonglong(i), symbol); }
1085 QString toCurrencyString(ushort i, const QString &symbol = QString()) const
1086 { return toCurrencyString(qulonglong(i), symbol); }
1087 QString toCurrencyString(int i, const QString &symbol = QString()) const
1088 { return toCurrencyString(qlonglong(i), symbol); }
1089 QString toCurrencyString(uint i, const QString &symbol = QString()) const
1090 { return toCurrencyString(qulonglong(i), symbol); }
1091 QString toCurrencyString(double, const QString &symbol = QString(), int precision = -1) const;
1092 QString toCurrencyString(float i, const QString &symbol = QString(), int precision = -1) const
1093 { return toCurrencyString(double(i), symbol, precision); }
1094
1095 QString formattedDataSize(qint64 bytes, int precision = 2, DataSizeFormats format = DataSizeIecFormat) const;
1096
1097 #if QT_CORE_REMOVED_SINCE(6, 7)
1098 QStringList uiLanguages() const;
1099 #endif
1100 QStringList uiLanguages(TagSeparator separator = TagSeparator::Dash) const;
1101
1102 enum LanguageCodeType {
1103 ISO639Part1 = 1 << 0,
1104 ISO639Part2B = 1 << 1,
1105 ISO639Part2T = 1 << 2,
1106 ISO639Part3 = 1 << 3,
1107 LegacyLanguageCode = 1 << 15,
1108
1109 ISO639Part2 = ISO639Part2B | ISO639Part2T,
1110 ISO639Alpha2 = ISO639Part1,
1111 ISO639Alpha3 = ISO639Part2 | ISO639Part3,
1112 ISO639 = ISO639Alpha2 | ISO639Alpha3,
1113
1114 AnyLanguageCode = -1
1115 };
1116 Q_DECLARE_FLAGS(LanguageCodeTypes, LanguageCodeType)
1117 Q_FLAG(LanguageCodeTypes)
1118
1119 #if QT_CORE_REMOVED_SINCE(6, 3)
1120 static QString languageToCode(Language language);
1121 static Language codeToLanguage(QStringView languageCode) noexcept;
1122 #endif
1123 static QString languageToCode(Language language, LanguageCodeTypes codeTypes = AnyLanguageCode);
1124 static Language codeToLanguage(QStringView languageCode,
1125 LanguageCodeTypes codeTypes = AnyLanguageCode) noexcept;
1126 static QString territoryToCode(Territory territory);
1127 static Territory codeToTerritory(QStringView territoryCode) noexcept;
1128 #if QT_DEPRECATED_SINCE(6, 6)
1129 QT_DEPRECATED_VERSION_X_6_6("Use territoryToCode(Territory) instead")
1130 static QString countryToCode(Country country);
1131 QT_DEPRECATED_VERSION_X_6_6("Use codeToTerritory(QStringView) instead")
1132 static Country codeToCountry(QStringView countryCode) noexcept;
1133 #endif
1134 static QString scriptToCode(Script script);
1135 static Script codeToScript(QStringView scriptCode) noexcept;
1136
1137 static QString languageToString(Language language);
1138 static QString territoryToString(Territory territory);
1139 #if QT_DEPRECATED_SINCE(6, 6)
1140 QT_DEPRECATED_VERSION_X_6_6("Use territoryToString(Territory) instead")
1141 static QString countryToString(Country country);
1142 #endif
1143 static QString scriptToString(Script script);
1144 static void setDefault(const QLocale &locale);
1145
1146 static QLocale c() { return QLocale(C); }
1147 static QLocale system();
1148
1149 static QList<QLocale> matchingLocales(QLocale::Language language, QLocale::Script script,
1150 QLocale::Territory territory);
1151 #if QT_DEPRECATED_SINCE(6, 6)
1152 QT_DEPRECATED_VERSION_X_6_6("Query territory() on each entry from matchingLocales() instead")
1153 static QList<Country> countriesForLanguage(Language lang);
1154 #endif
1155
1156 void setNumberOptions(NumberOptions options);
1157 NumberOptions numberOptions() const;
1158
1159 enum QuotationStyle { StandardQuotation, AlternateQuotation };
1160 Q_ENUM(QuotationStyle)
1161 QString quoteString(const QString &str, QuotationStyle style = StandardQuotation) const
1162 { return quoteString(QStringView(str), style); }
1163 QString quoteString(QStringView str, QuotationStyle style = StandardQuotation) const;
1164
1165 QString createSeparatedList(const QStringList &strl) const;
1166
1167 private:
1168 QLocale(QLocalePrivate &dd);
1169 bool equals(const QLocale &other) const;
1170 friend class QLocalePrivate;
1171 friend class QSystemLocale;
1172 friend class QCalendarBackend;
1173 friend class QRomanCalendar;
1174 friend Q_CORE_EXPORT size_t qHash(const QLocale &key, size_t seed) noexcept;
1175
1176 friend bool operator==(const QLocale &lhs, const QLocale &rhs) { return lhs.equals(rhs); }
1177 friend bool operator!=(const QLocale &lhs, const QLocale &rhs) { return !lhs.equals(rhs); }
1178
1179 QSharedDataPointer<QLocalePrivate> d;
1180 };
1181 Q_DECLARE_SHARED(QLocale)
1182 Q_DECLARE_OPERATORS_FOR_FLAGS(QLocale::NumberOptions)
1183 Q_DECLARE_OPERATORS_FOR_FLAGS(QLocale::LanguageCodeTypes)
1184
1185 #if QT_CORE_INLINE_IMPL_SINCE(6, 4)
1186 QLocale::QLocale(const QString &name)
1187 : QLocale(qToStringViewIgnoringNull(name)) {}
1188 #endif
1189
1190 #ifndef QT_NO_DATASTREAM
1191 Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QLocale &);
1192 Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QLocale &);
1193 #endif
1194
1195 #ifndef QT_NO_DEBUG_STREAM
1196 Q_CORE_EXPORT QDebug operator<<(QDebug, const QLocale &);
1197 #endif
1198
1199 QT_END_NAMESPACE
1200
1201 #endif