Warning, /utilities/ktrip/src/qml/DeparturesPage.qml is written in an unsupported language. File is not indexed.

0001 /**
0002  * SPDX-FileCopyrightText: 2019 Nicolas Fella <nicolas.fella@gmx.de>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 import QtQuick 2.2
0008 import QtQuick.Layouts 1.1
0009 import QtQuick.Controls 2.4
0010 import org.kde.kirigami 2.4 as Kirigami
0011 import org.kde.kpublictransport 1.0 as KPT
0012 import org.kde.ktrip 1.0
0013 
0014 Kirigami.ScrollablePage
0015 {
0016     title: i18nc("@title", "Departures")
0017 
0018     header: Kirigami.InlineMessage {
0019         type: Kirigami.MessageType.Error
0020         text: theModel.errorMessage
0021         visible: theModel.errorMessage != ""
0022     }
0023 
0024     ListView {
0025 
0026         model: KPT.StopoverQueryModel {
0027             id: theModel
0028             request: Controller.createStopoverRequest()
0029             manager: Manager
0030         }
0031 
0032         delegate: Kirigami.AbstractListItem {
0033             RowLayout {
0034                 Label {
0035                     text: i18n("%3 %1 (%2)", departure.route.line.name, departure.route.direction, Formatter.formatTime(departure.scheduledDepartureTime))
0036                     Layout.fillWidth: true
0037                     elide: Text.ElideRight
0038                 }
0039                 Label {
0040                     text: departure.scheduledPlatform
0041                 }
0042             }
0043         }
0044 
0045         footer: ToolButton {
0046             width: parent.width
0047             visible: theModel.canQueryNext
0048             onClicked: theModel.queryNext()
0049             icon.name: "arrow-down"
0050         }
0051 
0052         BusyIndicator {
0053             running: theModel.loading
0054             anchors.centerIn: parent
0055         }
0056     }
0057 }
0058 
0059