2
import Ubuntu.Components 0.1
4
import "dateExt.js" as DateExt
5
import "ViewType.js" as ViewType
10
property int type: ViewType.ViewTypeWeek
20
signal dateSelected(var date);
23
height: FontUtils.sizeToPixels("medium") + units.gu(1.5)
26
delegate: TimeLineHeaderComponent{
29
isCurrentItem: index == header.currentIndex
32
if( type == ViewType.ViewTypeWeek ) {
34
} else if( type == ViewType.ViewTypeDay && isCurrentItem ){
41
startDay: getStartDate();
44
header.dateSelected(date);
47
function getStartDate() {
48
var indexType = header.indexType(index);
50
case ViewType.ViewTypeWeek:
51
return date.addDays(7*indexType);
52
case ViewType.ViewTypeDay:
53
return date.addDays(1*indexType);