feat(EventsPage): CombiBox for selecting disciplin, sorting and filter

This commit is contained in:
Orangerot 2024-08-16 14:29:27 +02:00
parent eb61690873
commit 5734032475

View file

@ -11,13 +11,60 @@ Page {
} }
} }
Column {
anchors.fill: parent
anchors.topMargin: 24
anchors.leftMargin: 48
anchors.bottomMargin: 48
anchors.rightMargin: 48
spacing: 24
Row {
// width: parent.width
// height: 50
spacing: 20
ComboBox {
width: 200
height: 50
displayText: "Disziplin: " + currentText
model: myListModel
ListModel {
id: myListModel
ListElement { key: "Archerie" }
ListElement { key: "Shooting" }
ListElement { key: "Break-Dance" }
ListElement { key: "More" }
}
}
ComboBox {
width: 200
height: 50
displayText: "Sort by: " + currentText
model: ["hu", "hi"]
}
ComboBox {
width: 200
height: 50
displayText: "Filter: " + currentText
model: ["hu", "hi"]
}
}
ListView { ListView {
id: listView id: listView
anchors.fill: parent // anchors.fill: parent
topMargin: 48 // topMargin: 48
leftMargin: 48 height: parent.height
bottomMargin: 48 width: parent.width
rightMargin: 48
spacing: 20 spacing: 20
model: sports model: sports
delegate: ItemDelegate { delegate: ItemDelegate {
@ -25,15 +72,19 @@ Page {
required property list<string> competitors required property list<string> competitors
text: eventName text: eventName
width: listView.width - listView.leftMargin - listView.rightMargin width: listView.width - listView.leftMargin - listView.rightMargin
height: avatar.implicitHeight + 32 height: avatar.height
leftPadding: avatar.implicitWidth + 32 leftPadding: avatar.width + 16
onClicked: root.StackView.view.push("EventInfoPage.qml", { eventName, competitors }) onClicked: root.StackView.view.push("EventInfoPage.qml", { eventName, competitors })
Image { Image {
id: avatar id: avatar
// source: "images/" + modelData.replace(" ", "_") + ".png" height: 32
} width: 32
source: "qrc:/qt/qml/itat/res/pictograms/ARC_small.svg"
} }
} }
} }
}
}