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

« back to all changes in this revision

Viewing changes to EventListModel.qml

  • Committer: Kunal Parmar
  • Date: 2014-04-08 09:32:44 UTC
  • mfrom: (237 ubuntu-calendar-app)
  • mto: This revision was merged to the branch mainline in revision 354.
  • Revision ID: pkunal.parmar@gmail.com-20140408093244-r3wuc47s18q0rh5h
mergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import QtQuick 2.0
2
 
import "dateExt.js" as DateExt
3
 
 
4
2
import QtOrganizer 5.0
5
3
 
6
4
OrganizerModel {
7
5
    id: eventModel
8
6
    manager:"eds"
9
 
    autoUpdate: false
10
 
 
11
 
    signal reloaded
 
7
 
 
8
    property var listeners:[];
 
9
 
 
10
    function addModelChangeListener(listener){
 
11
        listeners.push(listener);
 
12
    }
 
13
 
 
14
    function getItems(startDate, endDate){
 
15
        return itemsByTimePeriod(startDate,endDate);
 
16
    }
12
17
 
13
18
    onModelChanged: {
14
 
        reloaded();
 
19
        if(listeners === undefined){
 
20
            return;
 
21
        }
 
22
        for(var i=0; i < listeners.length ;++i){
 
23
            (listeners[i])();
 
24
        }
15
25
    }
16
26
 
17
27
    function getCollections(){