2
import Ubuntu.Components 0.1
4
import "dateExt.js" as DateExt
5
import "dataService.js" as DataService
10
property var weekStart: new Date()
11
property int weekWidth:0;
13
contentHeight: timeLineColumn.height + units.gu(3)
22
function setSelectedDay() {
23
if( intern.now.weekStart( intern.weekstartDay).isSameDay(visibleWeek) ) {
24
intern.selectedDay = intern.now
26
intern.selectedDay = visibleWeek
31
//scroll to 9 o'clock or to now
34
if( weekStart !== undefined
35
&& now.weekStart(Qt.locale().firstDayOfWeek).isSameDay(weekStart)) {
36
hour = now.getHours();
39
timeLineView.contentY = hour * units.gu(10);
40
if(timeLineView.contentY >= timeLineView.contentHeight - timeLineView.height) {
41
timeLineView.contentY = timeLineView.contentHeight - timeLineView.height
45
//scroll in case content height changed
46
onContentHeightChanged: {
58
anchors.top: parent.top
59
anchors.topMargin: units.gu(3)
63
//vertical lines for weeks
69
height: timeLineView.contentHeight
74
height: dayIndicator.height
84
width: timeLineColumn.width - x
85
height: timeLineColumn.height
86
anchors.top: parent.top
87
anchors.topMargin: units.gu(3)
91
property var weekStartDay: timeLineView.weekStart.weekStart( Qt.locale().firstDayOfWeek );
96
delegate: TimeLineBase {
97
anchors.top: parent.top
100
delegate: infoBubbleComponent
101
day: week.weekStartDay.addDays(index)
107
id: infoBubbleComponent
111
property string title;
112
property string location;
115
signal clicked(int hour);
121
border.color: "#f4d690"
124
text:infoBubble.title;
127
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
134
infoBubble.clicked(hour);