~pkunal-parmar/ubuntu-calendar-app/Minor-Performance

« back to all changes in this revision

Viewing changes to MonthComponent.qml

  • Committer: Kunal Parmar
  • Date: 2014-10-23 15:07:17 UTC
  • Revision ID: pkunal.parmar@gmail.com-20141023150717-xh3261dqwkz5dm7h
calculation

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
        EventListModel {
69
69
            id: mainModel
70
70
            startPeriod: intern.monthStart.midnight();
71
 
            endPeriod: intern.monthStart.addDays((/*monthGrid.weekCount*/ 6 * 7)-1).endOfDay()
 
71
            endPeriod: intern.monthStart.addDays((/*monthGrid.rows * cols */ 42 )-1).endOfDay()
72
72
            filter: eventModel.filter
73
73
            onModelChanged: {
74
 
                intern.eventStatus = Qt.binding(function() { return mainModel.containsItems(startPeriod,endPeriod,24*60*60)});
 
74
                intern.eventStatus = Qt.binding(function() { return mainModel.containsItems(startPeriod, endPeriod, 86400/*24*60*60*/)});
75
75
            }
76
76
        }
77
77
    }
159
159
            id: monthGrid
160
160
            objectName: "monthGrid"
161
161
 
162
 
            property int weekCount : 6
163
 
 
164
162
            width: parent.width
165
163
            height: parent.height - monthGrid.y
166
164
 
167
 
            property int dayWidth: width / 7;
168
 
            property int dayHeight: height / weekCount
 
165
            property int dayWidth: width / 7 /*cols*/;
 
166
            property int dayHeight: height / 6/*rows*/;
169
167
 
170
 
            rows: weekCount
 
168
            rows: 6
171
169
            columns: 7
172
170
 
173
171
            Repeater{
174
172
                id: dateLabelRepeater
175
 
                model: monthGrid.rows * monthGrid.columns
 
173
                model: 42 //monthGrid.rows * monthGrid.columns
176
174
                delegate: defaultDateLabelComponent
177
175
            }
178
176
        }