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
69 anchors.verticalCenter: parent.verticalCenter
71 font.pixelSize: UIConstants.FONT_XLARGE
73 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
74 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
78 anchors.verticalCenter: parent.verticalCenter
82 text: station // <----
83 width: parent.parent.parent.width - l.width - dep.width - 10
84 elide: Text.ElideRight
85 font.pixelSize: UIConstants.FONT_LARGE
86 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
87 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
92 text: destination // <----
93 color: !theme.inverted ? UIConstants.COLOR_SECONDARY_FOREGROUND : UIConstants.COLOR_INVERTED_SECONDARY_FOREGROUND
94 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
95 font.pixelSize: UIConstants.FONT_LSMALL
102 anchors.right: parent.right
103 anchors.verticalCenter: parent.verticalCenter
106 // FIXME strange int float transformation appears
108 anchors.right: parent.right
109 anchors.rightMargin: UIConstants.DEFAULT_MARGIN
111 font.pixelSize: UIConstants.FONT_XLARGE
112 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
113 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
121 console.debug("clicked: " + l.text)
129 width: parent.width; height: parent.height
133 height: childrenRect.height + 2*UIConstants.DEFAULT_MARGIN
134 color: "lightsteelblue"
143 margins: UIConstants.DEFAULT_MARGIN
146 text: 'Richtung ' + gdirection
147 elide: Text.ElideRight
149 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
150 font.pixelSize: UIConstants.FONT_LSMALL
157 delegate: departureDelegate
159 visible: !resultRealtime.busy && resultRealtime.sourceUrl != ''
165 platformStyle: ScrollDecoratorStyle {}
170 visible: resultRealtime.busy && resultRealtime.sourceUrl != ''
172 platformStyle: BusyIndicatorStyle { size: 'large' }
173 anchors.centerIn: parent