summaryrefslogtreecommitdiff
path: root/res/gui/EventsPage.qml
blob: bc8c6bdb3b7ff44812822810dcc82c82215ce516 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import QtQuick
import QtQuick.Controls

Page {
  id: root
  header: ToolBar {
    Label {
      text: qsTr("Olympia 2024 Events")
      font.pixelSize: 20
      anchors.centerIn: parent
    }
  }

  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 {
      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"
        }
      }
    }

  }
}