~pkunal-parmar/ubuntu-calendar-app/NewDayView

« back to all changes in this revision

Viewing changes to DayViewHeader.qml

  • Committer: Kunal Parmar
  • Date: 2014-11-15 08:02:45 UTC
  • Revision ID: pkunal.parmar@gmail.com-20141115080245-9f093ak1owlh5tl8
new day and week view

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import QtQuick 2.0
2
 
import Ubuntu.Components 1.1
3
 
import Ubuntu.Components.ListItems 1.0
4
 
 
5
 
Item {
6
 
    id: root
7
 
    property var date;
8
 
 
9
 
    signal nextDayClicked();
10
 
    signal previousDayClicked();
11
 
 
12
 
    height: units.gu(6)
13
 
 
14
 
    DayViewHeaderButton{
15
 
        anchors.left: parent.left
16
 
        width: parent.width / 2.5
17
 
        iconName: "previous"
18
 
 
19
 
        onClicked: {
20
 
            root.previousDayClicked();
21
 
        }
22
 
    }
23
 
 
24
 
    DayViewHeaderButton{
25
 
        anchors.right: parent.right
26
 
        width: parent.width / 2.5
27
 
        iconName: "next"
28
 
 
29
 
        onClicked: {
30
 
            root.nextDayClicked();
31
 
        }
32
 
    }
33
 
 
34
 
    Row {
35
 
        spacing: units.gu(1)
36
 
        anchors.centerIn: parent
37
 
 
38
 
        Label {
39
 
            objectName: "dayLabel"
40
 
            font.bold: true
41
 
            text: Qt.locale().standaloneDayName(date.getDay(), Locale.LongFormat)
42
 
        }
43
 
 
44
 
        Label{
45
 
            objectName: "dateLabel"
46
 
            text: date.getDate();
47
 
        }
48
 
    }
49
 
    Divider{ anchors.top: parent.bottom}
50
 
}