2 import com.nokia.meego 1.0
3 import com.nokia.extras 1.0
4 import "UIConstants.js" as UIConstants
5 import "ExtrasConstants.js" as ExtrasConstants
10 property string gline: ''
11 property string gstation: ''
12 property string gdirection: ''
14 property string sourceUrl: ''
15 property bool busy: true
19 itip.load_departures(sourceUrl)
20 console.log('refreshing')
25 console.log('source url changed: ' + sourceUrl)
33 departuresModel.clear()
35 var departures = itip.get_departures()
37 for (var d in departures) {
38 console.log('departure: ' + departures[d])
39 // XXX: destination might be wrong?!
40 var row = {'line': resultRealtime.gline, 'station': resultRealtime.gstation, 'destination': gdirection, 'departure': departures[d]}
41 console.log('inserting: ' + row)
42 departuresModel.append(row)
56 visible: mouseArea.pressed
57 source: theme.inverted ? 'image://theme/meegotouch-list-inverted-background-pressed-vertical-center': 'image://theme/meegotouch-list-background-pressed-vertical-center'
62 anchors.margins: UIConstants.DEFAULT_MARGIN
68 anchors.verticalCenter: parent.verticalCenter
70 font.pixelSize: UIConstants.FONT_XLARGE
72 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
73 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
77 anchors.verticalCenter: parent.verticalCenter
81 text: station // <----
83 font.pixelSize: UIConstants.FONT_LARGE
84 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
85 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
90 text: destination // <----
91 color: !theme.inverted ? UIConstants.COLOR_SECONDARY_FOREGROUND : UIConstants.COLOR_INVERTED_SECONDARY_FOREGROUND
92 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
93 font.pixelSize: UIConstants.FONT_LSMALL
100 anchors.right: parent.right
101 anchors.verticalCenter: parent.verticalCenter
104 // FIXME strange int float transformation appears
106 anchors.right: parent.right
107 anchors.rightMargin: UIConstants.DEFAULT_MARGIN
109 font.pixelSize: UIConstants.FONT_XLARGE
110 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
111 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
119 console.debug("clicked: " + l.text)
127 width: parent.width; height: parent.height
131 height: childrenRect.height + 2*UIConstants.DEFAULT_MARGIN
132 color: "lightsteelblue"
139 margins: UIConstants.DEFAULT_MARGIN
142 text: 'Abfahrten Richtung ' + gdirection
143 elide: Text.ElideRight
145 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
146 font.pixelSize: UIConstants.FONT_LSMALL
155 station: "Schottentor"
156 destination: "Maurer Hauptplatz"
161 station: "Schottentor"
162 destination: "Grinzing"
166 delegate: departureDelegate
168 visible: !resultRealtime.busy && resultRealtime.sourceUrl != ''
174 platformStyle: ScrollDecoratorStyle {}
179 visible: resultRealtime.busy && resultRealtime.sourceUrl != ''
181 platformStyle: BusyIndicatorStyle { size: 'large' }
182 anchors.centerIn: parent