2 import QtMobility.location 1.1
3 import com.nokia.meego 1.0
6 property variant stationView
10 ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
11 ToolIcon { iconId: "icon-m-toolbar-settings"; onClicked: settingsSheet.open(); }
12 ToolIcon { iconId: "icon-m-toolbar-view-menu"; }
15 function loadStation()
17 var component = Qt.createComponent("StationPage.qml");
18 if (component.status == Component.Ready) {
19 var view = component.createObject(stationListPage)
20 stationListPage.stationView = view
22 view.html = "<h1>Hello World</h1><p>Lorem ipsum</p>"
25 console.log('Cannot load component: ' + component.errorString());
28 function highlightSearch(s)
30 return s.replace(searchField.text,
31 '<span style="text-decoration:underline">' +
32 searchField.text + '</span>')
41 placeholderText: "Search..."
42 platformStyle: TextFieldStyle { paddingRight: clearButton.width }
47 anchors.right: parent.right
48 anchors.verticalCenter: parent.verticalCenter
49 source: "image://theme/icon-m-input-clear"
67 model: stationListProxyModel
76 visible: mouseArea.pressed
77 source: "image://theme/meegotouch-list-background-pressed-center"
83 anchors.verticalCenter: parent.verticalCenter
87 text: highlightSearch(model.display)
94 anchors.fill: background
96 stationListPage.loadStation(model.display)
105 acceptButtonText: "Save"
106 rejectButtonText: "Cancel"
110 width: parent.width - 32
111 height: parent.height - 32
118 anchors.left: parent.left
119 anchors.right: parent.right
122 text: "Show Last Station on Startup"
123 anchors.verticalCenter: parent.verticalCenter
126 anchors.verticalCenter: parent.verticalCenter
127 id: showLastStationSwitch
128 anchors.right: parent.right
134 anchors.left: parent.left
135 anchors.right: parent.right
138 text: "Update Display Periodically"
139 anchors.verticalCenter: parent.verticalCenter
142 anchors.verticalCenter: parent.verticalCenter
143 anchors.right: parent.right
144 id: periodicCheckSwitch