KOSMIndoorMap

AttributionPage.qml
1/*
2 SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7import QtQuick
8import QtQuick.Layouts
9import QtQuick.Controls as QQC2
10import org.kde.kirigami as Kirigami
11
12Kirigami.ScrollablePage {
13 id: root
14 title: "Data Sources"
15 property var publicTransportManager
16
17 Component {
18 id: attributionDelegate
19 QQC2.ItemDelegate {
20 width: ListView.view.width
21 highlighted: false
22 contentItem: ColumnLayout {
23 QQC2.Label {
24 Layout.fillWidth: true
25 wrapMode: Text.WordWrap
26 text: "<a href=\"" + modelData.url + "\">" + modelData.name + "</a>"
27 onLinkActivated: Qt.openUrlExternally(link)
28 }
29 QQC2.Label {
30 Layout.fillWidth: true
31 text: "License: <a href=\"" + modelData.liceseUrl + "\">" + (modelData.license != "" ? modelData.license : modelData.licenseUrl) + "</a>"
32 onLinkActivated: Qt.openUrlExternally(link)
33 visible: modelData.hasLicense
34 wrapMode: Text.WordWrap
35 }
36 }
37 }
38 }
39
40 ListView {
41 model: publicTransportManager.attributions
42 delegate: attributionDelegate
43 }
44}
KIOCORE_EXPORT CopyJob * link(const QList< QUrl > &src, const QUrl &destDir, JobFlags flags=DefaultFlags)
@ Text
maximum width before wrapping
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:03 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.