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

« back to all changes in this revision

Viewing changes to TimeLineTimeScale.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 as ListItem
 
4
 
 
5
Flickable{
 
6
    id: timeFlickble
 
7
 
 
8
    height: parent.height
 
9
    width: units.gu(6)
 
10
 
 
11
    contentHeight: 24 * units.gu(8)
 
12
    contentWidth: units.gu(6)
 
13
 
 
14
    contentY: timeLineView.contentY
 
15
 
 
16
    interactive: false
 
17
 
 
18
    clip: true
 
19
 
 
20
    Column {
 
21
        id: timeLine
 
22
        width: parent.width
 
23
 
 
24
        Repeater {
 
25
            model: 24 // hour in a day
 
26
 
 
27
            delegate: Item {
 
28
                width: parent.width
 
29
                height: units.gu(8)
 
30
 
 
31
                Label {
 
32
                    id: timeLabel
 
33
                    width: units.gu(5)
 
34
                    anchors.top: parent.top
 
35
                    anchors.topMargin: units.gu(0.5)
 
36
                    horizontalAlignment: "AlignRight"
 
37
                    text: Qt.formatTime(new Date(0,0,0,index),"hh:mm")
 
38
                    color: UbuntuColors.lightGrey
 
39
                    fontSize: "small"
 
40
                }
 
41
                ListItem.Divider{
 
42
                    height: units.gu(0.2)
 
43
                }
 
44
            }
 
45
        }
 
46
    }
 
47
}