X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=application%2Fresources%2Fharmattan%2Fqml%2FStationListPage.qml;h=79557116055e93e11ec9ef5a04bd780f7dcca0d6;hb=83d0ba5220c22c94d953cbd5a39fcac770528b6b;hp=ee62845f64f6da1cbe15b9d467143de816d7844f;hpb=c54c5102294fccba638c8df56313c7265007383a;p=quandoparte diff --git a/application/resources/harmattan/qml/StationListPage.qml b/application/resources/harmattan/qml/StationListPage.qml index ee62845..7955711 100644 --- a/application/resources/harmattan/qml/StationListPage.qml +++ b/application/resources/harmattan/qml/StationListPage.qml @@ -1,10 +1,15 @@ 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(); } @@ -39,20 +44,54 @@ Page { } } - 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 @@ -96,8 +135,8 @@ Page { Sheet { id: settingsSheet - acceptButtonText: "Save" - rejectButtonText: "Cancel" + acceptButtonText: qsTr("Save") + rejectButtonText: qsTr("Cancel") content: Item { x: 16 y: 16 @@ -106,15 +145,16 @@ Page { 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 @@ -122,9 +162,9 @@ Page { anchors.right: parent.right } } - Row { + Item { height: 40 - spacing: 16 + anchors.leftMargin: UiConstants.DefaultMargins anchors.left: parent.left anchors.right: parent.right Label {