diff options
author | Bea Lam <bea.lam@nokia.com> | 2012-08-02 11:18:41 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-03 09:47:47 +0200 |
commit | 877e6c8093db2e479d9c6317479b72ae38eabdde (patch) | |
tree | a91a3d9786aad131d905c12e45b29b67ea88e4a0 | |
parent | 4eb04c4523ed901c173d69f16f199f7ec1b7e795 (diff) |
Fix docs for FormatType enum
Enums can't be documented as a separate type in QML documentation, so
move the enum docs into the class docs so it can be linked to from the
methods.
Change-Id: I22599ebc9e183d034d2d56cdac629d30aacf64ea
Reviewed-by: Martin Jones <martin.jones@nokia.com>
-rw-r--r-- | src/qml/qml/qqmllocale.cpp | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/src/qml/qml/qqmllocale.cpp b/src/qml/qml/qqmllocale.cpp index e323c804a1..69fbf5ce6a 100644 --- a/src/qml/qml/qqmllocale.cpp +++ b/src/qml/qml/qqmllocale.cpp @@ -811,7 +811,30 @@ V8_DEFINE_EXTENSION(QV8LocaleDataDeletable, localeV8Data); QtQuick Locale's data is based on Common Locale Data Repository v1.8.1. - The double-to-string and string-to-double conversion functions are + + \target FormatType + \section2 Locale String Format Types + + The monthName(), standaloneMonthName(), dayName() and standaloneDayName() + can use the following enumeration values to specify the formatting of + the string representation for a Date object. + + \list + \li Locale.LongFormat The long version of day and month names; for + example, returning "January" as a month name. + \li Locale.ShortFormat The short version of day and month names; for + example, returning "Jan" as a month name. + \li Locale.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. + \endlist + + + Additionally the double-to-string and string-to-double conversion functions are covered by the following licenses: \legalese @@ -887,27 +910,6 @@ v8::Handle<v8::Value> QQmlLocale::localeCompare(const v8::Arguments &args) } /*! - \enum QtQuick2::Locale::FormatType - - This enumeration describes the types of format that can be used when - converting Date 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. -*/ - -/*! \qmlproperty string QtQuick2::Locale::name Holds the language and country of this locale as a @@ -990,7 +992,7 @@ v8::Handle<v8::Value> QQmlLocale::localeCompare(const v8::Arguments &args) \qmlmethod string QtQuick2::Locale::monthName(month, type) Returns the localized name of \a month (0-11), in the optional - \l FortmatType specified by \a type. + \l FormatType specified by \a type. \note the QLocale C++ API expects a range of (1-12), however Locale.monthName() expects 0-11 as per the JS Date object. |