KOSMIndoorMap

AttributionPage.qml
1 /*
2  SPDX-FileCopyrightText: 2021 Volker Krause <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 import QtQuick 2.13
8 import QtQuick.Layouts 1.11
9 import QtQuick.Controls 2.1 as QQC2
10 import org.kde.kirigami 2.4 as Kirigami
11 
12 Kirigami.ScrollablePage {
13  id: root
14  title: "Data Sources"
15  property var publicTransportManager
16 
17  Component {
18  id: attributionDelegate
19  Kirigami.AbstractListItem {
20  width: ListView.view.width
21  highlighted: false
22  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 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 23 2021 23:03:45 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.