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 title: i18nc("@title", "Departures") 0016 0017 header: Kirigami.InlineMessage { 0018 type: Kirigami.MessageType.Error 0019 text: theModel.errorMessage 0020 visible: theModel.errorMessage != "" 0021 } 0022 0023 ListView { 0024 0025 model: KPT.StopoverQueryModel { 0026 id: theModel 0027 request: Controller.createStopoverRequest() 0028 manager: Manager 0029 } 0030 0031 delegate: ItemDelegate { 0032 0033 width: ListView.view.width 0034 0035 contentItem: RowLayout { 0036 Label { 0037 text: i18n("%3 %1 (%2)", departure.route.line.name, departure.route.direction, Formatter.formatTime(departure.scheduledDepartureTime)) 0038 Layout.fillWidth: true 0039 elide: Text.ElideRight 0040 } 0041 Label { 0042 text: departure.scheduledPlatform 0043 } 0044 } 0045 } 0046 0047 footer: ToolButton { 0048 width: parent.width 0049 visible: theModel.canQueryNext 0050 onClicked: theModel.queryNext() 0051 icon.name: "arrow-down" 0052 } 0053 0054 BusyIndicator { 0055 running: theModel.loading 0056 anchors.centerIn: parent 0057 } 0058 } 0059 }