3 function loadStation(name)
5 var component = Qt.createComponent("StationPage.qml");
6 if (component.status == Component.Ready) {
7 view = component.createObject(stationListPage)
8 stationListPage.stationView = view
10 view.html = "<h1>Loading station " + name + "</h1><p>Lorem ipsum</p>"
11 provider.stationSchedule(name)
14 console.log('Cannot load component: ' + component.errorString());
17 function highlightSearch(s, color)
19 // TODO compile RegExp on change, or find a way to cleanly use
20 // stationListProxyModel.filterRegExp
21 console.log("string:" + s + " color: " + color)
22 if (searchField.text.length) {
23 var r = new RegExp(searchField.text, 'i')
25 return s.replace(r, '<span style="text-decoration:underline;color:' + color + ';">' +