2019-05-11 15:21:43 +02:00
|
|
|
/*
|
|
|
|
blueROCK - for digital rock
|
|
|
|
Copyright (C) 2019 Dorian Zedler
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2019-04-22 12:37:47 +02:00
|
|
|
import QtQuick 2.0
|
2019-04-22 12:38:23 +02:00
|
|
|
import QtQuick.Controls 2.4
|
2019-04-22 12:37:47 +02:00
|
|
|
|
2019-04-22 12:38:23 +02:00
|
|
|
DataListView {
|
|
|
|
id: control
|
2019-04-22 12:37:47 +02:00
|
|
|
|
2019-04-22 12:38:23 +02:00
|
|
|
property var listData: ({})
|
|
|
|
|
|
|
|
model: listData[ root.listKey ] === undefined ? 0:listData[ root.listKey ].length
|
|
|
|
|
|
|
|
delegate: ItemDelegate {
|
|
|
|
id: partDel
|
|
|
|
|
2019-05-11 15:16:23 +02:00
|
|
|
property var thisData: listData[ "participants" ][index]
|
|
|
|
|
2019-04-22 12:38:23 +02:00
|
|
|
width: parent.width
|
|
|
|
|
2019-05-11 15:16:23 +02:00
|
|
|
opacity: 0
|
|
|
|
scale: 0.9
|
|
|
|
|
|
|
|
onThisDataChanged: {
|
|
|
|
fadeInPa.start()
|
|
|
|
}
|
|
|
|
|
2019-05-12 21:33:22 +02:00
|
|
|
onClicked: {
|
|
|
|
app.openAthlete(thisData["PerId"])
|
|
|
|
}
|
|
|
|
|
2019-05-11 15:16:23 +02:00
|
|
|
ParallelAnimation {
|
|
|
|
id: fadeInPa
|
|
|
|
NumberAnimation { target: partDel; property: "opacity"; from: 0; to: 1.0; duration: 400 }
|
|
|
|
NumberAnimation { target: partDel; property: "scale"; from: 0.8; to: 1.0; duration: 400 }
|
|
|
|
}
|
|
|
|
|
2019-04-22 12:38:23 +02:00
|
|
|
text: ""
|
|
|
|
|
|
|
|
Row {
|
|
|
|
id: partDelFirstRow
|
|
|
|
|
|
|
|
width: parent.width
|
|
|
|
height: parent.height
|
|
|
|
|
|
|
|
Label {
|
|
|
|
height: parent.height
|
|
|
|
width: parent.width * 0.1
|
|
|
|
|
|
|
|
fontSizeMode: Text.Fit
|
|
|
|
font.bold: true
|
|
|
|
font.pixelSize: Math.abs( height * 0.6 )
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
|
|
|
|
text: listData[ "participants" ][index]["start_order"]
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
height: parent.height
|
2019-04-27 22:48:06 +02:00
|
|
|
width: parent.width * 0.5
|
2019-04-22 12:38:23 +02:00
|
|
|
|
|
|
|
fontSizeMode: Text.Fit
|
|
|
|
font.bold: true
|
2019-04-27 22:48:06 +02:00
|
|
|
font.pixelSize: Math.abs( height * 0.45 )
|
2019-04-22 12:38:23 +02:00
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
horizontalAlignment: Text.AlignLeft
|
2019-04-27 22:48:06 +02:00
|
|
|
minimumPixelSize: 1
|
2019-04-22 12:38:23 +02:00
|
|
|
|
|
|
|
text: listData[ "participants" ][index]["firstname"] + " " + listData[ "participants" ][index]["lastname"]
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
height: parent.height
|
2019-04-27 22:48:06 +02:00
|
|
|
width: parent.width * 0.3
|
2019-04-22 12:38:23 +02:00
|
|
|
|
|
|
|
fontSizeMode: Text.Fit
|
|
|
|
font.bold: false
|
|
|
|
font.pixelSize: Math.abs( height * 0.4 )
|
|
|
|
minimumPixelSize: height * 0.3
|
|
|
|
|
|
|
|
elide: "ElideRight"
|
|
|
|
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
|
|
|
|
text: "<html>(<a href=\"" + (listData[ "participants" ][index]["url"] === undefined ? "":listData[ "participants" ][index]["url"]).toString() + "\">" + (listData[ "display_athlete" ] === "nation" ? listData[ "participants" ][index]["nation"] : listData[ "participants" ][index]["federation"]) + "</a>)</html>"
|
|
|
|
|
|
|
|
onLinkActivated: {
|
|
|
|
Qt.openUrlExternally(link)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2019-04-22 12:37:47 +02:00
|
|
|
}
|