~renatofilho/ubuntu-calendar-app/optimize

« back to all changes in this revision

Viewing changes to DayView.qml

  • Committer: Renato Araujo Oliveira Filho
  • Date: 2016-02-24 01:31:43 UTC
  • Revision ID: renato.filho@canonical.com-20160224013143-7bsrz268i1dpo29x
Create new event based on scrolled view.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    signal pressAndHoldAt(var date, bool allDay)
35
35
 
36
36
    Keys.forwardTo: [dayViewPath]
 
37
 
 
38
 
37
39
    createEventAt: currentDate
38
40
 
39
41
    Action {
69
71
        }
70
72
    }
71
73
 
 
74
    onBottomEdgeCommitStarted: {
 
75
        var eventAt = new Date()
 
76
        if (dayViewPath.currentItem) {
 
77
            eventAt.setHours(dayViewPath.currentItem.currentHour)
 
78
            eventAt.setMinutes(0)
 
79
            eventAt.setSeconds(0)
 
80
        }
 
81
        createEventAt = eventAt
 
82
    }
 
83
 
72
84
    PathViewBase{
73
85
        id: dayViewPath
74
86
        objectName: "dayViewPath"