summaryrefslogtreecommitdiff
path: root/res/gui
diff options
context:
space:
mode:
Diffstat (limited to 'res/gui')
-rw-r--r--res/gui/EventInfoPage.qml27
-rw-r--r--res/gui/EventsPage.qml7
2 files changed, 29 insertions, 5 deletions
diff --git a/res/gui/EventInfoPage.qml b/res/gui/EventInfoPage.qml
index 956507e..d04716b 100644
--- a/res/gui/EventInfoPage.qml
+++ b/res/gui/EventInfoPage.qml
@@ -4,7 +4,8 @@ import QtQuick.Controls
Page {
id: root
- property string event_id
+ property string eventName
+ property list<string> competitors
header: ToolBar {
ToolButton {
@@ -18,7 +19,29 @@ Page {
id: pageTitle
font.pixelSize: 20
anchors.centerIn: parent
- text: qsTr("Event Info")
+ text: eventName
+ }
+ }
+
+ ListView {
+ id: listView
+ anchors.fill: parent
+ topMargin: 48
+ leftMargin: 48
+ bottomMargin: 48
+ rightMargin: 48
+ spacing: 20
+ model: competitors
+ delegate: ItemDelegate {
+ text: modelData
+ width: listView.width - listView.leftMargin - listView.rightMargin
+ height: avatar.implicitHeight + 32
+ leftPadding: avatar.implicitWidth + 32
+
+ Image {
+ id: avatar
+ // source: "images/" + modelData.replace(" ", "_") + ".png"
+ }
}
}
diff --git a/res/gui/EventsPage.qml b/res/gui/EventsPage.qml
index 5e4adf3..129d742 100644
--- a/res/gui/EventsPage.qml
+++ b/res/gui/EventsPage.qml
@@ -21,12 +21,13 @@ Page {
spacing: 20
model: sports
delegate: ItemDelegate {
- required property string sportName
- text: sportName
+ required property string eventName
+ required property list<string> competitors
+ text: eventName
width: listView.width - listView.leftMargin - listView.rightMargin
height: avatar.implicitHeight + 32
leftPadding: avatar.implicitWidth + 32
- onClicked: root.StackView.view.push("EventInfoPage.qml", { event_id: 1 })
+ onClicked: root.StackView.view.push("EventInfoPage.qml", { eventName, competitors })
Image {
id: avatar