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

« back to all changes in this revision

Viewing changes to MonthComponent.qml

  • Committer: Kunal Parmar
  • Date: 2014-10-22 17:28:07 UTC
  • Revision ID: pkunal.parmar@gmail.com-20141022172807-f8q4u2eb3obvutjv
performce improvements

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    id: root
25
25
    objectName: "MonthComponent"
26
26
 
 
27
    property bool isCurrentItem;
 
28
 
27
29
    property bool showEvents: false
28
30
 
29
31
    property var currentMonth;
50
52
    Component {
51
53
        id: timerComp
52
54
        Timer{
53
 
           interval: 200; running: true; repeat: false
54
 
           onTriggered: {
 
55
            interval: 200; running: true; repeat: false
 
56
            onTriggered: {
55
57
                modelLoader.sourceComponent = modelComponent
56
 
           }
 
58
            }
57
59
        }
58
60
    }
59
61
 
66
68
        EventListModel {
67
69
            id: mainModel
68
70
            startPeriod: intern.monthStart.midnight();
69
 
            endPeriod: intern.monthStart.addDays((monthGrid.weekCount*7)-1).endOfDay()
 
71
            endPeriod: intern.monthStart.addDays((/*monthGrid.weekCount*/ 6 * 7)-1).endOfDay()
70
72
            filter: eventModel.filter
71
73
            onModelChanged: {
72
74
                intern.eventStatus = Qt.binding(function() { return mainModel.containsItems(startPeriod,endPeriod,24*60*60)});
116
118
            topMargin: units.gu(1.5)
117
119
            bottomMargin: units.gu(1)
118
120
        }
119
 
 
120
121
        spacing: units.gu(1.5)
121
122
 
122
123
        ViewHeader{