114.2.2
by Kunal Parmar
added missing file |
1 |
import QtQuick 2.0 |
2 |
import Ubuntu.Components 0.1 |
|
3 |
||
221.2.3
by Jason Gerlowski
Consolidate MouseArea's in HeaderDateComponent |
4 |
Item { |
114.2.2
by Kunal Parmar
added missing file |
5 |
id: root
|
6 |
||
7 |
property var date; |
|
8 |
||
9 |
property alias dateColor: dateLabel.color |
|
10 |
property alias dayColor: dayLabel.color |
|
11 |
||
12 |
property int dayFormat: Locale.ShortFormat; |
|
13 |
||
221.2.1
by Jason Gerlowski
Clicking on a day in 'Week' tab brings up that day in 'Day' tab |
14 |
signal dateSelected(var date); |
15 |
||
114.2.2
by Kunal Parmar
added missing file |
16 |
width: parent.width |
221.2.3
by Jason Gerlowski
Consolidate MouseArea's in HeaderDateComponent |
17 |
height: innerColumn.height |
114.2.2
by Kunal Parmar
added missing file |
18 |
|
221.2.3
by Jason Gerlowski
Consolidate MouseArea's in HeaderDateComponent |
19 |
Column { |
20 |
id: innerColumn
|
|
114.2.2
by Kunal Parmar
added missing file |
21 |
width: parent.width |
221.2.3
by Jason Gerlowski
Consolidate MouseArea's in HeaderDateComponent |
22 |
spacing: units.gu(2) |
23 |
||
24 |
Label{ |
|
25 |
id: dayLabel
|
|
26 |
property var day: Qt.locale().standaloneDayName(date.getDay(), dayFormat) |
|
27 |
text: day.toUpperCase(); |
|
28 |
fontSize: "medium" |
|
29 |
horizontalAlignment: Text.AlignHCenter |
|
279.2.2
by Alan Pope
update colours |
30 |
color: "white" |
221.2.3
by Jason Gerlowski
Consolidate MouseArea's in HeaderDateComponent |
31 |
width: parent.width |
32 |
}
|
|
33 |
||
34 |
Label{ |
|
35 |
id: dateLabel
|
|
36 |
objectName: "dateLabel" |
|
37 |
text: date.getDate(); |
|
38 |
fontSize: "large" |
|
39 |
horizontalAlignment: Text.AlignHCenter |
|
40 |
width: parent.width |
|
221.2.1
by Jason Gerlowski
Clicking on a day in 'Week' tab brings up that day in 'Day' tab |
41 |
}
|
114.2.2
by Kunal Parmar
added missing file |
42 |
}
|
43 |
||
221.2.3
by Jason Gerlowski
Consolidate MouseArea's in HeaderDateComponent |
44 |
MouseArea { |
45 |
anchors.fill: parent |
|
46 |
onClicked: { |
|
47 |
root.dateSelected(date); |
|
221.2.1
by Jason Gerlowski
Clicking on a day in 'Week' tab brings up that day in 'Day' tab |
48 |
}
|
114.2.2
by Kunal Parmar
added missing file |
49 |
}
|
50 |
}
|