2024-07-30 10:56:05 +02:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Layouts
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
|
|
|
Page {
|
|
|
|
id: root
|
2024-08-16 23:40:38 +02:00
|
|
|
required property string eventName
|
|
|
|
required property list<QtObject> competitors
|
2024-07-30 10:56:05 +02:00
|
|
|
|
|
|
|
header: ToolBar {
|
|
|
|
ToolButton {
|
|
|
|
text: qsTr("Back")
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 10
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
onClicked: root.StackView.view.pop()
|
|
|
|
}
|
|
|
|
Label {
|
|
|
|
id: pageTitle
|
|
|
|
font.pixelSize: 20
|
|
|
|
anchors.centerIn: parent
|
2024-08-16 07:06:05 +02:00
|
|
|
text: eventName
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ListView {
|
|
|
|
id: listView
|
|
|
|
anchors.fill: parent
|
|
|
|
topMargin: 48
|
|
|
|
leftMargin: 48
|
|
|
|
bottomMargin: 48
|
|
|
|
rightMargin: 48
|
|
|
|
spacing: 20
|
2024-08-16 23:40:38 +02:00
|
|
|
model: competitors
|
2024-08-16 07:06:05 +02:00
|
|
|
delegate: ItemDelegate {
|
2024-08-16 23:40:38 +02:00
|
|
|
required property string name
|
|
|
|
required property string noc
|
|
|
|
required property string mark
|
|
|
|
required property string statistic
|
|
|
|
required property string gold
|
|
|
|
required property string silver
|
|
|
|
required property string bronze
|
2024-08-16 07:06:05 +02:00
|
|
|
width: listView.width - listView.leftMargin - listView.rightMargin
|
2024-08-16 23:40:38 +02:00
|
|
|
height: 32
|
|
|
|
Text {
|
|
|
|
anchors.left: parent.left
|
|
|
|
text: name + " (" + noc + ")"
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
anchors.right: parent.right
|
|
|
|
horizontalAlignment: Text.AlignRight
|
|
|
|
text: mark + " " + statistic + " | " + gold + "🥇 " + silver + "🥈 " + bronze + "🥉"
|
2024-08-16 07:06:05 +02:00
|
|
|
}
|
2024-08-16 23:40:38 +02:00
|
|
|
|
2024-07-30 10:56:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|