53
sourceComponent: showLunarCalendar ? reservedFiled : undefined
54
onSourceComponentChanged: {
55
if (item != undefined) {
56
item.reservedData = Qt.binding(function(){
57
var lunarDate = Lunar.calendar.solar2lunar(intern.monthStartYear,
58
intern.monthStartMonth + 1,
59
intern.monthStartDate + index)
60
if (lunarDate.isTerm) {
61
return {"lunarText": lunarDate.Term, "isTerm" :lunarDate.isTerm};
63
return {"lunarText": lunarDate.IDayCn, "isTerm" :lunarDate.isTerm};
68
width = Qt.binding( function() { return units.gu(0.8)})
69
height = Qt.binding( function() { return width })
70
anchors.horizontalCenter = Qt.binding( function() { return parent.horizontalCenter })
71
anchors.top = Qt.binding( function() { return parent.verticalCenter })
72
anchors.topMargin = Qt.binding( function() {
73
return (dateRootItem.height > dateRootItem.width ? dateRootItem.width :dateRootItem.height)/ 4.0 + units.gu(0.25)
78
//this component is reserved for extra information display
83
property var reservedData
84
onReservedDataChanged: {
85
text = reservedData.lunarText
86
if (reservedData.isTerm)
90
horizontalAlignment: Text.AlignHCenter
91
fontSize: root.subLabelFontSize
51
97
sourceComponent: showEvent ? eventIndicatorComp : undefined
52
98
onSourceComponentChanged: {
53
99
width = Qt.binding( function() { return units.gu(0.8)})
55
101
anchors.horizontalCenter = Qt.binding( function() { return parent.horizontalCenter })
56
102
anchors.top = Qt.binding( function() { return parent.verticalCenter })
57
103
anchors.topMargin = Qt.binding( function() {
58
var w = (dateRootItem.height > dateRootItem.width ? dateRootItem.width :dateRootItem.height)/1.3
59
return (w/2) + units.gu(0.1)
104
if (showLunarCalendar) {
105
return (dateRootItem.height > dateRootItem.width ? dateRootItem.width :dateRootItem.height) / 2 + units.gu(1.5)
107
var w = (dateRootItem.height > dateRootItem.width ? dateRootItem.width :dateRootItem.height)/1.3
108
return (w/2) + units.gu(0.1)