ListView {
id: stationScheduleView
clip: true
+ visible: false
width: parent.width
height: parent.height
model: schedule
delegate: Item {
id: listItem
- height: 192
+ height: 64
width: parent.width
BorderImage {
id: background
Label {
id: mainText
- text: model.display
+ text: train
font.bold: true
}
}
}
}
}
+ BusyIndicator {
+ id: busyIndicator
+ anchors.centerIn: view
+ visible: !stationScheduleView.visible
+ running: visible
+ }
+ states: [
+ State {
+ name: "loading"
+ PropertyChanges {
+ target: stationScheduleView
+ visible: false
+ }
+ },
+ State {
+ name: "ready"
+ PropertyChanges {
+ target: stationScheduleView
+ visible: true
+ }
+ }
+ ]
}
-
StationScheduleModel {
id: schedule
onNameChanged: schedule.fetch(name)
+ onLayoutChanged: view.state = "ready"
}
+
}