2 import QtMobility.location 1.1
3 import com.nokia.meego 1.0
4 import net.cirulla.quandoparte 1.0
5 import "uiconstants.js" as UiConstants
6 import "StationListPage.js" as Private
9 property variant stationView
11 tools: ToolBarLayout {
13 ToolIcon { iconId: "icon-m-toolbar-search"; onClicked: searchField.visible = !searchField.visible; }
14 ToolIcon { iconId: "icon-m-toolbar-view-menu"; onClicked: menu.open() }
20 text: qsTr("Update Periodically")
22 id: periodicCheckSwitch
24 verticalCenter: parent.verticalCenter
26 rightMargin: UiConstants.DefaultMargin
28 onCheckedChanged: settings.autoUpdate = checked
32 text: qsTr("About Quando Parte")
33 onClicked: Private.showAboutPage()
35 Component.onCompleted: periodicCheckSwitch.checked = settings.autoUpdate
40 anchors.top: parent.top
41 selectedIndex: stationListProxyModel.sortingMode
43 qsTr("Stations by Name"),
44 qsTr("Stations by Distance"),
45 qsTr("Stations Recently Seen")
50 anchors.top: header.bottom
54 target: stationListProxyModel
55 property: "searchPattern"
56 value: searchField.text
59 target: stationListProxyModel
60 property: "sortingMode"
61 value: header.selectedIndex
66 top: searchField.bottom
73 anchors.top: mainView.top
83 model: stationListProxyModel
86 height: UiConstants.ListItemHeightSmall
92 visible: mouseArea.pressed
93 source: "image://theme/meegotouch-list-fullwidth-background-pressed"
98 width: UiConstants.DefaultMargin
99 height: UiConstants.DefaultMargin
102 anchors.verticalCenter: parent.verticalCenter
106 text: Private.highlightSearch(model.name, UiConstants.AccentColor)
111 text: (model.code !== undefined) ? model.code : "none"
112 font.bold: UiConstants.SubtitleFontBoldness
113 font.pixelSize: UiConstants.SubtitleFontPixelSize
122 source: "image://theme/meegotouch-separator-background-horizontal"
126 anchors.fill: background
128 Private.loadStation(model.name, model.code)
135 flickableItem: stationListView