3 import com.nokia.meego 1.0
4 import net.cirulla.quandoparte 1.0
5 import "uiconstants.js" as UiConstants
10 property alias arrivalTime: arrivalTimeLabel.text
11 property alias departureTime: departureTimeLabel.text
12 property alias train: trainLabel.text
13 property string arrivalStation
14 property string departureStation
15 property alias delay: delayLabel.text
16 property string actualPlatform
17 property string expectedPlatfrom
19 height: UiConstants.ListItemHeightDefault
25 visible: mouseArea.pressed
26 source: "image://theme/meegotouch-list-background-pressed-center"
31 spacing: UiConstants.ButtonSpacing
36 anchors.verticalCenter: parent.verticalCenter
38 spacing: UiConstants.ButtonSpacing
41 font.bold: UiConstants.SpecialFontBoldness
42 font.pixelSize: UiConstants.SpecialFontPixelSize
43 visible: type === StationScheduleModel.ArrivalSchedule
46 id: departureTimeLabel
47 font.bold: UiConstants.SpecialFontBoldness
48 font.pixelSize: UiConstants.SpecialFontPixelSize
49 visible: type === StationScheduleModel.DepartureSchedule
53 font.bold: UiConstants.SpecialFontBoldness
54 font.pixelSize: UiConstants.SpecialFontPixelSize
55 color: UiConstants.AccentColor
59 text: qsTr("from %1").arg(root.arrivalStation)
60 font.bold: UiConstants.DefaultFontBoldness
61 font.pixelSize: UiConstants.DefaultFontPixelSize
62 visible: type === StationScheduleModel.ArrivalSchedule
65 text: qsTr("to %1").arg(root.departureStation)
66 font.bold: UiConstants.DefaultFontBoldness
67 font.pixelSize: UiConstants.DefaultFontPixelSize
68 visible: type === StationScheduleModel.DepartureSchedule
72 font.bold: UiConstants.SubtitleFontBoldness
73 font.pixelSize: UiConstants.SubtitleFontPixelSize
79 bottom: bodyRow.bottom
81 rightMargin: UiConstants.DefaultMargin
83 text: qsTr("Platform %1").arg((root.actualPlatform === "--") ? root.expectedPlatfrom : root.actualPlatform)
84 color: root.actualPlatform === "--" ? "#ddd" : UiConstants.AccentColor
85 font.bold: UiConstants.SubtitleFontBoldness
86 font.pixelSize: UiConstants.SubtitleFontPixelSize
93 source: "image://theme/meegotouch-separator-background-horizontal"
97 anchors.fill: background
99 // Load an external page about the train, for now
100 Qt.openUrlExternally(settings.queryBaseUrl + "/" + detailsUrl)
101 console.log(settings.queryBaseUrl + "/" + detailsUrl)