65
objectName: "dayViewPath"
67
property var startDay: currentDay
68
//This is used to scroll all view together when currentItem scrolls
69
property var childContentY;
64
71
anchors.fill: parent
65
anchors.topMargin: units.gu(1)
70
objectName: "dayHeader"
71
type: ViewType.ViewTypeDay
72
currentDay: dayViewPage.currentDay
75
dayViewPage.currentDay = date;
76
dayViewPage.dateSelected(date);
79
onCurrentDayChanged: {
80
date = dayViewPage.currentDay.weekStart(Qt.locale().firstDayOfWeek);
84
if(currentDay >= date.addDays(7)) {
85
date = dayViewPage.currentDay.weekStart(Qt.locale().firstDayOfWeek);
86
dayHeader.incrementCurrentIndex();
90
function previousDay() {
91
if( currentDay < date) {
92
date = dayViewPage.currentDay.weekStart(Qt.locale().firstDayOfWeek);
93
dayHeader.decrementCurrentIndex();
100
objectName: "dayViewPath"
102
property var startDay: currentDay
103
//This is used to scroll all view together when currentItem scrolls
104
property var childContentY;
73
onNextItemHighlighted: {
75
currentDay = currentDay.addDays(1);
78
onPreviousItemHighlighted: {
80
currentDay = currentDay.addDays(-1);
106
84
width: parent.width
107
height: dayViewPage.height - dayViewPath.y
109
onNextItemHighlighted: {
111
currentDay = currentDay.addDays(1);
115
onPreviousItemHighlighted: {
117
currentDay = currentDay.addDays(-1);
118
dayHeader.previousDay();
123
height: parent.height
124
asynchronous: index !== dayViewPath.currentIndex
125
sourceComponent: delegateComponent
128
id: delegateComponent
130
TimeLineBaseComponent {
132
objectName: "DayComponent-"+index
134
type: ViewType.ViewTypeDay
137
isActive: parent.PathView.isCurrentItem
138
contentInteractive: parent.PathView.isCurrentItem
139
startDay: dayViewPath.startDay.addDays(dayViewPath.indexType(index))
140
keyboardEventProvider: dayViewPath
142
Component.onCompleted: {
86
asynchronous: !dayViewPath.isCurrentItem
87
sourceComponent: delegateComponent
92
TimeLineBaseComponent {
94
objectName: "DayComponent-"+index
96
type: ViewType.ViewTypeDay
99
isActive: parent.PathView.isCurrentItem
100
contentInteractive: parent.PathView.isCurrentItem
101
startDay: dayViewPath.startDay.addDays(dayViewPath.indexType(index))
102
keyboardEventProvider: dayViewPath
104
Component.onCompleted: {
105
if(dayViewPage.isCurrentPage){
106
timeLineView.scrollToCurrentTime();
112
onIsCurrentPageChanged:{
143
113
if(dayViewPage.isCurrentPage){
144
114
timeLineView.scrollToCurrentTime();
150
onIsCurrentPageChanged:{
151
if(dayViewPage.isCurrentPage){
152
timeLineView.scrollToCurrentTime();
157
//get contentY value from PathView, if its not current Item
161
value: dayViewPath.childContentY;
162
when: !parent.PathView.isCurrentItem
165
//set PathView's contentY property, if its current item
168
property: "childContentY"
170
when: parent.PathView.isCurrentItem
119
//get contentY value from PathView, if its not current Item
123
value: dayViewPath.childContentY;
124
when: !parent.PathView.isCurrentItem
127
//set PathView's contentY property, if its current item
130
property: "childContentY"
132
when: parent.PathView.isCurrentItem