/*
XXX Ugliness ahead! Changing the name triggers the station
- to schedule to be fetched. So any extra data (the code specifically)
+ schedule to be fetched. So any extra data (the code specifically)
must be set before changing the name.
*/
if (code !== undefined) view.code = code
property: "sortingMode"
value: header.selectedIndex
}
+ Binding {
+ target: stationListView
+ property: "section.property"
+ value: header.selectedIndex === 0 ? "name" : ""
+ }
Item {
id: mainView
anchors {
bottom: parent.bottom
}
model: stationListProxyModel
+ section {
+ //property: "name"
+ criteria: ViewSection.FirstCharacter
+ delegate: Item {
+ width: parent.width
+ height: UiConstants.SectionItemHeightSmall
+ anchors {
+ margins: UiConstants.DefaultMargin
+ }
+ Image {
+ anchors {
+ left: parent.left
+ right: sectionLabel.left
+ verticalCenter: parent.verticalCenter
+ margins: UiConstants.DefaultMargin
+ }
+ source: "image://theme/meegotouch-separator-" + (theme.inverted ? "inverted-" : "") + "background-horizontal"
+ }
+ Label {
+ id: sectionLabel
+ anchors {
+ right: sectionRightMargin.left
+ verticalCenter: parent.verticalCenter
+ }
+ text: section
+ }
+ Item {
+ id: sectionRightMargin
+ anchors {
+ right: parent.right
+ }
+ width: UiConstants.DefaultMargin
+ height: UiConstants.DefaultMargin
+ }
+ }
+ }
+
delegate: Item {
id: listItem
height: UiConstants.ListItemHeightSmall
left: parent.left
right: parent.right
}
- source: "image://theme/meegotouch-separator-" + (theme.inverted ? "inverted-" : "") + "background-horizontal"
+ //source: "image://theme/meegotouch-separator-" + (theme.inverted ? "inverted-" : "") + "background-horizontal"
}
MouseArea {
id: mouseArea
const SearchBarDefaultHeight = 80
+const SectionItemHeightSmall = 32
+
const ListItemHeightSmall = 64
const ListItemHeightDefault = 80
const ListItemHeightLarge = 96