}
}
+ SelectionDialog {
+ id: stationSelector
+ titleText: 'Select nearby station'
+
+ model: ListModel {
+ id: stationSelectorModel
+
+ Component.onCompleted: {
+ var stations = itip.get_nearby_stations(positionSource.position.coordinate.latitude, positionSource.position.coordinate.longitude)
+
+ for (var idx in stations) {
+ stationSelectorModel.append({'name': stations[idx]})
+ }
+ }
+ }
+
+ // XXX It would be nice if we could make a delegate with
+ // icons (i.e. U1, U2, ... in the right colors), but we
+ // would have to "copy" the default delegate style
+
+ onAccepted: {
+ console.log('accepted: ' + selectedIndex)
+ //gline.text = lineSelectorModel.get(selectedIndex).name
+ }
+ }
+
TextField {
placeholderText: 'Line'
var departures = itip.get_departures()
for (var d in departures) {
- console.log('time: ' + departures[d].time)
+ //console.log('time: ' + departures[d].time)
var row = {'line': departures[d].line, 'station': departures[d].station, 'destination': departures[d].direction, 'departure': departures[d].time, 'lowfloor': departures[d].lowfloor}
departuresModel.append(row)
}