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