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