diff options
author | Orangerot <purple@orangerot.dev> | 2024-08-16 14:29:27 +0200 |
---|---|---|
committer | Orangerot <purple@orangerot.dev> | 2024-08-16 14:29:27 +0200 |
commit | 573403247538c50e1fb2133f73d8939532ee36fa (patch) | |
tree | f6dfb38e9ce2a13f5d5b7ba66914a832c9396266 | |
parent | eb61690873e234ea28a3f437fb7211c773a449fe (diff) |
feat(EventsPage): CombiBox for selecting disciplin, sorting and filter
-rw-r--r-- | res/gui/EventsPage.qml | 91 |
1 files changed, 71 insertions, 20 deletions
diff --git a/res/gui/EventsPage.qml b/res/gui/EventsPage.qml index 129d742..bc8c6bd 100644 --- a/res/gui/EventsPage.qml +++ b/res/gui/EventsPage.qml @@ -11,29 +11,80 @@ Page { } } - ListView { - id: listView + Column { anchors.fill: parent - topMargin: 48 - leftMargin: 48 - bottomMargin: 48 - rightMargin: 48 - spacing: 20 - model: sports - delegate: ItemDelegate { - 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", { eventName, competitors }) - - Image { - id: avatar - // source: "images/" + modelData.replace(" ", "_") + ".png" + 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 { + id: listView + // anchors.fill: parent + // topMargin: 48 + height: parent.height + width: parent.width + spacing: 20 + model: sports + delegate: ItemDelegate { + required property string eventName + required property list<string> competitors + text: eventName + width: listView.width - listView.leftMargin - listView.rightMargin + height: avatar.height + leftPadding: avatar.width + 16 + onClicked: root.StackView.view.push("EventInfoPage.qml", { eventName, competitors }) + + Image { + id: avatar + height: 32 + width: 32 + source: "qrc:/qt/qml/itat/res/pictograms/ARC_small.svg" + } } } + } } |