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('time: ' + departures[d].time)
39 var row = {'line': departures[d].line, 'station': departures[d].station, 'destination': departures[d].direction, 'departure': departures[d].time, 'lowfloor': departures[d].lowfloor}
40 departuresModel.append(row)
54 visible: mouseArea.pressed
55 source: theme.inverted ? 'image://theme/meegotouch-list-inverted-background-pressed-vertical-center': 'image://theme/meegotouch-list-background-pressed-vertical-center'
60 anchors.margins: UIConstants.DEFAULT_MARGIN
67 anchors.verticalCenter: parent.verticalCenter
69 font.pixelSize: UIConstants.FONT_XLARGE
71 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
72 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
76 anchors.verticalCenter: parent.verticalCenter
80 text: station // <----
81 width: parent.parent.parent.width - l.width - dep.width - 15
82 elide: Text.ElideRight
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 width: parent.parent.parent.width - l.width - dep.width - 15
92 elide: Text.ElideRight
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
110 font.italic: lowfloor == 1
112 font.pixelSize: UIConstants.FONT_XLARGE
113 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
114 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
122 console.debug("clicked: " + l.text)
130 width: parent.width; height: parent.height
134 height: childrenRect.height + 2*UIConstants.DEFAULT_MARGIN
135 color: "lightsteelblue"
144 margins: UIConstants.DEFAULT_MARGIN
147 text: 'Richtung ' + gdirection
148 elide: Text.ElideRight
150 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
151 font.pixelSize: UIConstants.FONT_LSMALL
158 delegate: departureDelegate
160 visible: !resultRealtime.busy && resultRealtime.sourceUrl != ''
166 platformStyle: ScrollDecoratorStyle {}
171 visible: resultRealtime.busy && resultRealtime.sourceUrl != ''
173 platformStyle: BusyIndicatorStyle { size: 'large' }
174 anchors.centerIn: parent