1 /* 2 * DQt - D bindings for the Qt Toolkit 3 * 4 * GNU Lesser General Public License Usage 5 * This file may be used under the terms of the GNU Lesser 6 * General Public License version 3 as published by the Free Software 7 * Foundation and appearing in the file LICENSE.LGPL3 included in the 8 * packaging of this file. Please review the following information to 9 * ensure the GNU Lesser General Public License version 3 requirements 10 * will be met: https://www.gnu.org/licenses/lgpl-3.0.html. 11 */ 12 module qt.core.locale; 13 extern(C++): 14 15 import core.stdc.config; 16 import qt.config; 17 import qt.core.calendar; 18 import qt.core.datetime; 19 import qt.core.flags; 20 import qt.core.global; 21 import qt.core.list; 22 import qt.core.metamacros; 23 import qt.core.namespace; 24 import qt.core.shareddata; 25 import qt.core.string; 26 import qt.core.stringlist; 27 import qt.core.stringview; 28 import qt.core.typeinfo; 29 import qt.helpers; 30 31 /+ class QTextStream; 32 class QTextStreamPrivate; +/ 33 34 extern(C++, class) struct QLocalePrivate; 35 36 /+ Q_CORE_EXPORT size_t qHash(const QLocale &key, size_t seed = 0) noexcept; +/ 37 38 /// Binding for C++ class [QLocale](https://doc.qt.io/qt-6/qlocale.html). 39 @Q_RELOCATABLE_TYPE extern(C++, class) struct /+ Q_CORE_EXPORT +/ QLocale 40 { 41 mixin(Q_GADGET); 42 /+ friend class QString; +/ 43 /+ friend class QByteArray; +/ 44 /+ friend class QIntValidator; +/ 45 /+ friend class QDoubleValidatorPrivate; +/ 46 /+ friend class QTextStream; +/ 47 /+ friend class QTextStreamPrivate; +/ 48 49 public: 50 // see qlocale_data_p.h for more info on generated data 51 // GENERATED PART STARTS HERE 52 enum Language : ushort { 53 AnyLanguage = 0, 54 C = 1, 55 Abkhazian = 2, 56 Afar = 3, 57 Afrikaans = 4, 58 Aghem = 5, 59 Akan = 6, 60 Akkadian = 7, 61 Akoose = 8, 62 Albanian = 9, 63 AmericanSignLanguage = 10, 64 Amharic = 11, 65 AncientEgyptian = 12, 66 AncientGreek = 13, 67 Arabic = 14, 68 Aragonese = 15, 69 Aramaic = 16, 70 Armenian = 17, 71 Assamese = 18, 72 Asturian = 19, 73 Asu = 20, 74 Atsam = 21, 75 Avaric = 22, 76 Avestan = 23, 77 Aymara = 24, 78 Azerbaijani = 25, 79 Bafia = 26, 80 Balinese = 27, 81 Bambara = 28, 82 Bamun = 29, 83 Bangla = 30, 84 Basaa = 31, 85 Bashkir = 32, 86 Basque = 33, 87 BatakToba = 34, 88 Belarusian = 35, 89 Bemba = 36, 90 Bena = 37, 91 Bhojpuri = 38, 92 Bislama = 39, 93 Blin = 40, 94 Bodo = 41, 95 Bosnian = 42, 96 Breton = 43, 97 Buginese = 44, 98 Bulgarian = 45, 99 Burmese = 46, 100 Cantonese = 47, 101 Catalan = 48, 102 Cebuano = 49, 103 CentralAtlasTamazight = 50, 104 CentralKurdish = 51, 105 Chakma = 52, 106 Chamorro = 53, 107 Chechen = 54, 108 Cherokee = 55, 109 Chickasaw = 56, 110 Chiga = 57, 111 Chinese = 58, 112 Church = 59, 113 Chuvash = 60, 114 Colognian = 61, 115 Coptic = 62, 116 Cornish = 63, 117 Corsican = 64, 118 Cree = 65, 119 Croatian = 66, 120 Czech = 67, 121 Danish = 68, 122 Divehi = 69, 123 Dogri = 70, 124 Duala = 71, 125 Dutch = 72, 126 Dzongkha = 73, 127 Embu = 74, 128 English = 75, 129 Erzya = 76, 130 Esperanto = 77, 131 Estonian = 78, 132 Ewe = 79, 133 Ewondo = 80, 134 Faroese = 81, 135 Fijian = 82, 136 Filipino = 83, 137 Finnish = 84, 138 French = 85, 139 Friulian = 86, 140 Fulah = 87, 141 Gaelic = 88, 142 Ga = 89, 143 Galician = 90, 144 Ganda = 91, 145 Geez = 92, 146 Georgian = 93, 147 German = 94, 148 Gothic = 95, 149 Greek = 96, 150 Guarani = 97, 151 Gujarati = 98, 152 Gusii = 99, 153 Haitian = 100, 154 Hausa = 101, 155 Hawaiian = 102, 156 Hebrew = 103, 157 Herero = 104, 158 Hindi = 105, 159 HiriMotu = 106, 160 Hungarian = 107, 161 Icelandic = 108, 162 Ido = 109, 163 Igbo = 110, 164 InariSami = 111, 165 Indonesian = 112, 166 Ingush = 113, 167 Interlingua = 114, 168 Interlingue = 115, 169 Inuktitut = 116, 170 Inupiaq = 117, 171 Irish = 118, 172 Italian = 119, 173 Japanese = 120, 174 Javanese = 121, 175 Jju = 122, 176 JolaFonyi = 123, 177 Kabuverdianu = 124, 178 Kabyle = 125, 179 Kako = 126, 180 Kalaallisut = 127, 181 Kalenjin = 128, 182 Kamba = 129, 183 Kannada = 130, 184 Kanuri = 131, 185 Kashmiri = 132, 186 Kazakh = 133, 187 Kenyang = 134, 188 Khmer = 135, 189 Kiche = 136, 190 Kikuyu = 137, 191 Kinyarwanda = 138, 192 Komi = 139, 193 Kongo = 140, 194 Konkani = 141, 195 Korean = 142, 196 Koro = 143, 197 KoyraboroSenni = 144, 198 KoyraChiini = 145, 199 Kpelle = 146, 200 Kuanyama = 147, 201 Kurdish = 148, 202 Kwasio = 149, 203 Kyrgyz = 150, 204 Lakota = 151, 205 Langi = 152, 206 Lao = 153, 207 Latin = 154, 208 Latvian = 155, 209 Lezghian = 156, 210 Limburgish = 157, 211 Lingala = 158, 212 LiteraryChinese = 159, 213 Lithuanian = 160, 214 Lojban = 161, 215 LowerSorbian = 162, 216 LowGerman = 163, 217 LubaKatanga = 164, 218 LuleSami = 165, 219 Luo = 166, 220 Luxembourgish = 167, 221 Luyia = 168, 222 Macedonian = 169, 223 Machame = 170, 224 Maithili = 171, 225 MakhuwaMeetto = 172, 226 Makonde = 173, 227 Malagasy = 174, 228 Malayalam = 175, 229 Malay = 176, 230 Maltese = 177, 231 Mandingo = 178, 232 Manipuri = 179, 233 Manx = 180, 234 Maori = 181, 235 Mapuche = 182, 236 Marathi = 183, 237 Marshallese = 184, 238 Masai = 185, 239 Mazanderani = 186, 240 Mende = 187, 241 Meru = 188, 242 Meta = 189, 243 Mohawk = 190, 244 Mongolian = 191, 245 Morisyen = 192, 246 Mundang = 193, 247 Muscogee = 194, 248 Nama = 195, 249 NauruLanguage = 196, 250 Navajo = 197, 251 Ndonga = 198, 252 Nepali = 199, 253 Newari = 200, 254 Ngiemboon = 201, 255 Ngomba = 202, 256 NigerianPidgin = 203, 257 Nko = 204, 258 NorthernLuri = 205, 259 NorthernSami = 206, 260 NorthernSotho = 207, 261 NorthNdebele = 208, 262 NorwegianBokmal = 209, 263 NorwegianNynorsk = 210, 264 Nuer = 211, 265 Nyanja = 212, 266 Nyankole = 213, 267 Occitan = 214, 268 Odia = 215, 269 Ojibwa = 216, 270 OldIrish = 217, 271 OldNorse = 218, 272 OldPersian = 219, 273 Oromo = 220, 274 Osage = 221, 275 Ossetic = 222, 276 Pahlavi = 223, 277 Palauan = 224, 278 Pali = 225, 279 Papiamento = 226, 280 Pashto = 227, 281 Persian = 228, 282 Phoenician = 229, 283 Polish = 230, 284 Portuguese = 231, 285 Prussian = 232, 286 Punjabi = 233, 287 Quechua = 234, 288 Romanian = 235, 289 Romansh = 236, 290 Rombo = 237, 291 Rundi = 238, 292 Russian = 239, 293 Rwa = 240, 294 Saho = 241, 295 Sakha = 242, 296 Samburu = 243, 297 Samoan = 244, 298 Sango = 245, 299 Sangu = 246, 300 Sanskrit = 247, 301 Santali = 248, 302 Sardinian = 249, 303 Saurashtra = 250, 304 Sena = 251, 305 Serbian = 252, 306 Shambala = 253, 307 Shona = 254, 308 SichuanYi = 255, 309 Sicilian = 256, 310 Sidamo = 257, 311 Silesian = 258, 312 Sindhi = 259, 313 Sinhala = 260, 314 SkoltSami = 261, 315 Slovak = 262, 316 Slovenian = 263, 317 Soga = 264, 318 Somali = 265, 319 SouthernKurdish = 266, 320 SouthernSami = 267, 321 SouthernSotho = 268, 322 SouthNdebele = 269, 323 Spanish = 270, 324 StandardMoroccanTamazight = 271, 325 Sundanese = 272, 326 Swahili = 273, 327 Swati = 274, 328 Swedish = 275, 329 SwissGerman = 276, 330 Syriac = 277, 331 Tachelhit = 278, 332 Tahitian = 279, 333 TaiDam = 280, 334 Taita = 281, 335 Tajik = 282, 336 Tamil = 283, 337 Taroko = 284, 338 Tasawaq = 285, 339 Tatar = 286, 340 Telugu = 287, 341 Teso = 288, 342 Thai = 289, 343 Tibetan = 290, 344 Tigre = 291, 345 Tigrinya = 292, 346 TokelauLanguage = 293, 347 TokPisin = 294, 348 Tongan = 295, 349 Tsonga = 296, 350 Tswana = 297, 351 Turkish = 298, 352 Turkmen = 299, 353 TuvaluLanguage = 300, 354 Tyap = 301, 355 Ugaritic = 302, 356 Ukrainian = 303, 357 UpperSorbian = 304, 358 Urdu = 305, 359 Uyghur = 306, 360 Uzbek = 307, 361 Vai = 308, 362 Venda = 309, 363 Vietnamese = 310, 364 Volapuk = 311, 365 Vunjo = 312, 366 Walloon = 313, 367 Walser = 314, 368 Warlpiri = 315, 369 Welsh = 316, 370 WesternBalochi = 317, 371 WesternFrisian = 318, 372 Wolaytta = 319, 373 Wolof = 320, 374 Xhosa = 321, 375 Yangben = 322, 376 Yiddish = 323, 377 Yoruba = 324, 378 Zarma = 325, 379 Zhuang = 326, 380 Zulu = 327, 381 382 Afan = Language.Oromo, 383 Bengali = Language.Bangla, 384 Bhutani = Language.Dzongkha, 385 Byelorussian = Language.Belarusian, 386 Cambodian = Language.Khmer, 387 CentralMoroccoTamazight = Language.CentralAtlasTamazight, 388 Chewa = Language.Nyanja, 389 Frisian = Language.WesternFrisian, 390 Greenlandic = Language.Kalaallisut, 391 Inupiak = Language.Inupiaq, 392 Kirghiz = Language.Kyrgyz, 393 Kurundi = Language.Rundi, 394 Kwanyama = Language.Kuanyama, 395 Navaho = Language.Navajo, 396 Oriya = Language.Odia, 397 RhaetoRomance = Language.Romansh, 398 Uighur = Language.Uyghur, 399 Uigur = Language.Uyghur, 400 Walamo = Language.Wolaytta, 401 402 LastLanguage = Language.Zulu 403 } 404 405 enum Script : ushort { 406 AnyScript = 0, 407 AdlamScript = 1, 408 AhomScript = 2, 409 AnatolianHieroglyphsScript = 3, 410 ArabicScript = 4, 411 ArmenianScript = 5, 412 AvestanScript = 6, 413 BalineseScript = 7, 414 BamumScript = 8, 415 BanglaScript = 9, 416 BassaVahScript = 10, 417 BatakScript = 11, 418 BhaiksukiScript = 12, 419 BopomofoScript = 13, 420 BrahmiScript = 14, 421 BrailleScript = 15, 422 BugineseScript = 16, 423 BuhidScript = 17, 424 CanadianAboriginalScript = 18, 425 CarianScript = 19, 426 CaucasianAlbanianScript = 20, 427 ChakmaScript = 21, 428 ChamScript = 22, 429 CherokeeScript = 23, 430 CopticScript = 24, 431 CuneiformScript = 25, 432 CypriotScript = 26, 433 CyrillicScript = 27, 434 DeseretScript = 28, 435 DevanagariScript = 29, 436 DuployanScript = 30, 437 EgyptianHieroglyphsScript = 31, 438 ElbasanScript = 32, 439 EthiopicScript = 33, 440 FraserScript = 34, 441 GeorgianScript = 35, 442 GlagoliticScript = 36, 443 GothicScript = 37, 444 GranthaScript = 38, 445 GreekScript = 39, 446 GujaratiScript = 40, 447 GurmukhiScript = 41, 448 HangulScript = 42, 449 HanScript = 43, 450 HanunooScript = 44, 451 HanWithBopomofoScript = 45, 452 HatranScript = 46, 453 HebrewScript = 47, 454 HiraganaScript = 48, 455 ImperialAramaicScript = 49, 456 InscriptionalPahlaviScript = 50, 457 InscriptionalParthianScript = 51, 458 JamoScript = 52, 459 JapaneseScript = 53, 460 JavaneseScript = 54, 461 KaithiScript = 55, 462 KannadaScript = 56, 463 KatakanaScript = 57, 464 KayahLiScript = 58, 465 KharoshthiScript = 59, 466 KhmerScript = 60, 467 KhojkiScript = 61, 468 KhudawadiScript = 62, 469 KoreanScript = 63, 470 LannaScript = 64, 471 LaoScript = 65, 472 LatinScript = 66, 473 LepchaScript = 67, 474 LimbuScript = 68, 475 LinearAScript = 69, 476 LinearBScript = 70, 477 LycianScript = 71, 478 LydianScript = 72, 479 MahajaniScript = 73, 480 MalayalamScript = 74, 481 MandaeanScript = 75, 482 ManichaeanScript = 76, 483 MarchenScript = 77, 484 MeiteiMayekScript = 78, 485 MendeScript = 79, 486 MeroiticCursiveScript = 80, 487 MeroiticScript = 81, 488 ModiScript = 82, 489 MongolianScript = 83, 490 MroScript = 84, 491 MultaniScript = 85, 492 MyanmarScript = 86, 493 NabataeanScript = 87, 494 NewaScript = 88, 495 NewTaiLueScript = 89, 496 NkoScript = 90, 497 OdiaScript = 91, 498 OghamScript = 92, 499 OlChikiScript = 93, 500 OldHungarianScript = 94, 501 OldItalicScript = 95, 502 OldNorthArabianScript = 96, 503 OldPermicScript = 97, 504 OldPersianScript = 98, 505 OldSouthArabianScript = 99, 506 OrkhonScript = 100, 507 OsageScript = 101, 508 OsmanyaScript = 102, 509 PahawhHmongScript = 103, 510 PalmyreneScript = 104, 511 PauCinHauScript = 105, 512 PhagsPaScript = 106, 513 PhoenicianScript = 107, 514 PollardPhoneticScript = 108, 515 PsalterPahlaviScript = 109, 516 RejangScript = 110, 517 RunicScript = 111, 518 SamaritanScript = 112, 519 SaurashtraScript = 113, 520 SharadaScript = 114, 521 ShavianScript = 115, 522 SiddhamScript = 116, 523 SignWritingScript = 117, 524 SimplifiedHanScript = 118, 525 SinhalaScript = 119, 526 SoraSompengScript = 120, 527 SundaneseScript = 121, 528 SylotiNagriScript = 122, 529 SyriacScript = 123, 530 TagalogScript = 124, 531 TagbanwaScript = 125, 532 TaiLeScript = 126, 533 TaiVietScript = 127, 534 TakriScript = 128, 535 TamilScript = 129, 536 TangutScript = 130, 537 TeluguScript = 131, 538 ThaanaScript = 132, 539 ThaiScript = 133, 540 TibetanScript = 134, 541 TifinaghScript = 135, 542 TirhutaScript = 136, 543 TraditionalHanScript = 137, 544 UgariticScript = 138, 545 VaiScript = 139, 546 VarangKshitiScript = 140, 547 YiScript = 141, 548 549 BengaliScript = Script.BanglaScript, 550 MendeKikakuiScript = Script.MendeScript, 551 OriyaScript = Script.OdiaScript, 552 SimplifiedChineseScript = Script.SimplifiedHanScript, 553 TraditionalChineseScript = Script.TraditionalHanScript, 554 555 LastScript = Script.YiScript 556 } 557 558 // ### Qt 7: Rename to Territory 559 enum Country : ushort { 560 AnyTerritory = 0, 561 Afghanistan = 1, 562 AlandIslands = 2, 563 Albania = 3, 564 Algeria = 4, 565 AmericanSamoa = 5, 566 Andorra = 6, 567 Angola = 7, 568 Anguilla = 8, 569 Antarctica = 9, 570 AntiguaAndBarbuda = 10, 571 Argentina = 11, 572 Armenia = 12, 573 Aruba = 13, 574 AscensionIsland = 14, 575 Australia = 15, 576 Austria = 16, 577 Azerbaijan = 17, 578 Bahamas = 18, 579 Bahrain = 19, 580 Bangladesh = 20, 581 Barbados = 21, 582 Belarus = 22, 583 Belgium = 23, 584 Belize = 24, 585 Benin = 25, 586 Bermuda = 26, 587 Bhutan = 27, 588 Bolivia = 28, 589 BosniaAndHerzegovina = 29, 590 Botswana = 30, 591 BouvetIsland = 31, 592 Brazil = 32, 593 BritishIndianOceanTerritory = 33, 594 BritishVirginIslands = 34, 595 Brunei = 35, 596 Bulgaria = 36, 597 BurkinaFaso = 37, 598 Burundi = 38, 599 Cambodia = 39, 600 Cameroon = 40, 601 Canada = 41, 602 CanaryIslands = 42, 603 CapeVerde = 43, 604 CaribbeanNetherlands = 44, 605 CaymanIslands = 45, 606 CentralAfricanRepublic = 46, 607 CeutaAndMelilla = 47, 608 Chad = 48, 609 Chile = 49, 610 China = 50, 611 ChristmasIsland = 51, 612 ClippertonIsland = 52, 613 CocosIslands = 53, 614 Colombia = 54, 615 Comoros = 55, 616 CongoBrazzaville = 56, 617 CongoKinshasa = 57, 618 CookIslands = 58, 619 CostaRica = 59, 620 Croatia = 60, 621 Cuba = 61, 622 Curacao = 62, 623 Cyprus = 63, 624 Czechia = 64, 625 Denmark = 65, 626 DiegoGarcia = 66, 627 Djibouti = 67, 628 Dominica = 68, 629 DominicanRepublic = 69, 630 Ecuador = 70, 631 Egypt = 71, 632 ElSalvador = 72, 633 EquatorialGuinea = 73, 634 Eritrea = 74, 635 Estonia = 75, 636 Eswatini = 76, 637 Ethiopia = 77, 638 Europe = 78, 639 EuropeanUnion = 79, 640 FalklandIslands = 80, 641 FaroeIslands = 81, 642 Fiji = 82, 643 Finland = 83, 644 France = 84, 645 FrenchGuiana = 85, 646 FrenchPolynesia = 86, 647 FrenchSouthernTerritories = 87, 648 Gabon = 88, 649 Gambia = 89, 650 Georgia = 90, 651 Germany = 91, 652 Ghana = 92, 653 Gibraltar = 93, 654 Greece = 94, 655 Greenland = 95, 656 Grenada = 96, 657 Guadeloupe = 97, 658 Guam = 98, 659 Guatemala = 99, 660 Guernsey = 100, 661 GuineaBissau = 101, 662 Guinea = 102, 663 Guyana = 103, 664 Haiti = 104, 665 HeardAndMcDonaldIslands = 105, 666 Honduras = 106, 667 HongKong = 107, 668 Hungary = 108, 669 Iceland = 109, 670 India = 110, 671 Indonesia = 111, 672 Iran = 112, 673 Iraq = 113, 674 Ireland = 114, 675 IsleOfMan = 115, 676 Israel = 116, 677 Italy = 117, 678 IvoryCoast = 118, 679 Jamaica = 119, 680 Japan = 120, 681 Jersey = 121, 682 Jordan = 122, 683 Kazakhstan = 123, 684 Kenya = 124, 685 Kiribati = 125, 686 Kosovo = 126, 687 Kuwait = 127, 688 Kyrgyzstan = 128, 689 Laos = 129, 690 LatinAmerica = 130, 691 Latvia = 131, 692 Lebanon = 132, 693 Lesotho = 133, 694 Liberia = 134, 695 Libya = 135, 696 Liechtenstein = 136, 697 Lithuania = 137, 698 Luxembourg = 138, 699 Macao = 139, 700 Macedonia = 140, 701 Madagascar = 141, 702 Malawi = 142, 703 Malaysia = 143, 704 Maldives = 144, 705 Mali = 145, 706 Malta = 146, 707 MarshallIslands = 147, 708 Martinique = 148, 709 Mauritania = 149, 710 Mauritius = 150, 711 Mayotte = 151, 712 Mexico = 152, 713 Micronesia = 153, 714 Moldova = 154, 715 Monaco = 155, 716 Mongolia = 156, 717 Montenegro = 157, 718 Montserrat = 158, 719 Morocco = 159, 720 Mozambique = 160, 721 Myanmar = 161, 722 Namibia = 162, 723 NauruTerritory = 163, 724 Nepal = 164, 725 Netherlands = 165, 726 NewCaledonia = 166, 727 NewZealand = 167, 728 Nicaragua = 168, 729 Nigeria = 169, 730 Niger = 170, 731 Niue = 171, 732 NorfolkIsland = 172, 733 NorthernMarianaIslands = 173, 734 NorthKorea = 174, 735 Norway = 175, 736 Oman = 176, 737 OutlyingOceania = 177, 738 Pakistan = 178, 739 Palau = 179, 740 PalestinianTerritories = 180, 741 Panama = 181, 742 PapuaNewGuinea = 182, 743 Paraguay = 183, 744 Peru = 184, 745 Philippines = 185, 746 Pitcairn = 186, 747 Poland = 187, 748 Portugal = 188, 749 PuertoRico = 189, 750 Qatar = 190, 751 Reunion = 191, 752 Romania = 192, 753 Russia = 193, 754 Rwanda = 194, 755 SaintBarthelemy = 195, 756 SaintHelena = 196, 757 SaintKittsAndNevis = 197, 758 SaintLucia = 198, 759 SaintMartin = 199, 760 SaintPierreAndMiquelon = 200, 761 SaintVincentAndGrenadines = 201, 762 Samoa = 202, 763 SanMarino = 203, 764 SaoTomeAndPrincipe = 204, 765 SaudiArabia = 205, 766 Senegal = 206, 767 Serbia = 207, 768 Seychelles = 208, 769 SierraLeone = 209, 770 Singapore = 210, 771 SintMaarten = 211, 772 Slovakia = 212, 773 Slovenia = 213, 774 SolomonIslands = 214, 775 Somalia = 215, 776 SouthAfrica = 216, 777 SouthGeorgiaAndSouthSandwichIslands = 217, 778 SouthKorea = 218, 779 SouthSudan = 219, 780 Spain = 220, 781 SriLanka = 221, 782 Sudan = 222, 783 Suriname = 223, 784 SvalbardAndJanMayen = 224, 785 Sweden = 225, 786 Switzerland = 226, 787 Syria = 227, 788 Taiwan = 228, 789 Tajikistan = 229, 790 Tanzania = 230, 791 Thailand = 231, 792 TimorLeste = 232, 793 Togo = 233, 794 TokelauTerritory = 234, 795 Tonga = 235, 796 TrinidadAndTobago = 236, 797 TristanDaCunha = 237, 798 Tunisia = 238, 799 Turkey = 239, 800 Turkmenistan = 240, 801 TurksAndCaicosIslands = 241, 802 TuvaluTerritory = 242, 803 Uganda = 243, 804 Ukraine = 244, 805 UnitedArabEmirates = 245, 806 UnitedKingdom = 246, 807 UnitedStatesOutlyingIslands = 247, 808 UnitedStates = 248, 809 UnitedStatesVirginIslands = 249, 810 Uruguay = 250, 811 Uzbekistan = 251, 812 Vanuatu = 252, 813 VaticanCity = 253, 814 Venezuela = 254, 815 Vietnam = 255, 816 WallisAndFutuna = 256, 817 WesternSahara = 257, 818 World = 258, 819 Yemen = 259, 820 Zambia = 260, 821 Zimbabwe = 261, 822 823 AnyCountry = Country.AnyTerritory, 824 Bonaire = Country.CaribbeanNetherlands, 825 BosniaAndHerzegowina = Country.BosniaAndHerzegovina, 826 CuraSao = Country.Curacao, 827 CzechRepublic = Country.Czechia, 828 DemocraticRepublicOfCongo = Country.CongoKinshasa, 829 DemocraticRepublicOfKorea = Country.NorthKorea, 830 EastTimor = Country.TimorLeste, 831 LatinAmericaAndTheCaribbean = Country.LatinAmerica, 832 Macau = Country.Macao, 833 NauruCountry = Country.NauruTerritory, 834 PeoplesRepublicOfCongo = Country.CongoBrazzaville, 835 RepublicOfKorea = Country.SouthKorea, 836 RussianFederation = Country.Russia, 837 SaintVincentAndTheGrenadines = Country.SaintVincentAndGrenadines, 838 SouthGeorgiaAndTheSouthSandwichIslands = Country.SouthGeorgiaAndSouthSandwichIslands, 839 SvalbardAndJanMayenIslands = Country.SvalbardAndJanMayen, 840 Swaziland = Country.Eswatini, 841 SyrianArabRepublic = Country.Syria, 842 TokelauCountry = Country.TokelauTerritory, 843 TuvaluCountry = Country.TuvaluTerritory, 844 UnitedStatesMinorOutlyingIslands = Country.UnitedStatesOutlyingIslands, 845 VaticanCityState = Country.VaticanCity, 846 WallisAndFutunaIslands = Country.WallisAndFutuna, 847 848 LastTerritory = Country.Zimbabwe, 849 LastCountry = Country.LastTerritory 850 } 851 // GENERATED PART ENDS HERE 852 853 alias Territory = Country; // ### Qt 7: reverse 854 855 /+ Q_ENUM(Language) +/ 856 /+ Q_ENUM(Country) +/ 857 /+ Q_ENUM(Script) +/ 858 859 enum MeasurementSystem { 860 MetricSystem, 861 ImperialUSSystem, 862 ImperialUKSystem, 863 ImperialSystem = MeasurementSystem.ImperialUSSystem // Qt 4 compatibility 864 } 865 /+ Q_ENUM(MeasurementSystem) +/ 866 867 enum FormatType { LongFormat, ShortFormat, NarrowFormat } 868 enum NumberOption { 869 DefaultNumberOptions = 0x0, 870 OmitGroupSeparator = 0x01, 871 RejectGroupSeparator = 0x02, 872 OmitLeadingZeroInExponent = 0x04, 873 RejectLeadingZeroInExponent = 0x08, 874 IncludeTrailingZeroesAfterDot = 0x10, 875 RejectTrailingZeroesAfterDot = 0x20 876 } 877 /+ Q_DECLARE_FLAGS(NumberOptions, NumberOption) +/ 878 alias NumberOptions = QFlags!(NumberOption); 879 enum FloatingPointPrecisionOption { 880 FloatingPointShortest = -128 881 } 882 883 enum CurrencySymbolFormat { 884 CurrencyIsoCode, 885 CurrencySymbol, 886 CurrencyDisplayName 887 } 888 889 enum DataSizeFormat { 890 // Single-bit values, for internal use. 891 DataSizeBase1000 = 1, // use factors of 1000 instead of IEC's 1024; 892 DataSizeSIQuantifiers = 2, // use SI quantifiers instead of IEC ones. 893 894 // Flags values for use in API: 895 DataSizeIecFormat = 0, // base 1024, KiB, MiB, GiB, ... 896 DataSizeTraditionalFormat = DataSizeFormat.DataSizeSIQuantifiers, // base 1024, kB, MB, GB, ... 897 DataSizeSIFormat = DataSizeFormat.DataSizeBase1000 | DataSizeFormat.DataSizeSIQuantifiers // base 1000, kB, MB, GB, ... 898 } 899 /+ Q_DECLARE_FLAGS(DataSizeFormats, DataSizeFormat) +/ 900 alias DataSizeFormats = QFlags!(DataSizeFormat); /+ Q_FLAG(DataSizeFormats) +/ 901 902 @disable this(); 903 pragma(mangle, defaultConstructorMangling(__traits(identifier, typeof(this)))) 904 ref typeof(this) rawConstructor(); 905 static typeof(this) create() 906 { 907 typeof(this) r = typeof(this).init; 908 r.rawConstructor(); 909 return r; 910 } 911 912 /+ explicit +/this(ref const(QString) name); 913 this(Language language, Territory territory); 914 this(Language language, Script script = Script.AnyScript, Territory territory = Country.AnyTerritory); 915 @disable this(this); 916 this(ref const(QLocale) other); 917 /+ QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QLocale) +/ 918 /+ref QLocale operator =(ref const(QLocale) other);+/ 919 ~this(); 920 921 /+ void swap(QLocale &other) noexcept { qSwap(d, other.d); } +/ 922 923 Language language() const; 924 Script script() const; 925 Territory territory() const; 926 /+ #if QT_DEPRECATED_SINCE(6, 6) +/ 927 /+ QT_DEPRECATED_VERSION_X_6_6("Use territory() instead") +/ 928 Country country() const; 929 /+ #endif +/ 930 QString name() const; 931 932 QString bcp47Name() const; 933 QString nativeLanguageName() const; 934 QString nativeTerritoryName() const; 935 /+ #if QT_DEPRECATED_SINCE(6, 6) +/ 936 /+ QT_DEPRECATED_VERSION_X_6_6("Use nativeTerritoryName() instead") +/ 937 QString nativeCountryName() const; 938 /+ #endif 939 940 #if QT_STRINGVIEW_LEVEL < 2 +/ 941 static if(QT_STRINGVIEW_LEVEL < 2) 942 { 943 short toShort(ref const(QString) s, bool* ok = null) const 944 { return toShort(qToStringViewIgnoringNull(s), ok); } 945 ushort toUShort(ref const(QString) s, bool* ok = null) const 946 { return toUShort(qToStringViewIgnoringNull(s), ok); } 947 int toInt(ref const(QString) s, bool* ok = null) const 948 { return toInt(qToStringViewIgnoringNull(s), ok); } 949 uint toUInt(ref const(QString) s, bool* ok = null) const 950 { return toUInt(qToStringViewIgnoringNull(s), ok); } 951 cpp_long toLong(ref const(QString) s, bool* ok = null) const 952 { return toLong(qToStringViewIgnoringNull(s), ok); } 953 cpp_ulong toULong(ref const(QString) s, bool* ok = null) const 954 { return toULong(qToStringViewIgnoringNull(s), ok); } 955 qlonglong toLongLong(ref const(QString) s, bool* ok = null) const 956 { return toLongLong(qToStringViewIgnoringNull(s), ok); } 957 qulonglong toULongLong(ref const(QString) s, bool* ok = null) const 958 { return toULongLong(qToStringViewIgnoringNull(s), ok); } 959 float toFloat(ref const(QString) s, bool* ok = null) const 960 { return toFloat(qToStringViewIgnoringNull(s), ok); } 961 double toDouble(ref const(QString) s, bool* ok = null) const 962 { return toDouble(qToStringViewIgnoringNull(s), ok); } 963 } 964 /+ #endif +/ 965 966 short toShort(QStringView s, bool* ok = null) const; 967 ushort toUShort(QStringView s, bool* ok = null) const; 968 int toInt(QStringView s, bool* ok = null) const; 969 uint toUInt(QStringView s, bool* ok = null) const; 970 cpp_long toLong(QStringView s, bool* ok = null) const; 971 cpp_ulong toULong(QStringView s, bool* ok = null) const; 972 qlonglong toLongLong(QStringView s, bool* ok = null) const; 973 qulonglong toULongLong(QStringView s, bool* ok = null) const; 974 float toFloat(QStringView s, bool* ok = null) const; 975 double toDouble(QStringView s, bool* ok = null) const; 976 977 QString toString(qlonglong i) const; 978 QString toString(qulonglong i) const; 979 QString toString(cpp_long i) const { return toString(qlonglong(i)); } 980 QString toString(cpp_ulong i) const { return toString(qulonglong(i)); } 981 QString toString(short i) const { return toString(qlonglong(i)); } 982 QString toString(ushort i) const { return toString(qulonglong(i)); } 983 QString toString(int i) const { return toString(qlonglong(i)); } 984 QString toString(uint i) const { return toString(qulonglong(i)); } 985 QString toString(double f, char format = 'g', int precision = 6) const; 986 QString toString(float f, char format = 'g', int precision = 6) const 987 { return toString(double(f), format, precision); } 988 989 static if(QT_STRINGVIEW_LEVEL < 2) 990 { 991 // (Can't inline first two: passing by value doesn't work when only forward-declared.) 992 QString toString(QDate date, ref const(QString) format) const; 993 QString toString(QTime time, ref const(QString) format) const; 994 QString toString(ref const(QDateTime) dateTime, ref const(QString) format) const 995 { return toString(dateTime, qToStringViewIgnoringNull(format)); } 996 } 997 QString toString(QDate date, QStringView format) const; 998 QString toString(QTime time, QStringView format) const; 999 QString toString(ref const(QDateTime) dateTime, QStringView format) const; 1000 QString toString(QDate date, FormatType format = FormatType.LongFormat) const; 1001 QString toString(QTime time, FormatType format = FormatType.LongFormat) const; 1002 QString toString(ref const(QDateTime) dateTime, FormatType format = FormatType.LongFormat) const; 1003 /* We can't pass a default for QCalendar (its declaration mentions 1004 * QLocale::FormatType, so it has to #include this header, which thus can't 1005 * #include its, so we can't instantiate QCalendar() as default). This 1006 * precludes any default for format, too. 1007 */ 1008 QString toString(QDate date, QStringView format, QCalendar cal) const; 1009 QString toString(QDate date, FormatType format, QCalendar cal) const; 1010 QString toString(ref const(QDateTime) dateTime, FormatType format, QCalendar cal) const; 1011 QString toString(ref const(QDateTime) dateTime, QStringView format, QCalendar cal) const; 1012 1013 QString dateFormat(FormatType format = FormatType.LongFormat) const; 1014 QString timeFormat(FormatType format = FormatType.LongFormat) const; 1015 QString dateTimeFormat(FormatType format = FormatType.LongFormat) const; 1016 /+ #if QT_CONFIG(datestring) +/ 1017 QDate toDate(ref const(QString) string, FormatType /+ = LongFormat +/) const; 1018 QTime toTime(ref const(QString) string, FormatType /+ = LongFormat +/) const; 1019 QDateTime toDateTime(ref const(QString) string, FormatType format = FormatType.LongFormat) const; 1020 QDate toDate(ref const(QString) string, ref const(QString) format) const; 1021 QTime toTime(ref const(QString) string, ref const(QString) format) const; 1022 QDateTime toDateTime(ref const(QString) string, ref const(QString) format) const; 1023 // Calendar-aware API 1024 QDate toDate(ref const(QString) string, FormatType format, QCalendar cal) const; 1025 QDateTime toDateTime(ref const(QString) string, FormatType format, QCalendar cal) const; 1026 QDate toDate(ref const(QString) string, ref const(QString) format, QCalendar cal) const; 1027 QDateTime toDateTime(ref const(QString) string, ref const(QString) format, QCalendar cal) const; 1028 /+ #endif +/ 1029 1030 QString decimalPoint() const; 1031 QString groupSeparator() const; 1032 QString percent() const; 1033 QString zeroDigit() const; 1034 QString negativeSign() const; 1035 QString positiveSign() const; 1036 QString exponential() const; 1037 1038 QString monthName(int, FormatType format = FormatType.LongFormat) const; 1039 QString standaloneMonthName(int, FormatType format = FormatType.LongFormat) const; 1040 QString dayName(int, FormatType format = FormatType.LongFormat) const; 1041 QString standaloneDayName(int, FormatType format = FormatType.LongFormat) const; 1042 1043 /+ Qt:: +/qt.core.namespace.DayOfWeek firstDayOfWeek() const; 1044 QList!(/+ Qt:: +/qt.core.namespace.DayOfWeek) weekdays() const; 1045 1046 QString amText() const; 1047 QString pmText() const; 1048 1049 MeasurementSystem measurementSystem() const; 1050 QLocale collation() const; 1051 /+ Qt:: +/qt.core.namespace.LayoutDirection textDirection() const; 1052 1053 QString toUpper(ref const(QString) str) const; 1054 QString toLower(ref const(QString) str) const; 1055 1056 QString currencySymbol(CurrencySymbolFormat /+ = CurrencySymbol +/) const; 1057 QString toCurrencyString(qlonglong, ref const(QString) symbol = globalInitVar!QString) const; 1058 QString toCurrencyString(qulonglong, ref const(QString) symbol = globalInitVar!QString) const; 1059 QString toCurrencyString(short i, ref const(QString) symbol = globalInitVar!QString) const 1060 { return toCurrencyString(qlonglong(i), symbol); } 1061 QString toCurrencyString(ushort i, ref const(QString) symbol = globalInitVar!QString) const 1062 { return toCurrencyString(qulonglong(i), symbol); } 1063 QString toCurrencyString(int i, ref const(QString) symbol = globalInitVar!QString) const 1064 { return toCurrencyString(qlonglong(i), symbol); } 1065 QString toCurrencyString(uint i, ref const(QString) symbol = globalInitVar!QString) const 1066 { return toCurrencyString(qulonglong(i), symbol); } 1067 QString toCurrencyString(double, ref const(QString) symbol = globalInitVar!QString, int precision = -1) const; 1068 QString toCurrencyString(float i, ref const(QString) symbol = globalInitVar!QString, int precision = -1) const 1069 { return toCurrencyString(double(i), symbol, precision); } 1070 1071 QString formattedDataSize(qint64 bytes, int precision = 2, DataSizeFormats format = DataSizeFormat.DataSizeIecFormat) const; 1072 1073 QStringList uiLanguages() const; 1074 1075 static QString languageToCode(Language language); 1076 static Language codeToLanguage(QStringView languageCode)/+ noexcept+/; 1077 static QString territoryToCode(Territory territory); 1078 static Territory codeToTerritory(QStringView territoryCode)/+ noexcept+/; 1079 /+ #if QT_DEPRECATED_SINCE(6, 6) +/ 1080 /+ QT_DEPRECATED_VERSION_X_6_6("Use territoryToCode(Territory) instead") +/ 1081 static QString countryToCode(Country country); 1082 /+ QT_DEPRECATED_VERSION_X_6_6("Use codeToTerritory(QStringView) instead") +/ 1083 static Country codeToCountry(QStringView countryCode)/+ noexcept+/; 1084 /+ #endif +/ 1085 static QString scriptToCode(Script script); 1086 static Script codeToScript(QStringView scriptCode)/+ noexcept+/; 1087 1088 static QString languageToString(Language language); 1089 static QString territoryToString(Territory territory); 1090 /+ #if QT_DEPRECATED_SINCE(6, 6) +/ 1091 /+ QT_DEPRECATED_VERSION_X_6_6("Use territoryToString(Territory) instead") +/ 1092 static QString countryToString(Country country); 1093 /+ #endif +/ 1094 static QString scriptToString(Script script); 1095 static void setDefault(ref const(QLocale) locale); 1096 1097 static QLocale c() { return QLocale(Language.C); } 1098 static QLocale system(); 1099 1100 /*static QList!(QLocale) matchingLocales(Language language, Script script, 1101 Territory territory);*/ 1102 /+ #if QT_DEPRECATED_SINCE(6, 6) +/ 1103 /+ QT_DEPRECATED_VERSION_X_6_6("Query territory() on each entry from matchingLocales() instead") +/ 1104 static QList!(Country) countriesForLanguage(Language lang); 1105 /+ #endif +/ 1106 1107 void setNumberOptions(NumberOptions options); 1108 NumberOptions numberOptions() const; 1109 1110 enum QuotationStyle { StandardQuotation, AlternateQuotation } 1111 QString quoteString(ref const(QString) str, QuotationStyle style = QuotationStyle.StandardQuotation) const 1112 { return quoteString(QStringView(str), style); } 1113 QString quoteString(QStringView str, QuotationStyle style = QuotationStyle.StandardQuotation) const; 1114 1115 QString createSeparatedList(ref const(QStringList) strl) const; 1116 1117 private: 1118 this(ref QLocalePrivate dd); 1119 bool equals(ref const(QLocale) other) const; 1120 /+ friend class QLocalePrivate; +/ 1121 /+ friend class QSystemLocale; +/ 1122 /+ friend class QCalendarBackend; +/ 1123 /+ friend class QGregorianCalendar; +/ 1124 /+ friend Q_CORE_EXPORT size_t qHash(const QLocale &key, size_t seed) noexcept; +/ 1125 1126 /+ friend bool operator==(const QLocale &lhs, const QLocale &rhs) { return lhs.equals(rhs); } +/ 1127 /+ friend bool operator!=(const QLocale &lhs, const QLocale &rhs) { return !lhs.equals(rhs); } +/ 1128 1129 QSharedDataPointer!(QLocalePrivate) d; 1130 mixin(CREATE_CONVENIENCE_WRAPPERS); 1131 } 1132 /+pragma(inline, true) QFlags!(QLocale.NumberOptions.enum_type) operator |(QLocale.NumberOptions.enum_type f1, QLocale.NumberOptions.enum_type f2)/+noexcept+/{return QFlags!(QLocale.NumberOptions.enum_type)(f1)|f2;}+/ 1133 /+pragma(inline, true) QFlags!(QLocale.NumberOptions.enum_type) operator |(QLocale.NumberOptions.enum_type f1, QFlags!(QLocale.NumberOptions.enum_type) f2)/+noexcept+/{return f2|f1;}+/ 1134 /+pragma(inline, true) QFlags!(QLocale.NumberOptions.enum_type) operator &(QLocale.NumberOptions.enum_type f1, QLocale.NumberOptions.enum_type f2)/+noexcept+/{return QFlags!(QLocale.NumberOptions.enum_type)(f1)&f2;}+/ 1135 /+pragma(inline, true) QFlags!(QLocale.NumberOptions.enum_type) operator &(QLocale.NumberOptions.enum_type f1, QFlags!(QLocale.NumberOptions.enum_type) f2)/+noexcept+/{return f2&f1;}+/ 1136 /+pragma(inline, true) void operator +(QLocale.NumberOptions.enum_type f1, QLocale.NumberOptions.enum_type f2)/+noexcept+/;+/ 1137 /+pragma(inline, true) void operator +(QLocale.NumberOptions.enum_type f1, QFlags!(QLocale.NumberOptions.enum_type) f2)/+noexcept+/;+/ 1138 /+pragma(inline, true) void operator +(int f1, QFlags!(QLocale.NumberOptions.enum_type) f2)/+noexcept+/;+/ 1139 /+pragma(inline, true) void operator -(QLocale.NumberOptions.enum_type f1, QLocale.NumberOptions.enum_type f2)/+noexcept+/;+/ 1140 /+pragma(inline, true) void operator -(QLocale.NumberOptions.enum_type f1, QFlags!(QLocale.NumberOptions.enum_type) f2)/+noexcept+/;+/ 1141 /+pragma(inline, true) void operator -(int f1, QFlags!(QLocale.NumberOptions.enum_type) f2)/+noexcept+/;+/ 1142 /+pragma(inline, true) QIncompatibleFlag operator |(QLocale.NumberOptions.enum_type f1, int f2)/+noexcept+/{return QIncompatibleFlag(int(f1)|f2);}+/ 1143 /+pragma(inline, true) void operator +(int f1, QLocale.NumberOptions.enum_type f2)/+noexcept+/;+/ 1144 /+pragma(inline, true) void operator +(QLocale.NumberOptions.enum_type f1, int f2)/+noexcept+/;+/ 1145 /+pragma(inline, true) void operator -(int f1, QLocale.NumberOptions.enum_type f2)/+noexcept+/;+/ 1146 /+pragma(inline, true) void operator -(QLocale.NumberOptions.enum_type f1, int f2)/+noexcept+/;+/ 1147 /+ Q_DECLARE_SHARED(QLocale) 1148 Q_DECLARE_OPERATORS_FOR_FLAGS(QLocale::NumberOptions) 1149 #ifndef QT_NO_DATASTREAM 1150 Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QLocale &); 1151 Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QLocale &); 1152 #endif 1153 1154 #ifndef QT_NO_DEBUG_STREAM 1155 Q_CORE_EXPORT QDebug operator<<(QDebug, const QLocale &); 1156 #endif +/ 1157