2024-07-30 10:56:05 +02:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
|
|
|
Page {
|
|
|
|
id: root
|
|
|
|
header: ToolBar {
|
|
|
|
Label {
|
|
|
|
text: qsTr("Olympia 2024 Events")
|
|
|
|
font.pixelSize: 20
|
|
|
|
anchors.centerIn: parent
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ListView {
|
|
|
|
id: listView
|
|
|
|
anchors.fill: parent
|
|
|
|
topMargin: 48
|
|
|
|
leftMargin: 48
|
|
|
|
bottomMargin: 48
|
|
|
|
rightMargin: 48
|
|
|
|
spacing: 20
|
2024-08-15 21:24:28 +02:00
|
|
|
model: sports
|
2024-07-30 10:56:05 +02:00
|
|
|
delegate: ItemDelegate {
|
2024-08-16 07:06:05 +02:00
|
|
|
required property string eventName
|
|
|
|
required property list<string> competitors
|
|
|
|
text: eventName
|
2024-07-30 10:56:05 +02:00
|
|
|
width: listView.width - listView.leftMargin - listView.rightMargin
|
|
|
|
height: avatar.implicitHeight + 32
|
|
|
|
leftPadding: avatar.implicitWidth + 32
|
2024-08-16 07:06:05 +02:00
|
|
|
onClicked: root.StackView.view.push("EventInfoPage.qml", { eventName, competitors })
|
2024-07-30 10:56:05 +02:00
|
|
|
|
|
|
|
Image {
|
|
|
|
id: avatar
|
|
|
|
// source: "images/" + modelData.replace(" ", "_") + ".png"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|