summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2014-06-11 13:08:07 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-06-11 15:12:40 +0200
commit7d78cce7b32d3ec6d1f42333a44f3b52805f4da0 (patch)
tree4371534bce8d97dbb61c5d9d01e1fc8c464025e8
parent4354e2e745692ba31e9fbfbc509c0d1f14398bc6 (diff)
downloadqtquickcontrols-7d78cce7b32d3ec6d1f42333a44f3b52805f4da0.tar.gz
CalendarStyle: add styleData.index for dayOfWeekDelegate
The first/last day could be styled in a different way compared to the days in the middle. Expose the index for convenience and consistency with weekNumberDelegate. Change-Id: Ia0cdf5d121f81c243345ea65a8ee355342b4f220 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
-rw-r--r--src/controls/Styles/Base/CalendarStyle.qml4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/controls/Styles/Base/CalendarStyle.qml b/src/controls/Styles/Base/CalendarStyle.qml
index 9957c75d..42cee471 100644
--- a/src/controls/Styles/Base/CalendarStyle.qml
+++ b/src/controls/Styles/Base/CalendarStyle.qml
@@ -296,6 +296,8 @@ Style {
The properties provided to each delegate are:
\table
+ \row \li readonly property int \b styleData.index
+ \li The index (0-6) of the delegate.
\row \li readonly property int \b styleData.dayOfWeek
\li The day of the week this delegate represents. Possible values:
\list
@@ -411,9 +413,11 @@ Style {
sourceComponent: dayOfWeekDelegate
width: __cellRectAt(index).width
+ readonly property int __index: index
readonly property var __dayOfWeek: dayOfWeek
property QtObject styleData: QtObject {
+ readonly property alias index: dayOfWeekDelegateLoader.__index
readonly property alias dayOfWeek: dayOfWeekDelegateLoader.__dayOfWeek
}
}