2
* Copyright (C) 2013-2014 Canonical Ltd
4
* This file is part of Ubuntu Calendar App
6
* Ubuntu Calendar App is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 3 as
8
* published by the Free Software Foundation.
10
* Ubuntu Calendar App is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
import Ubuntu.Components 1.1
2
import Ubuntu.Components 0.1
25
// Property to set the day and date
28
// Property to set the font color of the day label
9
property alias dateColor: dateLabel.color
29
10
property alias dayColor: dayLabel.color
31
// Property to set the time format of the day label
32
property int dayFormat: Locale.ShortFormat
34
// Signal fired when pressing on the date
35
signal dateSelected(var date)
37
width: dayLabel.paintedWidth
38
height: dateContainer.height
43
width: dayLabel.paintedWidth
44
spacing: units.gu(0.2)
46
anchors.centerIn: parent
50
objectName: "dayLabel"
51
text: Qt.locale().standaloneDayName(date.getDay(), dayFormat)
56
objectName: "dateLabel"
59
anchors.horizontalCenter: dayLabel.horizontalCenter
12
property int dayFormat: Locale.ShortFormat;
19
property var day: Qt.locale().standaloneDayName(date.getDay(), dayFormat)
20
text: day.toUpperCase();
22
horizontalAlignment: Text.AlignHCenter
66
root.dateSelected(date);
29
objectName: "dateLabel"
32
horizontalAlignment: Text.AlignHCenter