2 import Sailfish.Silica 1.0
3 import net.cirulla.quandoparte 1.0
4 import "StationListPage.js" as Private
8 property variant stationView
9 property string searchPattern
11 target: stationListProxyModel
12 property: "searchPattern"
13 value: stationListPage.searchPattern
20 anchors.top: parent.top
21 anchors.bottom: parent.bottom
22 model: stationListProxyModel
25 text: qsTr("About Quando Parte")
26 onClicked: pageStack.push(Qt.resolvedUrl("AboutPage.qml"))
29 text: qsTr("Stations by Name")
30 onClicked: stationListProxyModel.sortingMode = StationListProxyModel.AlphaSorting
33 text: qsTr("Stations by Distance")
34 onClicked: stationListProxyModel.sortingMode = StationListProxyModel.DistanceSorting
37 text: qsTr("Stations Recently Seen")
38 onClicked: stationListProxyModel.sortingMode = StationListProxyModel.RecentUsageSorting
43 placeholderText: qsTr("Search station...")
44 onTextChanged: stationListPage.searchPattern = searchField.text
45 width: stationListPage.width
47 delegate: BackgroundItem {
49 height: Theme.itemSizeSmall
54 verticalCenter: parent.Center
55 margins: Theme.paddingMedium
58 textFormat: Text.StyledText
59 text: model.name ? Private.highlightSearch(model.name, Theme.highlightColor) : ""
61 onClicked: Private.loadStation(model.name, model.code)
64 criteria: ViewSection.FirstCharacter
65 delegate: BackgroundItem {
66 height: Theme.itemSizeSmall