/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free ** Documentation License version 1.3 as published by the Free Software ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements ** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ /*! \class QLocale \inmodule QtCore \brief The QLocale class converts between numbers and their string representations in various languages. \reentrant \ingroup i18n \ingroup string-processing \ingroup shared QLocale is initialized with a language/country pair in its constructor and offers number-to-string and string-to-number conversion functions similar to those in QString. Example: \snippet code/src_corelib_tools_qlocale.cpp 0 QLocale supports the concept of a default locale, which is determined from the system's locale settings at application startup. The default locale can be changed by calling the static member setDefault(). Setting the default locale has the following effects: \list \li If a QLocale object is constructed with the default constructor, it will use the default locale's settings. \li QString::toInt(), QString::toDouble(), etc., interpret the string according to the default locale. If this fails, it falls back on the "C" locale. \li QString::arg() uses the default locale to format a number when its position specifier in the format string contains an 'L', e.g. "%L1". \endlist The following example illustrates how to use QLocale directly: \snippet code/src_corelib_tools_qlocale.cpp 1 When a language/country pair is specified in the constructor, one of three things can happen: \list \li If the language/country pair is found in the database, it is used. \li If the language is found but the country is not, or if the country is \c AnyCountry, the language is used with the most appropriate available country (for example, Germany for German), \li If neither the language nor the country are found, QLocale defaults to the default locale (see setDefault()). \endlist Use language() and country() to determine the actual language and country values used. An alternative method for constructing a QLocale object is by specifying the locale name. \snippet code/src_corelib_tools_qlocale.cpp 2 This constructor converts the locale name to a language/country pair; it does not use the system locale database. \note For the current keyboard input locale take a look at QInputMethod::locale(). QLocale's data is based on Common Locale Data Repository v34. \sa QString::arg(), QString::toInt(), QString::toDouble(), QInputMethod::locale() */ /*! \enum QLocale::Language This enumerated type is used to specify a language. \value AnyLanguage \value C The "C" locale is identical in behavior to English/UnitedStates. \value Abkhazian \value Afan Obsolete, please use Oromo \value Afar \value Afrikaans \value Aghem \value Ahom Since Qt 5.7 \value Akan \value Akkadian Since Qt 5.1 \value Akoose Since Qt 5.3 \value Albanian \value AmericanSignLanguage Since Qt 5.7 \value Amharic \value AncientEgyptian Since Qt 5.1 \value AncientGreek Since Qt 5.1 \value AncientNorthArabian Since Qt 5.5 \value Arabic \value Aragonese Since Qt 5.1 \value Aramaic Since Qt 5.1 \value ArdhamagadhiPrakrit Since Qt 5.7 \value Armenian \value Assamese \value Asturian \value Asu \value Atsam \value Avaric \value Avestan \value Aymara \value Azerbaijani \value Bafia \value Balinese Since Qt 5.1 \value Bambara \value Bamun Since Qt 5.1 \value Basaa \value Bashkir \value Basque \value Bassa Since Qt 5.5 \value BatakToba Since Qt 5.1 \value Belarusian \value Bemba \value Bena \value Bengali \value Bhojpuri Since Qt 5.7 \value Bhutani Obsolete, please use Dzongkha \value Bihari \value Bislama \value Blin \value Bodo \value Bosnian \value Breton \value Buginese Since Qt 5.1 \value Buhid Since Qt 5.1 \value Bulgarian \value Burmese \value Byelorussian Obsolete, please use Belarusian \value Cambodian Obsolete, please use Khmer \value Cantonese Since Qt 5.7 \value Carian Since Qt 5.1 \value Catalan \value CentralKurdish Since Qt 5.5 \value CentralMoroccoTamazight \value Chakma Since Qt 5.1 \value Chamorro \value Chechen \value Cherokee \value Chewa Obsolete, please use Nyanja \value Chiga \value Chinese \value Church \value Chuvash \value ClassicalMandaic Since Qt 5.1 \value Colognian \value CongoSwahili \value Coptic Since Qt 5.1 \value Cornish \value Corsican \value Cree \value Croatian \value Czech \value Danish \value Divehi \value Dogri Since Qt 5.1 \value Duala \value Dutch \value Dzongkha \value EasternCham Since Qt 5.1 \value EasternKayah Since Qt 5.1 \value Embu \value English \value Esperanto \value Estonian \value Etruscan Since Qt 5.1 \value Ewe \value Ewondo \value Faroese \value Fijian \value Filipino \value Finnish \value French \value Frisian same as WesternFrisian \value Friulian \value Fulah \value Ga \value Gaelic \value Galician \value Ganda \value Geez \value Georgian \value German \value Gothic Since Qt 5.1 \value Greek \value Greenlandic \value Guarani \value Gujarati \value Gusii \value Haitian \value Hanunoo Since Qt 5.1 \value Hausa \value Hawaiian \value Hebrew \value Herero \value HieroglyphicLuwian Since Qt 5.7 \value Hindi \value HiriMotu \value HmongNjua Since Qt 5.5 \value Ho Since Qt 5.5 \value Hungarian \value Icelandic \value Ido Since Qt 5.12 \value Igbo \value InariSami Since Qt 5.5 \value Indonesian \value Ingush Since Qt 5.1 \value Interlingua \value Interlingue \value Inuktitut \value Inupiak \value Irish \value Italian \value Japanese \value Javanese \value Jju \value JolaFonyi \value Kabuverdianu \value Kabyle \value Kako \value Kalenjin \value Kamba \value Kannada \value Kanuri \value Kashmiri \value Kazakh \value Kenyang Since Qt 5.5 \value Khmer \value Kiche Since Qt 5.5 \value Kikuyu \value Kinyarwanda \value Kirghiz \value Komi \value Kongo \value Konkani \value Korean \value Koro \value KoyraboroSenni \value KoyraChiini \value Kpelle \value Kurdish \value Kurundi Obsolete, please use Rundi \value Kwanyama \value Kwasio \value Lakota Since Qt 5.3 \value Langi \value Lao \value LargeFloweryMiao Since Qt 5.1 \value Latin \value Latvian \value Lepcha Since Qt 5.1 \value Lezghian Since Qt 5.5 \value Limburgish \value Limbu Since Qt 5.1 \value LinearA Since Qt 5.5 \value Lingala \value Lisu Since Qt 5.1 \value LiteraryChinese Since Qt 5.7 \value Lithuanian \value Lojban Since Qt 5.12 \value LowerSorbian Since Qt 5.5 \value LowGerman \value LubaKatanga \value LuleSami Since Qt 5.5 \value Luo \value Lu Since Qt 5.1 \value Luxembourgish \value Luyia \value Lycian Since Qt 5.1 \value Lydian Since Qt 5.1 \value Macedonian \value Machame \value Maithili Since Qt 5.5 \value MakhuwaMeetto \value Makonde \value Malagasy \value Malay \value Malayalam \value Maltese \value Mandingo Since Qt 5.1 \value ManichaeanMiddlePersian Since Qt 5.5 \value Manipuri Since Qt 5.1 \value Manx \value Maori \value Mapuche Since Qt 5.5 \value Marathi \value Marshallese \value Masai \value Mazanderani Since Qt 5.7 \value Mende Since Qt 5.5 \value Meroitic Since Qt 5.1 \value Meru \value Meta \value Mohawk Since Qt 5.5 \value Moldavian Obsolete, please use Romanian \value Mongolian \value Mono Since Qt 5.5 \value Morisyen \value Mru Since Qt 5.7 \value Mundang \value Nama \value NauruLanguage \value Navaho \value Ndonga \value Nepali \value Newari Since Qt 5.7 \value Ngiemboon \value Ngomba \value Nko Since Qt 5.5 \value NorthernLuri Since Qt 5.7 \value NorthernSami \value NorthernSotho \value NorthernThai Since Qt 5.1 \value NorthNdebele \value NorwegianBokmal same as Norwegian \value NorwegianNynorsk \value Norwegian same as NorwegianBokmal \value Nuer \value Nyanja \value Nyankole \value Occitan \value Ojibwa \value OldIrish Since Qt 5.1 \value OldNorse Since Qt 5.1 \value OldPersian Since Qt 5.1 \value OldTurkish Since Qt 5.1 \value Oriya \value Oromo \value Osage Since Qt 5.7 \value Ossetic \value Pahlavi Since Qt 5.1 \value Palauan Since Qt 5.7 \value Pali \value Papiamento Since Qt 5.7 \value Parthian Since Qt 5.1 \value Pashto \value Persian \value Phoenician Since Qt 5.1 \value Polish \value Portuguese \value PrakritLanguage Since Qt 5.1 \value Prussian Since Qt 5.5 \value Punjabi \value Quechua \value Rejang Since Qt 5.1 \value RhaetoRomance Obsolete, please use Romansh \value Romanian \value Romansh \value Rombo \value Rundi \value Russian \value Rwa \value Sabaean Since Qt 5.1 \value Saho \value Sakha \value Samaritan Since Qt 5.1 \value Samburu \value Samoan \value Sango \value Sangu \value Sanskrit \value Santali Since Qt 5.1 \value Saraiki Since Qt 5.7 \value Sardinian \value Saurashtra Since Qt 5.1 \value Sena \value Serbian \value SerboCroatian Obsolete, please use Serbian \value Shambala \value Shona \value SichuanYi \value Sicilian Since Qt 5.12 \value Sidamo \value Sindhi \value Sinhala \value SkoltSami Since Qt 5.5 \value Slovak \value Slovenian \value Soga \value Somali \value Sora Since Qt 5.1 \value SouthernKurdish Since Qt 5.12 \value SouthernSami Since Qt 5.5 \value SouthernSotho \value SouthNdebele \value Spanish \value StandardMoroccanTamazight Since Qt 5.3 \value Sundanese \value Swahili \value Swati \value Swedish \value SwissGerman \value Sylheti Since Qt 5.1 \value Syriac \value Tachelhit \value Tagalog Obsolete, please use Filipino \value Tagbanwa Since Qt 5.1 \value Tahitian \value TaiDam Since Qt 5.1 \value TaiNua Since Qt 5.1 \value Taita \value Tajik \value Tamil \value Tangut Since Qt 5.7 \value Taroko \value Tasawaq \value Tatar \value TedimChin Since Qt 5.5 \value Telugu \value Teso \value Thai \value Tibetan \value Tigre \value Tigrinya \value TokelauLanguage Since Qt 5.7 \value TokPisin Since Qt 5.7 \value Tongan \value Tsonga \value Tswana \value Turkish \value Turkmen \value TuvaluLanguage Since Qt 5.7 \value Twi Obsolete, please use Akan \value Tyap \value Ugaritic Since Qt 5.1 \value Uighur \value Uigur Obsolete, please use Uighur \value Ukrainian \value UncodedLanguages Since Qt 5.7 \value UpperSorbian Since Qt 5.5 \value Urdu \value Uzbek \value Vai \value Venda \value Vietnamese \value Volapuk \value Vunjo \value Walamo \value Walloon \value Walser \value Warlpiri Since Qt 5.5 \value Welsh \value WesternBalochi Since Qt 5.12 \value WesternFrisian same as Frisian \value Wolof \value Xhosa \value Yangben \value Yiddish \value Yoruba \value Zarma \value Zhuang \value Zulu \omitvalue LastLanguage \sa language(), languageToString() */ /*! \enum QLocale::Country This enumerated type is used to specify a country. \value AnyCountry \value Afghanistan \value AlandIslands \value Albania \value Algeria \value AmericanSamoa \value Andorra \value Angola \value Anguilla \value Antarctica \value AntiguaAndBarbuda \value Argentina \value Armenia \value Aruba \value AscensionIsland \value Australia \value Austria \value Azerbaijan \value Bahamas \value Bahrain \value Bangladesh \value Barbados \value Belarus \value Belgium \value Belize \value Benin \value Bermuda \value Bhutan \value Bolivia \value Bonaire \value BosniaAndHerzegowina \value Botswana \value BouvetIsland \value Brazil \value BritishIndianOceanTerritory \value BritishVirginIslands \value Brunei \value Bulgaria \value BurkinaFaso \value Burundi \value Cambodia \value Cameroon \value Canada \value CanaryIslands \value CapeVerde \value CaymanIslands \value CentralAfricanRepublic \value CeutaAndMelilla \value Chad \value Chile \value China \value ChristmasIsland \value ClippertonIsland \value CocosIslands \value Colombia \value Comoros \value CongoBrazzaville \value CongoKinshasa \value CookIslands \value CostaRica \value Croatia \value Cuba \value CuraSao \value Cyprus \value CzechRepublic \value DemocraticRepublicOfCongo Obsolete, please use CongoKinshasa \value DemocraticRepublicOfKorea Obsolete, please use NorthKorea \value Denmark \value DiegoGarcia \value Djibouti \value Dominica \value DominicanRepublic \value EastTimor \value Ecuador \value Egypt \value ElSalvador \value EquatorialGuinea \value Eritrea \value Estonia \value Ethiopia \value EuropeanUnion Since Qt 5.7 \value Europe Since Qt 5.12 \value FalklandIslands \value FaroeIslands \value Fiji \value Finland \value France \value FrenchGuiana \value FrenchPolynesia \value FrenchSouthernTerritories \value Gabon \value Gambia \value Georgia \value Germany \value Ghana \value Gibraltar \value Greece \value Greenland \value Grenada \value Guadeloupe \value Guam \value Guatemala \value Guernsey \value Guinea \value GuineaBissau \value Guyana \value Haiti \value HeardAndMcDonaldIslands \value Honduras \value HongKong \value Hungary \value Iceland \value India \value Indonesia \value Iran \value Iraq \value Ireland \value IsleOfMan \value Israel \value Italy \value IvoryCoast \value Jamaica \value Japan \value Jersey \value Jordan \value Kazakhstan \value Kenya \value Kiribati \value Kosovo Since Qt 5.2 \value Kuwait \value Kyrgyzstan \value Laos \value LatinAmerica \value LatinAmericaAndTheCaribbean Obsolete, please use LatinAmerica \value Latvia \value Lebanon \value Lesotho \value Liberia \value Libya \value Liechtenstein \value Lithuania \value Luxembourg \value Macau \value Macedonia \value Madagascar \value Malawi \value Malaysia \value Maldives \value Mali \value Malta \value MarshallIslands \value Martinique \value Mauritania \value Mauritius \value Mayotte \value Mexico \value Micronesia \value Moldova \value Monaco \value Mongolia \value Montenegro \value Montserrat \value Morocco \value Mozambique \value Myanmar \value Namibia \value NauruCountry \value Nepal \value Netherlands \value NewCaledonia \value NewZealand \value Nicaragua \value Niger \value Nigeria \value Niue \value NorfolkIsland \value NorthernMarianaIslands \value NorthKorea \value Norway \value Oman \value OutlyingOceania Since Qt 5.7 \value Pakistan \value Palau \value PalestinianTerritories \value Panama \value PapuaNewGuinea \value Paraguay \value PeoplesRepublicOfCongo Obsolete, please use CongoBrazzaville \value Peru \value Philippines \value Pitcairn \value Poland \value Portugal \value PuertoRico \value Qatar \value RepublicOfKorea Obsolete, please use SouthKorea \value Reunion \value Romania \value RussianFederation same as Russia \value Russia same as RussianFederation \value Rwanda \value SaintBarthelemy \value SaintHelena \value SaintKittsAndNevis \value SaintLucia \value SaintMartin \value SaintPierreAndMiquelon \value SaintVincentAndTheGrenadines \value Samoa \value SanMarino \value SaoTomeAndPrincipe \value SaudiArabia \value Senegal \value Serbia \value Seychelles \value SierraLeone \value Singapore \value SintMaarten \value Slovakia \value Slovenia \value SolomonIslands \value Somalia \value SouthAfrica \value SouthGeorgiaAndTheSouthSandwichIslands \value SouthKorea \value SouthSudan \value Spain \value SriLanka \value Sudan \value Suriname \value SvalbardAndJanMayenIslands \value Swaziland \value Sweden \value Switzerland \value Syria \value SyrianArabRepublic Obsolete, please use Syria \value Taiwan \value Tajikistan \value Tanzania \value Thailand \value Togo \value TokelauCountry \value Tokelau Obsolete, please use TokelauCountry \value Tonga \value TrinidadAndTobago \value TristanDaCunha \value Tunisia \value Turkey \value Turkmenistan \value TurksAndCaicosIslands \value TuvaluCountry \value Tuvalu Obsolete, please use TuvaluCountry \value Uganda \value Ukraine \value UnitedArabEmirates \value UnitedKingdom \value UnitedStates \value UnitedStatesMinorOutlyingIslands \value UnitedStatesVirginIslands \value Uruguay \value Uzbekistan \value Vanuatu \value VaticanCityState \value Venezuela \value Vietnam \value WallisAndFutunaIslands \value WesternSahara \value World Since Qt 5.12 \value Yemen \value Zambia \value Zimbabwe \omitvalue LastCountry \sa country(), countryToString() */ /*! \enum QLocale::Script This enumerated type is used to specify a script. \value AnyScript \value AdlamScript Since Qt 5.7 \value AhomScript Since Qt 5.7 \value AnatolianHieroglyphsScript Since Qt 5.7 \value ArabicScript \value ArmenianScript \value AvestanScript Since Qt 5.1 \value BalineseScript Since Qt 5.1 \value BamumScript Since Qt 5.1 \value BassaVahScript Since Qt 5.5 \value BatakScript Since Qt 5.1 \value BengaliScript \value BhaiksukiScript Since Qt 5.7 \value BopomofoScript Since Qt 5.1 \value BrahmiScript Since Qt 5.1 \value BrailleScript Since Qt 5.1 \value BugineseScript Since Qt 5.1 \value BuhidScript Since Qt 5.1 \value CanadianAboriginalScript Since Qt 5.1 \value CarianScript Since Qt 5.1 \value CaucasianAlbanianScript Since Qt 5.5 \value ChakmaScript Since Qt 5.1 \value ChamScript Since Qt 5.1 \value CherokeeScript \value CopticScript Since Qt 5.1 \value CuneiformScript Since Qt 5.1 \value CypriotScript Since Qt 5.1 \value CyrillicScript \value DeseretScript Since Qt 5.1 \value DevanagariScript \value DuployanScript Since Qt 5.5 \value EgyptianHieroglyphsScript Since Qt 5.1 \value ElbasanScript Since Qt 5.5 \value EthiopicScript \value FraserScript Since Qt 5.1 \value GeorgianScript \value GlagoliticScript Since Qt 5.1 \value GothicScript Since Qt 5.1 \value GranthaScript Since Qt 5.5 \value GreekScript \value GujaratiScript \value GurmukhiScript \value HangulScript Since Qt 5.1 \value HanScript Since Qt 5.1 \value HanunooScript Since Qt 5.1 \value HanWithBopomofoScript Since Qt 5.7 \value HatranScript Since Qt 5.7 \value HebrewScript \value HiraganaScript Since Qt 5.1 \value ImperialAramaicScript Since Qt 5.1 \value InscriptionalPahlaviScript Since Qt 5.1 \value InscriptionalParthianScript Since Qt 5.1 \value JamoScript Since Qt 5.7 \value JapaneseScript \value JavaneseScript Since Qt 5.1 \value KaithiScript Since Qt 5.1 \value KannadaScript \value KatakanaScript Since Qt 5.1 \value KayahLiScript Since Qt 5.1 \value KharoshthiScript Since Qt 5.1 \value KhmerScript Since Qt 5.1 \value KhojkiScript Since Qt 5.5 \value KhudawadiScript Since Qt 5.5 \value KoreanScript \value LannaScript Since Qt 5.1 \value LaoScript \value LatinScript \value LepchaScript Since Qt 5.1 \value LimbuScript Since Qt 5.1 \value LinearAScript Since Qt 5.5 \value LinearBScript Since Qt 5.1 \value LycianScript Since Qt 5.1 \value LydianScript Since Qt 5.1 \value MahajaniScript Since Qt 5.5 \value MalayalamScript \value MandaeanScript Since Qt 5.1 \value ManichaeanScript Since Qt 5.5 \value MarchenScript Since Qt 5.7 \value MeiteiMayekScript Since Qt 5.1 \value MendeKikakuiScript Since Qt 5.5 \value MeroiticCursiveScript Since Qt 5.1 \value MeroiticScript Since Qt 5.1 \value ModiScript Since Qt 5.5 \value MongolianScript \value MroScript Since Qt 5.5 \value MultaniScript Since Qt 5.7 \value MyanmarScript \value NabataeanScript Since Qt 5.5 \value NewaScript Since Qt 5.7 \value NewTaiLueScript Since Qt 5.1 \value NkoScript Since Qt 5.1 \value OghamScript Since Qt 5.1 \value OlChikiScript Since Qt 5.1 \value OldHungarianScript Since Qt 5.7 \value OldItalicScript Since Qt 5.1 \value OldNorthArabianScript Since Qt 5.5 \value OldPermicScript Since Qt 5.5 \value OldPersianScript Since Qt 5.1 \value OldSouthArabianScript Since Qt 5.1 \value OriyaScript \value OrkhonScript Since Qt 5.1 \value OsageScript Since Qt 5.7 \value OsmanyaScript Since Qt 5.1 \value PahawhHmongScript Since Qt 5.5 \value PalmyreneScript Since Qt 5.5 \value PauCinHauScript Since Qt 5.5 \value PhagsPaScript Since Qt 5.1 \value PhoenicianScript Since Qt 5.1 \value PollardPhoneticScript Since Qt 5.1 \value PsalterPahlaviScript Since Qt 5.5 \value RejangScript Since Qt 5.1 \value RunicScript Since Qt 5.1 \value SamaritanScript Since Qt 5.1 \value SaurashtraScript Since Qt 5.1 \value SharadaScript Since Qt 5.1 \value ShavianScript Since Qt 5.1 \value SiddhamScript Since Qt 5.5 \value SignWritingScript Since Qt 5.7 \value SimplifiedChineseScript same as SimplifiedHanScript \value SimplifiedHanScript same as SimplifiedChineseScript \value SinhalaScript \value SoraSompengScript Since Qt 5.1 \value SundaneseScript Since Qt 5.1 \value SylotiNagriScript Since Qt 5.1 \value SyriacScript \value TagalogScript Since Qt 5.1 \value TagbanwaScript Since Qt 5.1 \value TaiLeScript Since Qt 5.1 \value TaiVietScript Since Qt 5.1 \value TakriScript Since Qt 5.1 \value TamilScript \value TangutScript Since Qt 5.7 \value TeluguScript \value ThaanaScript \value ThaiScript \value TibetanScript \value TifinaghScript \value TirhutaScript Since Qt 5.5 \value TraditionalChineseScript same as TraditionalHanScript \value TraditionalHanScript same as TraditionalChineseScript \value UgariticScript Since Qt 5.1 \value VaiScript \value VarangKshitiScript Since Qt 5.5 \value YiScript \omitvalue LastScript \sa script(), scriptToString(), languageToString() */ /*! \enum QLocale::FormatType This enum describes the types of format that can be used when converting QDate and QTime objects to strings. \value LongFormat The long version of day and month names; for example, returning "January" as a month name. \value ShortFormat The short version of day and month names; for example, returning "Jan" as a month name. \value NarrowFormat A special version of day and month names for use when space is limited; for example, returning "J" as a month name. Note that the narrow format might contain the same text for different months and days or it can even be an empty string if the locale doesn't support narrow names, so you should avoid using it for date formatting. Also, for the system locale this format is the same as ShortFormat. \sa QDateTime::toString(), QDate::toString(), QTime::toString() */ /*! \enum QLocale::NumberOption This enum defines a set of options for number-to-string and string-to-number conversions. They can be retrieved with numberOptions() and set with setNumberOptions(). \value DefaultNumberOptions This option represents the default behavior, with group separators, with one leading zero in single digit exponents, and without trailing zeroes after the decimal dot. \value OmitGroupSeparator If this option is set, the number-to-string functions will not insert group separators in their return values. The default is to insert group separators. \value RejectGroupSeparator If this option is set, the string-to-number functions will fail if they encounter group separators in their input. The default is to accept numbers containing correctly placed group separators. \value OmitLeadingZeroInExponent If this option is set, the number-to-string functions will not pad exponents with zeroes when printing floating point numbers in scientific notation. The default is to add one leading zero to single digit exponents. \value RejectLeadingZeroInExponent If this option is set, the string-to-number functions will fail if they encounter an exponent padded with zeroes when parsing a floating point number in scientific notation. The default is to accept such padding. \value IncludeTrailingZeroesAfterDot If this option is set, the number-to-string functions will pad numbers with zeroes to the requested precision in "g" or "most concise" mode, even if the number of significant digits is lower than the requested precision. The default is to omit trailing zeroes. \value RejectTrailingZeroesAfterDot If this option is set, the string-to-number functions will fail if they encounter trailing zeroes after the decimal dot when parsing a number in scientific or decimal representation. The default is to accept trailing zeroes. \sa setNumberOptions(), numberOptions() */ /*! \enum QLocale::FloatingPointPrecisionOption This enum defines constants that can be given as precision to QString::number(), QByteArray::number(), and QLocale::toString() when converting floats or doubles, in order to express a variable number of digits as precision. \value FloatingPointShortest The conversion algorithm will try to find the shortest accurate representation for the given number. "Accurate" means that you get the exact same number back from an inverse conversion on the generated string representation. \sa toString(), QString, QByteArray \since 5.7 */ /*! \enum QLocale::MeasurementSystem This enum defines which units are used for measurement. \value MetricSystem This value indicates metric units, such as meters, centimeters and millimeters. \value ImperialUSSystem This value indicates imperial units, such as inches and miles as they are used in the United States. \value ImperialUKSystem This value indicates imperial units, such as inches and miles as they are used in the United Kingdom. \value ImperialSystem Provided for compatibility. Same as ImperialUSSystem \since 4.4 */ /*! \fn bool QLocale::operator==(const QLocale &other) const Returns \c true if the QLocale object is the same as the \a other locale specified; otherwise returns \c false. */ /*! \fn bool QLocale::operator!=(const QLocale &other) const Returns \c true if the QLocale object is not the same as the \a other locale specified; otherwise returns \c false. */ /*! \enum QLocale::QuotationStyle This enum defines a set of possible styles for locale specific quotation. \value StandardQuotation If this option is set, the standard quotation marks will be used to quote strings. \value AlternateQuotation If this option is set, the alternate quotation marks will be used to quote strings. \since 4.8 \sa quoteString() */ /*! \internal \class QSystemLocale \inmodule QtCore \brief The QSystemLocale class can be used to finetune the system locale of the user. \since 4.2 \ingroup i18n \warning This class is only useful in very rare cases. Usually QLocale offers all the functionality required for application development. QSystemLocale allows to override the values provided by the system locale (QLocale::system()). \sa QLocale */ /*! \enum QSystemLocale::QueryType Specifies the type of information queried by query(). For each value the type of information to return from the query() method is listed. \value LanguageId a uint specifying the language. \value ScriptId a uint specifying the script. \value CountryId a uint specifying the country. \value DecimalPoint a QString specifying the decimal point. \value GroupSeparator a QString specifying the group separator. \value ZeroDigit a QString specifying the zero digit. \value NegativeSign a QString specifying the minus sign. \value PositiveSign a QString specifying the plus sign. \value DateFormatLong a QString specifying the long date format \value DateFormatShort a QString specifying the short date format \value TimeFormatLong a QString specifying the long time format \value TimeFormatShort a QString specifying the short time format \value DayNameLong a QString specifying the name of a weekday. the in variant contains an integer between 1 and 7 (Monday - Sunday) \value DayNameShort a QString specifying the short name of a weekday. the in variant contains an integer between 1 and 7 (Monday - Sunday) \value MonthNameLong a QString specifying the name of a month. the in variant contains an integer between 1 and 12 \value MonthNameShort a QString specifying the short name of a month. the in variant contains an integer between 1 and 12 \value DateToStringLong converts the QDate stored in the in variant to a QString using the long date format \value DateToStringShort converts the QDate stored in the in variant to a QString using the short date format \value TimeToStringLong converts the QTime stored in the in variant to a QString using the long time format \value TimeToStringShort converts the QTime stored in the in variant to a QString using the short time format \value DateTimeFormatLong a QString specifying the long date time format \value DateTimeFormatShort a QString specifying the short date time format \value DateTimeToStringLong converts the QDateTime in the in variant to a QString using the long datetime format \value DateTimeToStringShort converts the QDateTime in the in variant to a QString using the short datetime format \value MeasurementSystem a QLocale::MeasurementSystem enum specifying the measurement system \value AMText a string that represents the system AM designator associated with a 12-hour clock. \value PMText a string that represents the system PM designator associated with a 12-hour clock. \value FirstDayOfWeek a Qt::DayOfWeek enum specifiying the first day of the week \value CurrencySymbol a string that represents a currency in a format QLocale::CurrencyFormat. \value CurrencyToString a localized string representation of a number with a currency symbol. Converts a QSystemLocale::CurrencyToStringArgument stored in the in variant to a QString. \value UILanguages a list of strings representing locale names that could be used for UI translation. \value StringToStandardQuotation a QString containing a quoted version of the string ref stored in the in variant using standard quotes. \value StringToAlternateQuotation a QString containing a quoted version of the string ref stored in the in variant using alternate quotes. \value Weekdays a QList specifying the regular weekdays \value LocaleChanged this type is queried whenever the system locale is changed. \value ListToSeparatedString a string that represents a join of a given QStringList with a locale-defined separator. \value NativeLanguageName a string that represents the name of the native language. \value NativeCountryName a string that represents the name of the native country. \sa FormatType */ /*! \fn QLocale QSystemLocale::fallbackUiLocale() const \since 4.6 Returns the fallback locale obtained from the system. */ /*! \fn QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const Generic query method for locale data. Provides indirection. Denotes the \a type of the query with \a in as input data depending on the query. \sa QSystemLocale::QueryType */ /*! \class QSystemLocale::CurrencyToStringArgument \inmodule QtCore A helper class that provides arguments for the QSystemLocale::query() function with query type QSystemLocale::CurrencyToString. \sa QSystemLocale::QueryType \since 4.8 */ /*! \fn QSystemLocale::CurrencyToStringArgument::CurrencyToStringArgument() \internal */ /*! \variable QSystemLocale::CurrencyToStringArgument::value An input value that should be converted to its string representation. Contains one of QVariant::LongLong, QVariant::ULongLong or QVariant::Double types. */ /*! \variable QSystemLocale::CurrencyToStringArgument::symbol An optional argument containing a currency symbol to be used in the currency string. */ /*! \fn QString QLocale::toString(long i) const \overload \sa toLong() */ /*! \fn QString QLocale::toString(ulong i) const \overload \sa toULong() */ /*! \fn QString QLocale::toString(ushort i) const \overload \sa toUShort() */ /*! \fn QString QLocale::toString(short i) const \overload \sa toShort() */ /*! \fn QString QLocale::toString(ushort i) const \overload \sa toUShort() */ /*! \fn QString QLocale::toString(int i) const \overload \sa toInt() */ /*! \fn QString QLocale::toString(uint i) const \overload \sa toUInt() */ /* \fn QString QLocale::toString(long i) const \overload \sa toLong() */ /* \fn QString QLocale::toString(ulong i) const \overload \sa toULong() */ /*! \fn QString QLocale::toString(float i, char f = 'g', int prec = 6) const \overload \a f and \a prec have the same meaning as in QString::number(double, char, int). \sa toDouble() */ /*! \fn QString QLocale::toCurrencyString(short value, const QString &symbol) const \since 4.8 \overload */ /*! \fn QString QLocale::toCurrencyString(ushort value, const QString &symbol) const \since 4.8 \overload */ /*! \fn QString QLocale::toCurrencyString(int value, const QString &symbol) const \since 4.8 \overload */ /*! \fn QString QLocale::toCurrencyString(uint value, const QString &symbol) const \since 4.8 \overload */ /*! \fn QString QLocale::toCurrencyString(float value, const QString &symbol) const \since 4.8 \overload */