diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-10-04 20:05:44 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-10-04 18:16:17 +0000 |
commit | 99bbe5643b293aaad7b7ccb299989f62b8f6dced (patch) | |
tree | 8cfe617ef72f6a9021d5f4ff9449c426bc9f6659 /src/imports/calendar/qquickweeknumbercolumn.cpp | |
parent | 6eab7d10aa34b6a76cbd46a6af703d6c6fa77ca5 (diff) |
Calendar: improve the documentation about 0-based month numbers
Change-Id: Ibcd36070b6652ca9c5033265af4415daaba4b3ef
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/calendar/qquickweeknumbercolumn.cpp')
-rw-r--r-- | src/imports/calendar/qquickweeknumbercolumn.cpp | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/src/imports/calendar/qquickweeknumbercolumn.cpp b/src/imports/calendar/qquickweeknumbercolumn.cpp index a902bdae..ce9138f5 100644 --- a/src/imports/calendar/qquickweeknumbercolumn.cpp +++ b/src/imports/calendar/qquickweeknumbercolumn.cpp @@ -108,25 +108,29 @@ QQuickWeekNumberColumn::QQuickWeekNumberColumn(QQuickItem *parent) : /*! \qmlproperty int Qt.labs.calendar::WeekNumberColumn::month - This property holds the number of the month that the week numbers are calculated for. - - Supported values: - \list - \li \c Calendar.January (0) - \li \c Calendar.February (1) - \li \c Calendar.March (2) - \li \c Calendar.April (3) - \li \c Calendar.May (4) - \li \c Calendar.June (5) - \li \c Calendar.July (6) - \li \c Calendar.August (7) - \li \c Calendar.September (8) - \li \c Calendar.October (9) - \li \c Calendar.November (10) - \li \c Calendar.December (11) - \endlist - - The default value is the current month. + This property holds the number of the month that the week numbers are + calculated for. The default value is the current month. + + The Qt Labs Calendar module uses 0-based month numbers to be consistent + with the JavaScript Date type, that is used by the QML language. This + means that \c Date::getMonth() can be assigned to this property as is. + When dealing with dealing with month numbers diretly, it is highly + recommended to use the following enumeration values to avoid confusion. + + \value Calendar.January January (0) + \value Calendar.February February (1) + \value Calendar.March March (2) + \value Calendar.April April (3) + \value Calendar.May May (4) + \value Calendar.June June (5) + \value Calendar.July July (6) + \value Calendar.August August (7) + \value Calendar.September September (8) + \value Calendar.October October (9) + \value Calendar.November November (10) + \value Calendar.December December (11) + + \sa Calendar */ int QQuickWeekNumberColumn::month() const { |