3 import com.nokia.meego 1.0
4 import net.cirulla.quandoparte 1.0
5 import "uiconstants.js" as UiConstants
8 property alias name: schedule.name
10 tools: ToolBarLayout {
12 ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
13 ToolIcon { iconId: "icon-m-toolbar-view-menu"; }
17 anchors.top: parent.top
18 selectedIndex: schedule.type
22 name: QT_TR_NOOP("Departures")
25 name: QT_TR_NOOP("Arrivals")
31 anchors.top: header.bottom
37 value: header.selectedIndex
55 id: stationScheduleView
66 height: UiConstants.ListItemHeightDefault
72 visible: mouseArea.pressed
73 source: "image://theme/meegotouch-list-background-pressed-center"
77 spacing: UiConstants.ButtonSpacing
82 anchors.verticalCenter: parent.verticalCenter
84 spacing: UiConstants.ButtonSpacing
87 font.bold: UiConstants.SpecialFontBoldness
88 font.pixelSize: UiConstants.SpecialFontPixelSize
89 visible: schedule.type === StationScheduleModel.ArrivalSchedule
93 font.bold: UiConstants.SpecialFontBoldness
94 font.pixelSize: UiConstants.SpecialFontPixelSize
95 visible: schedule.type === StationScheduleModel.DepartureSchedule
99 font.bold: UiConstants.SpecialFontBoldness
100 font.pixelSize: UiConstants.SpecialFontPixelSize
101 color: UiConstants.AccentColor
105 text: qsTr("from ") + arrivalStation
106 font.bold: UiConstants.DefaultFontBoldness
107 font.pixelSize: UiConstants.DefaultFontPixelSize
108 visible: schedule.type === StationScheduleModel.ArrivalSchedule
111 text: qsTr("to ") + departureStation
112 font.bold: UiConstants.DefaultFontBoldness
113 font.pixelSize: UiConstants.DefaultFontPixelSize
114 visible: schedule.type === StationScheduleModel.DepartureSchedule
118 font.bold: UiConstants.SubtitleFontBoldness
119 font.pixelSize: UiConstants.SubtitleFontPixelSize
124 source: "image://theme/icon-m-common-drilldown-arrow" + (theme.inverted ? "-inverse" : "")
125 anchors.right: parent.right;
126 anchors.verticalCenter: parent.verticalCenter
133 source: "image://theme/meegotouch-separator-background-horizontal"
137 anchors.fill: background
139 // Load an external page about the train, for now
146 flickableItem: stationScheduleView
150 platformStyle: BusyIndicatorStyle {
153 anchors.centerIn: parent
154 visible: !stationScheduleView.visible
161 target: stationScheduleView
168 target: stationScheduleView
174 StationScheduleModel {
176 onNameChanged: schedule.fetch(name)
177 onLayoutChanged: view.state = "ready"