Page {
property alias name: schedule.name
- anchors.fill: parent
tools: ToolBarLayout {
id: toolBar
PageHeader {
id: header
anchors.top: parent.top
- selectedIndex: settings.showArrivalsPreferred ? 1 : 0
+ selectedIndex: schedule.type
options: ListModel {
id: dialogOptions
ListElement {
}
}
InfoBar {
- id: info
+ id: infoBar
anchors.top: header.bottom
text: parent.name
}
- DroppedShadow {
- id: shadow
- anchors.top: view.top
- }
Binding {
- target: settings
- property: "showArrivalsPreferred"
- value: header.selectedIndex === 1 ? true : false
+ target: schedule
+ property: "type"
+ value: header.selectedIndex
}
LabelStyle {
id: labelStyle
}
Item {
id: view
- anchors.top: info.bottom
- x: 16
- y: 16
- width: parent.width - 32
- height: parent.height
-
+ anchors {
+ top: infoBar.bottom
+ bottom: parent.bottom
+ left: parent.left
+ right: parent.right
+ }
+ DroppedShadow {
+ id: shadow
+ anchors.top: view.top
+ }
ListView {
id: stationScheduleView
clip: true
visible: false
width: parent.width
- height: parent.height
+ anchors {
+ top: shadow.top
+ bottom: parent.bottom
+ }
model: schedule
delegate: Item {
id: listItem
Row {
spacing: UiConstants.ButtonSpacing
Label {
+ text: arrivalTime
+ font.bold: UiConstants.SpecialFontBoldness
+ font.pixelSize: UiConstants.SpecialFontPixelSize
+ visible: schedule.type === StationScheduleModel.ArrivalSchedule
+ }
+ Label {
text: departureTime
font.bold: UiConstants.SpecialFontBoldness
font.pixelSize: UiConstants.SpecialFontPixelSize
+ visible: schedule.type === StationScheduleModel.DepartureSchedule
}
Label {
text: train
}
}
Label {
- text: qsTr("per ") + departureStation
+ text: qsTr("from ") + arrivalStation
+ font.bold: UiConstants.DefaultFontBoldness
+ font.pixelSize: UiConstants.DefaultFontPixelSize
+ visible: schedule.type === StationScheduleModel.ArrivalSchedule
+ }
+ Label {
+ text: qsTr("to ") + departureStation
font.bold: UiConstants.DefaultFontBoldness
font.pixelSize: UiConstants.DefaultFontPixelSize
+ visible: schedule.type === StationScheduleModel.DepartureSchedule
}
Label {
text: delay
anchors.right: parent.right;
anchors.verticalCenter: parent.verticalCenter
}
+ Image {
+ anchors {
+ left: parent.left
+ right: parent.right
+ }
+ source: "image://theme/meegotouch-separator-background-horizontal"
+ }
MouseArea {
id: mouseArea
anchors.fill: background
platformStyle: BusyIndicatorStyle {
size: "large"
}
- anchors.centerIn: view
+ anchors.centerIn: parent
visible: !stationScheduleView.visible
running: visible
}