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
75 name: "Genova Sestri Ponente"
78 name: "Genova Cornigliano"
81 name: "Genova Sampierdarena"
84 name: "Genova Via di Francia"
87 name: "Genova Piazza Principe"
90 name: "Genova Brignole"
110 visible: mouseArea.pressed
111 source: "image://theme/meegotouch-list-background-pressed-center"
117 anchors.verticalCenter: parent.verticalCenter
121 text: highlightSearch(model.display)
128 anchors.fill: background
130 stationListPage.loadStation(model.display)
139 acceptButtonText: "Save"
140 rejectButtonText: "Cancel"
144 width: parent.width - 32
145 height: parent.height - 32
152 anchors.left: parent.left
153 anchors.right: parent.right
156 text: "Show Last Station on Startup"
157 anchors.verticalCenter: parent.verticalCenter
160 anchors.verticalCenter: parent.verticalCenter
161 id: showLastStationSwitch
162 anchors.right: parent.right
168 anchors.left: parent.left
169 anchors.right: parent.right
172 text: "Update Display Periodically"
173 anchors.verticalCenter: parent.verticalCenter
176 anchors.verticalCenter: parent.verticalCenter
177 anchors.right: parent.right
178 id: periodicCheckSwitch