blob: 29349317ba87b67f852b0718c58ef5be24ba1653 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
Page {
id: root
required property string eventName
required property list<QtObject> competitors
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
text: eventName
}
}
ListView {
id: listView
anchors.fill: parent
topMargin: 48
leftMargin: 48
bottomMargin: 48
rightMargin: 48
spacing: 20
model: competitors
delegate: ItemDelegate {
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
width: listView.width - listView.leftMargin - listView.rightMargin
height: 32
Text {
anchors.left: parent.left
text: name + " (" + noc + ")"
}
Text {
anchors.right: parent.right
horizontalAlignment: Text.AlignRight
text: mark + " " + statistic + " | " + gold + "🥇 " + silver + "🥈 " + bronze + "🥉"
}
}
}
}
|