3 import Sailfish.Silica 1.0
4 import net.cirulla.quandoparte 1.0
5 import "StationListPage.js" as Private
9 property variant stationView
10 property string searchPattern
12 target: stationListProxyModel
13 property: "searchPattern"
14 value: stationListPage.searchPattern
21 anchors.top: parent.top
22 anchors.bottom: parent.bottom
23 model: stationListProxyModel
26 text: qsTr("About Quando Parte")
27 onClicked: pageStack.push(Qt.resolvedUrl("AboutPage.qml"))
30 text: qsTr("Stations by Name")
31 onClicked: stationListProxyModel.sortingMode = StationListProxyModel.AlphaSorting
34 text: qsTr("Stations by Distance")
35 onClicked: stationListProxyModel.sortingMode = StationListProxyModel.DistanceSorting
38 text: qsTr("Stations Recently Seen")
39 onClicked: stationListProxyModel.sortingMode = StationListProxyModel.RecentUsageSorting
44 placeholderText: qsTr("Search station...")
45 onTextChanged: stationListPage.searchPattern = searchField.text
46 width: stationListPage.width
48 delegate: BackgroundItem {
50 height: Theme.itemSizeSmall
55 verticalCenter: parent.Center
56 margins: Theme.paddingMedium
59 textFormat: Text.StyledText
60 text: model.name ? Private.highlightSearch(model.name, Theme.highlightColor) : ""
62 onClicked: Private.loadStation(model.name, model.code)
63 onPressAndHold: contextMenu.show(listItem)
67 text: qsTr("Show on the map")
68 onClicked: Qt.openUrlExternally("geo:" + model.longitude + "," + model.latitude)