import QtQuick 1.0
import QtMobility.location 1.1
import com.nokia.meego 1.0
+import net.cirulla.quandoparte 1.0
+import "uiconstants.js" as UiConstants
Page {
property variant stationView
id: stationListPage
+ Component.onCompleted: {
+ stationListProxyModel.sortingMode = StationListProxyModel.AlphaSorting
+ }
tools: ToolBarLayout {
id: toolBar
ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
}
}
- Column {
+ PageHeader {
+ id: header
+ anchors.top: parent.top
+ selectedIndex: stationListProxyModel.sortingMode
+ options: ListModel {
+ id: dialogOptions
+ ListElement {
+ name: QT_TR_NOOP("Stations by Name")
+ }
+ ListElement {
+ name: QT_TR_NOOP("Stations by Distance")
+ }
+ ListElement {
+ name: QT_TR_NOOP("Stations Recently Seen")
+ }
+ }
+ }
+ SearchBar {
+ id: searchField
+ anchors.top: header.bottom
+ }
+ Binding {
+ target: stationListProxyModel
+ property: "searchPattern"
+ value: searchField.text
+ }
+ Binding {
+ target: stationListProxyModel
+ property: "sortingMode"
+ value: header.selectedIndex
+ }
+ Rectangle {
+ id: shadow
+ width: parent.width
+ anchors.top: mainView.top
+ height: 5
+ gradient: Gradient {
+ GradientStop {color: "#aa000000"; position: 0.0}
+ GradientStop {color: "#00000000"; position: 1.0}
+ }
+ }
+ Item {
+ id: mainView
x: 16
y: 16
+ anchors.top: searchField.bottom
width: parent.width - 32
height: parent.height
- spacing: 16
- SearchBar {
- id: searchField
- }
- Binding {
- target: stationListProxyModel
- property: "searchPattern"
- value: searchField.text
- }
ListView {
id: stationListView
clip: true
Sheet {
id: settingsSheet
- acceptButtonText: "Save"
- rejectButtonText: "Cancel"
+ acceptButtonText: qsTr("Save")
+ rejectButtonText: qsTr("Cancel")
content: Item {
x: 16
y: 16
Column {
spacing: 16
anchors.fill: parent
- Row {
+ Item {
height: 40
- spacing: 16
+ anchors.leftMargin: UiConstants.DefaultMargins
anchors.left: parent.left
anchors.right: parent.right
Label {
font.bold: true
text: "Show Last Station on Startup"
anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
}
Switch {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
}
}
- Row {
+ Item {
height: 40
- spacing: 16
+ anchors.leftMargin: UiConstants.DefaultMargins
anchors.left: parent.left
anchors.right: parent.right
Label {