Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qlocale_p.h>
Classes | |
struct | DataRange |
struct | NumericData |
Public Types | |
enum | DoubleForm { DFExponent = 0 , DFDecimal , DFSignificantDigits , _DFMax = DFSignificantDigits } |
enum | Flags { NoFlags = 0 , AddTrailingZeroes = 0x01 , ZeroPadded = 0x02 , LeftAdjusted = 0x04 , BlankBeforePositive = 0x08 , AlwaysShowSign = 0x10 , GroupDigits = 0x20 , CapitalEorX = 0x40 , ShowBase = 0x80 , UppercaseBase = 0x100 , ZeroPadExponent = 0x200 , ForcePoint = 0x400 } |
enum | NumberMode { IntegerMode , DoubleStandardMode , DoubleScientificMode } |
Static Public Member Functions | |
static qsizetype | findLocaleIndex (QLocaleId localeId) |
static const QLocaleData * | c () |
static float | convertDoubleToFloat (double d, bool *ok) |
static Q_CORE_EXPORT QSimpleParsedNumber< qint64 > | bytearrayToLongLong (QByteArrayView num, int base) |
static QSimpleParsedNumber< quint64 > | bytearrayToUnsLongLong (QByteArrayView num, int base) |
Public Attributes | |
quint8 | m_currency_digits: 2 |
quint8 | m_currency_rounding: 3 |
quint8 | m_first_day_of_week: 3 |
quint8 | m_weekend_start: 3 |
quint8 | m_weekend_end: 3 |
quint8 | m_grouping_top: 2 |
quint8 | m_grouping_higher: 3 |
quint8 | m_grouping_least: 3 |
Definition at line 242 of file qlocale_p.h.
Enumerator | |
---|---|
DFExponent | |
DFDecimal | |
DFSignificantDigits | |
_DFMax |
Definition at line 250 of file qlocale_p.h.
enum QLocaleData::Flags |
Enumerator | |
---|---|
NoFlags | |
AddTrailingZeroes | |
ZeroPadded | |
LeftAdjusted | |
BlankBeforePositive | |
AlwaysShowSign | |
GroupDigits | |
CapitalEorX | |
ShowBase | |
UppercaseBase | |
ZeroPadExponent | |
ForcePoint |
Definition at line 257 of file qlocale_p.h.
Enumerator | |
---|---|
IntegerMode | |
DoubleStandardMode | |
DoubleScientificMode |
Definition at line 273 of file qlocale_p.h.
|
static |
Definition at line 4516 of file qlocale.cpp.
References base, checkParsed(), and qstrntoll().
Referenced by QIntValidator::fixup(), toIntegral(), QtPrivate::toSignedInteger(), and QIntValidator::validate().
|
static |
Definition at line 4524 of file qlocale.cpp.
References base, checkParsed(), and qstrntoull().
Referenced by toIntegral(), and QtPrivate::toUnsignedInteger().
|
static |
Definition at line 856 of file qlocale.cpp.
References QLocale::C, locale_data, locale_index, and Q_ASSERT.
Referenced by QString::arg(), QString::arg(), QString::arg(), numericData(), QSystemLocalePrivate::toCurrencyString(), and QString::vasprintf().
|
inlinestatic |
Definition at line 309 of file qlocale_p.h.
Referenced by QByteArray::toFloat(), QString::toFloat(), QStringView::toFloat(), QtPrivate::toFloat(), and QLocale::toFloat().
QString QLocaleData::decimalPoint | ( | ) | const |
Definition at line 943 of file qlocale.cpp.
References QSystemLocale::DecimalPoint, and localeString().
Referenced by QLocale::decimalPoint().
QString QLocaleData::doubleToString | ( | double | d, |
int | precision = -1, | ||
DoubleForm | form = DFSignificantDigits, | ||
int | width = -1, | ||
unsigned | flags = NoFlags ) const |
Definition at line 3706 of file qlocale.cpp.
References AddTrailingZeroes, QString::append(), CapitalEorX, ch, d, QGraphicsItem::data(), DFDecimal, DFExponent, DFSignificantDigits, digitCount(), digits(), QLocale::FloatingPointShortest, ForcePoint, form, QString::fromLatin1(), GroupDigits, i, QtMiscUtils::isAsciiDigit(), isZero(), LeftAdjusted, m_grouping_higher, m_grouping_least, m_grouping_top, Q_ASSERT, qAbs(), qMax(), qstrncmp(), qt_doubleToAscii(), qt_is_finite(), QString::reserve(), QString::size(), unicodeForDigit(), wholePartSpace(), zero, zeroDigit(), ZeroPadded, and ZeroPadExponent.
Referenced by QLocale::toString().
QString QLocaleData::exponentSeparator | ( | ) | const |
Definition at line 994 of file qlocale.cpp.
References single_character_data.
Referenced by QLocale::exponential().
Definition at line 487 of file qlocale.cpp.
References CheckCandidate, findLocaleIndexById(), QLocaleId::language_id, locale_index, and QLocaleId::withLikelySubtagsAdded().
Referenced by defaultIndex(), findLocalePrivate(), Q_GLOBAL_STATIC(), and systemData().
QLocaleData::ForEachQLocaleRange | ( | rangeIndex | ) |
QString QLocaleData::groupSeparator | ( | ) | const |
Definition at line 948 of file qlocale.cpp.
References QSystemLocale::GroupSeparator, and localeString().
Referenced by QLocale::groupSeparator().
|
inline |
Definition at line 386 of file qlocale_p.h.
Referenced by QLocalePrivate::bcp47Name().
QString QLocaleData::listSeparator | ( | ) | const |
Definition at line 958 of file qlocale.cpp.
References single_character_data.
QString QLocaleData::longLongToString | ( | qint64 | l, |
int | precision = -1, | ||
int | base = 10, | ||
int | width = -1, | ||
unsigned | flags = NoFlags ) const |
Definition at line 3945 of file qlocale.cpp.
References base, qulltoa(), and zeroDigit().
Referenced by QTextStreamPrivate::putNumber(), and QLocale::toString().
QString QLocaleData::negativeSign | ( | ) | const |
Definition at line 984 of file qlocale.cpp.
References localeString(), and QSystemLocale::NegativeSign.
Referenced by QLocale::negativeSign().
bool QLocaleData::numberToCLocale | ( | QStringView | s, |
QLocale::NumberOptions | number_options, | ||
NumberMode | mode, | ||
CharBuff * | result ) const |
Definition at line 4256 of file qlocale.cpp.
References QtMiscUtils::isAsciiDigit(), out, Q_ASSERT, QLocale::RejectGroupSeparator, QLocale::RejectLeadingZeroInExponent, and QLocale::RejectTrailingZeroesAfterDot.
|
inline |
Definition at line 4029 of file qlocale.cpp.
References c(), QLocale::CyrillicScript, QSystemLocale::DecimalPoint, DoubleScientificMode, getString(), QSystemLocale::GroupSeparator, IntegerMode, QSystemLocale::NegativeSign, QSystemLocale::PositiveSign, single_character_data, systemLocale(), systemLocaleData, zero, and QSystemLocale::ZeroDigit.
QString QLocaleData::percentSign | ( | ) | const |
Definition at line 953 of file qlocale.cpp.
References single_character_data.
Referenced by QLocale::percent().
QString QLocaleData::positiveSign | ( | ) | const |
Definition at line 989 of file qlocale.cpp.
References localeString(), and QSystemLocale::PositiveSign.
Referenced by QLocale::positiveSign().
double QLocaleData::stringToDouble | ( | QStringView | str, |
bool * | ok, | ||
QLocale::NumberOptions | options ) const |
Definition at line 4461 of file qlocale.cpp.
References QVarLengthArray< T, Prealloc >::constData(), ok, qt_asciiToDouble(), QVLABaseBase::size(), and str.
Referenced by QLocale::toDouble().
QSimpleParsedNumber< qint64 > QLocaleData::stringToLongLong | ( | QStringView | str, |
int | base, | ||
QLocale::NumberOptions | options ) const |
Definition at line 4477 of file qlocale.cpp.
QSimpleParsedNumber< quint64 > QLocaleData::stringToUnsLongLong | ( | QStringView | str, |
int | base, | ||
QLocale::NumberOptions | options ) const |
Definition at line 4488 of file qlocale.cpp.
QString QLocaleData::unsLongLongToString | ( | quint64 | l, |
int | precision = -1, | ||
int | base = 10, | ||
int | width = -1, | ||
unsigned | flags = NoFlags ) const |
Definition at line 3960 of file qlocale.cpp.
References base, QStringLiteral, qulltoa(), zero, and zeroDigit().
Referenced by QTextStreamPrivate::putNumber(), and QLocale::toString().
ParsingResult QLocaleData::validateChars | ( | QStringView | str, |
NumberMode | numMode, | ||
int | decDigits = -1, | ||
QLocale::NumberOptions | number_options = QLocale::DefaultNumberOptions ) const |
Definition at line 4365 of file qlocale.cpp.
References ParsingResult::Acceptable, ParsingResult::Intermediate, QtMiscUtils::isAsciiDigit(), Q_ASSERT, QLocale::RejectGroupSeparator, QLocale::RejectLeadingZeroInExponent, QString::size(), state, and str.
Referenced by QIntValidator::fixup(), QDoubleValidatorPrivate::fixupWithLocale(), QIntValidator::validate(), and QDoubleValidatorPrivate::validateWithLocale().
QString QLocaleData::zeroDigit | ( | ) | const |
Definition at line 963 of file qlocale.cpp.
References localeString(), zero, and QSystemLocale::ZeroDigit.
Referenced by doubleToString(), longLongToString(), unsLongLongToString(), and QLocale::zeroDigit().
char32_t QLocaleData::zeroUcs | ( | ) | const |
Definition at line 968 of file qlocale.cpp.
References QString::at(), QString::isEmpty(), single_character_data, QString::size(), systemLocale(), systemLocaleData, text, zero, and QSystemLocale::ZeroDigit.
quint8 QLocaleData::m_currency_digits |
Definition at line 480 of file qlocale_p.h.
quint8 QLocaleData::m_currency_rounding |
Definition at line 481 of file qlocale_p.h.
quint8 QLocaleData::m_first_day_of_week |
Definition at line 482 of file qlocale_p.h.
Referenced by QLocale::firstDayOfWeek().
quint8 QLocaleData::m_grouping_higher |
Definition at line 486 of file qlocale_p.h.
Referenced by doubleToString().
quint8 QLocaleData::m_grouping_least |
Definition at line 487 of file qlocale_p.h.
Referenced by doubleToString().
quint8 QLocaleData::m_grouping_top |
Definition at line 485 of file qlocale_p.h.
Referenced by doubleToString().
quint8 QLocaleData::m_weekend_end |
Definition at line 484 of file qlocale_p.h.
Referenced by QLocale::weekdays().
quint8 QLocaleData::m_weekend_start |
Definition at line 483 of file qlocale_p.h.
Referenced by QLocale::weekdays().