61 class QTextStreamPrivate;
65 #ifndef QT_NO_SYSTEMLOCALE
76 :
value(v), symbol(s) { }
121 StandaloneMonthNameShort
123 virtual QVariant query(QueryType
type, QVariant
in)
const;
124 virtual QLocale fallbackLocale()
const;
132 struct QLocalePrivate;
133 class Q_CORE_EXPORT QLocale
141 friend class QDoubleValidatorPrivate;
142 friend class QTextStream;
143 friend class QTextStreamPrivate;
361 CentralMoroccoTamazight = 212,
362 KoyraboroSenni = 213,
384 NorwegianBokmal = Norwegian,
385 NorwegianNynorsk = Nynorsk,
387 LastLanguage = Yangben
396 SimplifiedHanScript = 5,
397 TraditionalHanScript = 6,
401 SimplifiedChineseScript = SimplifiedHanScript,
402 TraditionalChineseScript = TraditionalHanScript,
403 LastScript = TifinaghScript
415 AntiguaAndBarbuda = 9,
433 BosniaAndHerzegowina = 27,
437 BritishIndianOceanTerritory = 31,
438 BruneiDarussalam = 32,
447 CentralAfricanRepublic = 41,
451 ChristmasIsland = 45,
455 DemocraticRepublicOfCongo = 49,
456 PeoplesRepublicOfCongo = 50,
467 DominicanRepublic = 61,
472 EquatorialGuinea = 66,
476 FalklandIslands = 70,
481 MetropolitanFrance = 75,
483 FrenchPolynesia = 77,
484 FrenchSouthernTerritories = 78,
501 HeardAndMcDonaldIslands = 95,
519 DemocraticRepublicOfKorea = 113,
520 RepublicOfKorea = 114,
528 LibyanArabJamahiriya = 122,
540 MarshallIslands = 134,
558 NetherlandsAntilles = 152,
566 NorthernMarianaIslands = 160,
571 PalestinianTerritory = 165,
573 PapuaNewGuinea = 167,
584 RussianFederation = 178,
586 SaintKittsAndNevis = 180,
588 StVincentAndTheGrenadines = 182,
591 SaoTomeAndPrincipe = 185,
599 SolomonIslands = 193,
602 SouthGeorgiaAndTheSouthSandwichIslands = 196,
606 StPierreAndMiquelon = 200,
609 SvalbardAndJanMayenIslands = 203,
613 SyrianArabRepublic = 207,
621 TrinidadAndTobago = 215,
625 TurksAndCaicosIslands = 219,
629 UnitedArabEmirates = 223,
632 UnitedStatesMinorOutlyingIslands = 226,
636 VaticanCityState = 230,
639 BritishVirginIslands = 233,
640 USVirginIslands = 234,
641 WallisAndFutunaIslands = 235,
647 SerbiaAndMontenegro = 241,
650 SaintBarthelemy = 244,
652 LatinAmericaAndTheCaribbean = 246,
653 LastCountry = LatinAmericaAndTheCaribbean
661 OmitGroupSeparator = 0x01,
662 RejectGroupSeparator = 0x02
664 Q_DECLARE_FLAGS(NumberOptions, NumberOption)
674 QLocale(Language language, Country country = AnyCountry);
675 QLocale(Language language, Script script, Country country);
676 QLocale(
const QLocale &other);
678 QLocale &operator=(
const QLocale &other);
680 Language language()
const;
681 Script script()
const;
682 Country country()
const;
686 QString nativeLanguageName()
const;
687 QString nativeCountryName()
const;
689 short toShort(
const QString &
s,
bool *ok = 0,
int base = 0)
const;
690 ushort toUShort(
const QString &
s,
bool *ok = 0,
int base = 0)
const;
691 int toInt(
const QString &
s,
bool *ok = 0,
int base = 0)
const;
692 uint toUInt(
const QString &
s,
bool *ok = 0,
int base = 0)
const;
695 float toFloat(
const QString &
s,
bool *ok = 0)
const;
696 double toDouble(
const QString &
s,
bool *ok = 0)
const;
700 inline QString toString(
short i)
const;
701 inline QString toString(ushort i)
const;
702 inline QString toString(
int i)
const;
703 inline QString toString(uint i)
const;
704 QString toString(
double i,
char f =
'g',
int prec = 6)
const;
705 inline QString toString(
float i,
char f =
'g',
int prec = 6)
const;
706 QString toString(
const QDate &date,
const QString &formatStr)
const;
707 QString toString(
const QDate &date, FormatType
format = LongFormat)
const;
708 QString toString(
const QTime &time,
const QString &formatStr)
const;
709 QString toString(
const QTime &time, FormatType
format = LongFormat)
const;
710 QString toString(
const QDateTime &dateTime, FormatType
format = LongFormat)
const;
715 QString dateTimeFormat(FormatType
format = LongFormat)
const;
716 #ifndef QT_NO_DATESTRING
717 QDate toDate(
const QString &
string, FormatType = LongFormat)
const;
718 QTime toTime(
const QString &
string, FormatType = LongFormat)
const;
719 QDateTime toDateTime(
const QString &
string, FormatType
format = LongFormat)
const;
727 QChar decimalPoint()
const;
728 QChar groupSeparator()
const;
729 QChar percent()
const;
730 QChar zeroDigit()
const;
731 QChar negativeSign()
const;
732 QChar positiveSign()
const;
733 QChar exponential()
const;
735 QString monthName(
int, FormatType
format = LongFormat)
const;
736 QString standaloneMonthName(
int, FormatType
format = LongFormat)
const;
738 QString standaloneDayName(
int, FormatType
format = LongFormat)
const;
746 MeasurementSystem measurementSystem()
const;
753 QString currencySymbol(CurrencySymbolFormat = CurrencySymbol)
const;
765 inline bool operator==(
const QLocale &other)
const;
766 inline bool operator!=(
const QLocale &other)
const;
768 static QString languageToString(Language language);
769 static QString countryToString(Country country);
770 static QString scriptToString(Script script);
771 static void setDefault(
const QLocale &locale);
773 static QLocale
c() {
return QLocale(C); }
774 static QLocale system();
779 void setNumberOptions(NumberOptions options);
780 NumberOptions numberOptions()
const;
783 QString quoteString(
const QString &str, QuotationStyle style = StandardQuotation)
const;
784 QString quoteString(
const QStringRef &str, QuotationStyle style = StandardQuotation)
const;
792 #if (defined(__arm__) || defined(QT_NO_ARM_EABI))
798 friend struct QLocalePrivate;
805 const QLocalePrivate *d()
const;
808 Q_DECLARE_OPERATORS_FOR_FLAGS(QLocale::NumberOptions)
819 {
return toString(
double(i), f, prec); }
836 #ifndef QT_NO_DATASTREAM
837 Q_CORE_EXPORT QDataStream &
operator<<(QDataStream &,
const QLocale &);
838 Q_CORE_EXPORT QDataStream &
operator>>(QDataStream &, QLocale &);
843 #ifndef QT_NO_SYSTEMLOCALE
GLuint GLuint GLsizei GLenum type
bool operator!=(const QLocale &other) const
Q_CORE_EXPORT QDataStream & operator<<(QDataStream &, const QLocale &)
NumberOptions numberOptions() const
Q_DECLARE_TYPEINFO(QLocale, Q_MOVABLE_TYPE)
Q_CORE_EXPORT QDataStream & operator>>(QDataStream &, QLocale &)
bool operator==(const Attribute &cA, const AttributeInstance< type > &cB)
This operator compares the two attributes and NOT their values.
#define QT_BEGIN_NAMESPACE
GLenum GLsizei GLenum format
QString toString(qlonglong i) const
CurrencyToStringArgument(const QVariant &v, const QString &s)
bool operator!=(const QByteArray &a1, const QByteArray &a2)
QString toCurrencyString(qlonglong, const QString &symbol=QString()) const
bool operator==(const QLocale &other) const
GLsizei const GLfloat * value
GLuint const GLchar * name
CurrencyToStringArgument()