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 {
14 iconId: "icon-m-toolbar-search" + (theme.inverted ? "-white": "")
15 onClicked: searchField.open = !searchField.open
18 iconId: "icon-m-toolbar-view-menu" + (theme.inverted ? "-white": "")
19 onClicked: menu.open()
26 text: qsTr("Update Periodically")
28 id: periodicCheckSwitch
30 verticalCenter: parent.verticalCenter
32 rightMargin: UiConstants.DefaultMargin
34 checked: settings.autoUpdate
35 onCheckedChanged: settings.autoUpdate = checked
39 text: qsTr("Use Dark Theme")
41 id: darkThemeSwitchSwitch
43 verticalCenter: parent.verticalCenter
45 rightMargin: UiConstants.DefaultMargin
47 checked: settings.darkThemePreferred
49 settings.darkThemePreferred = checked
50 theme.inverted = checked
55 text: qsTr("About Quando Parte")
56 onClicked: Private.showAboutPage()
58 Component.onCompleted: periodicCheckSwitch.checked = settings.autoUpdate
63 anchors.top: parent.top
64 selectedIndex: stationListProxyModel.sortingMode
66 qsTr("Stations by Name"),
67 qsTr("Stations by Distance"),
68 qsTr("Stations Recently Seen")
73 anchors.top: header.bottom
77 target: stationListProxyModel
78 property: "searchPattern"
79 value: searchField.text
82 target: stationListProxyModel
83 property: "sortingMode"
84 value: header.selectedIndex
87 target: stationListView
88 property: "section.property"
89 value: header.selectedIndex === 0 ? "name" : ""
94 top: searchField.bottom
101 anchors.top: mainView.top
110 bottom: parent.bottom
112 model: stationListProxyModel
115 criteria: ViewSection.FirstCharacter
118 height: UiConstants.SectionItemHeightSmall
120 margins: UiConstants.DefaultMargin
125 right: sectionLabel.left
126 verticalCenter: parent.verticalCenter
127 margins: UiConstants.DefaultMargin
129 source: "image://theme/meegotouch-separator-" + (theme.inverted ? "inverted-" : "") + "background-horizontal"
134 right: sectionRightMargin.left
135 verticalCenter: parent.verticalCenter
140 id: sectionRightMargin
144 width: UiConstants.DefaultMargin
145 height: UiConstants.DefaultMargin
152 height: UiConstants.ListItemHeightSmall
158 visible: mouseArea.pressed
159 source: "image://theme/meegotouch-list-fullwidth-" + (theme.inverted ? "inverted-" : "") + "background-pressed"
164 width: UiConstants.DefaultMargin
165 height: UiConstants.DefaultMargin
168 anchors.verticalCenter: parent.verticalCenter
172 text: Private.highlightSearch(model.name, UiConstants.AccentColor)
182 //source: "image://theme/meegotouch-separator-" + (theme.inverted ? "inverted-" : "") + "background-horizontal"
186 anchors.fill: background
188 Private.loadStation(model.name, model.code)
195 flickableItem: stationListView