2 import com.nokia.meego 1.0
3 import net.cirulla.quandoparte 1.0
4 import "uiconstants.js" as UiConstants
7 property alias name: schedule.name
8 property alias code: schedule.code
10 tools: ToolBarLayout {
12 ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop() }
13 ToolIcon { iconId: "icon-m-toolbar-view-menu"; onClicked: menu.open() }
17 anchors.top: parent.top
18 selectedIndex: schedule.type
26 anchors.top: header.bottom
32 value: header.selectedIndex
50 id: stationScheduleView
59 delegate: StationScheduleDelegate {
61 arrivalTime: model.arrivalTime
62 departureTime: model.departureTime
64 arrivalStation: model.arrivalStation
65 departureStation: model.departureStation
67 actualPlatform: model.actualPlatform
68 expectedPlatfrom: model.expectedPlatform
73 flickableItem: stationScheduleView
77 platformStyle: BusyIndicatorStyle {
80 anchors.centerIn: parent
81 visible: !stationScheduleView.visible
88 target: stationScheduleView
95 target: stationScheduleView
101 StationScheduleModel {
103 onNameChanged: updateStation()
104 onLayoutChanged: view.state = "ready"
106 Component.onCompleted: {
107 updateTimer.timeout.connect(updateStation)
109 function updateStation() {
110 console.log("Updating station with " + schedule.name + ", " + schedule.code)
111 schedule.fetch(schedule.name, schedule.code)