2 import com.nokia.meego 1.0
3 import "/usr/lib/qt4/imports/com/nokia/meego/UIConstants.js" as UiConstants
6 property variant stationView
8 anchors.margins: UiConstants.DEFAULT_MARGIN
11 ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
12 ToolIcon { iconId: "icon-m-toolbar-settings"; onClicked: settingsSheet.open(); }
13 ToolIcon { iconId: "icon-m-toolbar-view-menu"; }
16 function loadStation()
18 var component = Qt.createComponent("StationPage.qml");
19 if (component.status == Component.Ready) {
20 var view = component.createObject(stationListPage)
21 stationListPage.stationView = view
23 view.html = "<h1>Hello World</h1><p>Lorem ipsum</p>"
26 console.log('Cannot load component: ' + component.errorString());
29 function highlightSearch(s)
31 return s.replace(searchField.text,
32 '<span style="text-decoration:underline">' +
33 searchField.text + '</span>')
42 placeholderText: "Search..."
43 platformStyle: TextFieldStyle { paddingRight: clearButton.width }
46 listView.model = model
50 anchors.right: parent.right
51 anchors.verticalCenter: parent.verticalCenter
52 source: "image://theme/icon-m-input-clear"
76 name: "Genova Sestri Ponente"
79 name: "Genova Cornigliano"
82 name: "Genova Sampierdarena"
85 name: "Genova Via di Francia"
88 name: "Genova Piazza Principe"
91 name: "Genova Brignole"
111 visible: mouseArea.pressed
112 source: "image://theme/meegotouch-list-background-pressed-center"
118 anchors.verticalCenter: parent.verticalCenter
122 text: highlightSearch(model.name)
124 //font.family: UiConstants.FONT_FAMILY
125 //font.pixelSize: UiConstants.FONT_DEFAULT
131 anchors.fill: background
133 stationListPage.loadStation(name)
142 acceptButtonText: "Save"
143 rejectButtonText: "Cancel"
147 width: parent.width - 32
148 height: parent.height - 32
155 anchors.left: parent.left
156 anchors.right: parent.right
159 text: "Show Last Station on Startup"
160 anchors.verticalCenter: parent.verticalCenter
163 anchors.verticalCenter: parent.verticalCenter
164 id: showLastStationSwitch
165 anchors.right: parent.right
171 anchors.left: parent.left
172 anchors.right: parent.right
175 text: "Update Display Periodically"
176 anchors.verticalCenter: parent.verticalCenter
179 anchors.verticalCenter: parent.verticalCenter
180 anchors.right: parent.right
181 id: periodicCheckSwitch