6b8583bf284dd422f8f47b0c26a5b40a05460804
[quandoparte] / application / resources / sailfish / qml / cover / CoverPage.qml
1 import QtQuick 2.0
2 import Sailfish.Silica 1.0
3 import net.cirulla.quandoparte 1.0
4 import "../pages/components"
5
6 CoverBackground {
7     CoverPlaceholder {
8         anchors.fill: parent
9         text: qsTr("Quando Parte")
10         icon.source: "/usr/share/icons/hicolor/86x86/apps/quandoparte.png"
11         visible: stationScheduleView.count === 0
12     }
13     SilicaListView {
14         id: stationScheduleView
15         anchors.fill: parent
16         model: schedule
17         delegate: StationScheduleDelegate {
18             width: stationScheduleView.width
19             compact: true
20             type: schedule.type
21             arrivalTime: model.arrivalTime
22             departureTime: model.departureTime
23             train: model.train
24             arrivalStation: model.arrivalStation
25             departureStation: model.departureStation
26             delay: model.delay
27             actualPlatform: model.actualPlatform
28             expectedPlatfrom: model.expectedPlatform
29         }
30     }
31     OpacityRampEffect {
32         id: effect
33         slope: 2
34         offset: 0.5
35         sourceItem: stationScheduleView
36     }
37     CoverActionList {
38         enabled: schedule.name.length !== 0
39         iconBackground: true
40         CoverAction {
41             iconSource: "image://theme/icon-cover-refresh"
42             onTriggered: schedule.fetch(schedule.name, schedule.code)
43         }
44     }
45 }