Warning, /pim/itinerary/src/app/BoatDelegate.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org> 0003 SPDX-License-Identifier: LGPL-2.0-or-later 0004 */ 0005 0006 import QtQuick 0007 import QtQuick.Layouts 0008 import QtQuick.Controls as QQC2 0009 import org.kde.kirigami as Kirigami 0010 import org.kde.itinerary 0011 0012 TimelineDelegate { 0013 id: root 0014 headerIconSource: "qrc:///images/ferry.svg" 0015 headerItem: RowLayout { 0016 QQC2.Label { 0017 text: i18n("%1 to %2", reservationFor.departureBoatTerminal.name, reservationFor.arrivalBoatTerminal.name); 0018 color: root.headerTextColor 0019 Layout.fillWidth: true 0020 } 0021 QQC2.Label { 0022 text: Localizer.formatTime(reservationFor, "departureTime") 0023 color: root.headerTextColor 0024 } 0025 } 0026 0027 contentItem: Column { 0028 id: topLayout 0029 spacing: Kirigami.Units.smallSpacing 0030 0031 QQC2.Label { 0032 text: i18n("From: %1", reservationFor.departureBoatTerminal.name) 0033 width: topLayout.width 0034 } 0035 QQC2.Label { 0036 visible: text !== "" 0037 width: topLayout.width 0038 text: Localizer.formatAddressWithContext(reservationFor.departureBoatTerminal.address, 0039 reservationFor.arrivalBoatTerminal.address, 0040 Settings.homeCountryIsoCode) 0041 } 0042 Kirigami.Separator { 0043 width: topLayout.width 0044 } 0045 QQC2.Label { 0046 text: i18n("To: %1", reservationFor.arrivalBoatTerminal.name) 0047 width: topLayout.width 0048 } 0049 QQC2.Label { 0050 visible: text !== "" 0051 width: topLayout.width 0052 text: Localizer.formatAddressWithContext(reservationFor.arrivalBoatTerminal.address, 0053 reservationFor.departureBoatTerminal.address, 0054 Settings.homeCountryIsoCode) 0055 } 0056 QQC2.Label { 0057 text: i18n("Arrival time: %1", Localizer.formatDateTime(reservationFor, "arrivalTime")) 0058 wrapMode: Text.WordWrap 0059 } 0060 } 0061 0062 onClicked: showDetailsPage(boatDetailsPage, root.batchId) 0063 } 0064