Qt:Документация 4.3.2/qsystemlocale

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] QSystemLocale Class Reference
[модуль QtCore ]

The QSystemLocale class can be used to finetune the system locale of the user. Далее...

 #include <QSystemLocale>

Класс был добавлен в Qt 4.2.

[править] Открытые типы

  • enum QueryType { LanguageId, CountryId, DecimalPoint, GroupSeparator, ..., TimeToStringShort }

[править] Открытые функции


[править] Подробное описание

The QSystemLocale class can be used to finetune the system locale of the user.

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()).

See also 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.


Константа Значение Описание
QSystemLocale::LanguageId 0 a uint specifying the language.
QSystemLocale::CountryId 1 a uint specifying the country.
QSystemLocale::DecimalPoint 2 a QString specifying the decimal point.
QSystemLocale::GroupSeparator 3 a QString specifying the group separator.
QSystemLocale::ZeroDigit 4 a QString specifying the zero digit.
QSystemLocale::NegativeSign 5 a QString specifying the minus sign.
QSystemLocale::DateFormatLong 6 a QString specifying the long date format
QSystemLocale::DateFormatShort 7 a QString specifying the short date format
QSystemLocale::TimeFormatLong 8 a QString specifying the long time format
QSystemLocale::TimeFormatShort 9 a QString specifying the short time format
QSystemLocale::DayNameLong 10 a QString specifying the name of a weekday. the in variant contains an integer between 1 and 7 (Monday - Friday)
QSystemLocale::DayNameShort 11 a QString specifying the short name of a weekday. the in variant contains an integer between 1 and 7 (Monday - Friday)
QSystemLocale::MonthNameLong 12 a QString specifying the name of a month. the in variant contains an integer between 1 and 12
QSystemLocale::MonthNameShort 13 a QString specifying the short name of a month. the in variant contains an integer between 1 and 12
QSystemLocale::DateToStringLong 14 converts the QDate stored in the in variant to a QString using the long date format
QSystemLocale::DateToStringShort 15 converts the QDate stored in the in variant to a QString using the short date format
QSystemLocale::TimeToStringLong 16 converts the QTime stored in the in variant to a QString using the long time format
QSystemLocale::TimeToStringShort 17 converts the QTime stored in the in variant to a QString using the short time format

[править] Описание функций-членов

[править]
QSystemLocale::QSystemLocale ()

Constructs a QSystemLocale object. The constructor will automatically install this object as the system locale and remove any earlier installed system locales.

[править]
QSystemLocale::~QSystemLocale () [virtual]

Deletes the object.

[править]
QLocale QSystemLocale::fallbackLocale () const [virtual]

Returns a fallback locale, that will get used for everything that is not explicitly overridden by the system locale.

[править]
QVariant QSystemLocale::query ( QueryType type, QVariant in ) const [virtual]

Performs a query of the given type in the system locale for customized values or conversion. If the method returns a null QVariant, the conversion of the fallbackLocale() will be used.

in is unused for some of the query types.

See also QSystemLocale::QueryType.



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2