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
16 property bool isStation: false
20 console.log('refreshing')
23 console.log('station based')
24 itip.load_station_departures(gstation)
26 console.log('one line')
27 itip.load_departures(sourceUrl)
31 function isCorrectInput () {
32 return resultRealtime.sourceUrl != '' || (resultRealtime.isStation && resultRealtime.gstation != '')
44 departuresModel.clear()
46 var departures = itip.get_departures()
48 for (var d in departures) {
49 console.log('time: ' + departures[d].time)
50 var row = {'line': departures[d].line, 'station': departures[d].station, 'destination': departures[d].direction, 'departure': departures[d].time, 'lowfloor': departures[d].lowfloor}
51 departuresModel.append(row)
65 visible: mouseArea.pressed
66 source: theme.inverted ? 'image://theme/meegotouch-list-inverted-background-pressed-vertical-center': 'image://theme/meegotouch-list-background-pressed-vertical-center'
71 anchors.margins: UIConstants.DEFAULT_MARGIN
78 anchors.verticalCenter: parent.verticalCenter
80 font.pixelSize: UIConstants.FONT_XLARGE
82 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
83 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
87 anchors.verticalCenter: parent.verticalCenter
91 text: station // <----
92 width: parent.parent.parent.width - l.width - dep.width - 15
93 elide: Text.ElideRight
94 font.pixelSize: UIConstants.FONT_LARGE
95 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
96 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
101 text: destination // <----
102 width: parent.parent.parent.width - l.width - dep.width - 15
103 elide: Text.ElideRight
104 color: !theme.inverted ? UIConstants.COLOR_SECONDARY_FOREGROUND : UIConstants.COLOR_INVERTED_SECONDARY_FOREGROUND
105 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
106 font.pixelSize: UIConstants.FONT_LSMALL
113 anchors.right: parent.right
114 anchors.verticalCenter: parent.verticalCenter
117 // FIXME strange int float transformation appears
119 anchors.right: parent.right
120 anchors.rightMargin: UIConstants.DEFAULT_MARGIN
121 font.italic: lowfloor == 1
123 font.pixelSize: UIConstants.FONT_XLARGE
124 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
125 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
133 console.debug("clicked: " + l.text)
141 width: parent.width; height: parent.height
145 height: childrenRect.height + 2*UIConstants.DEFAULT_MARGIN
146 color: "lightsteelblue"
157 margins: UIConstants.DEFAULT_MARGIN
160 text: 'Richtung ' + gdirection
161 elide: Text.ElideRight
163 font.family: ExtrasConstants.FONT_FAMILY_LIGHT
164 font.pixelSize: UIConstants.FONT_LSMALL
171 delegate: departureDelegate
173 visible: !resultRealtime.busy && isCorrectInput()
179 platformStyle: ScrollDecoratorStyle {}
184 visible: resultRealtime.busy && isCorrectInput()
186 platformStyle: BusyIndicatorStyle { size: 'large' }
187 anchors.centerIn: parent