diff options
| author | Orangerot <purple@orangerot.dev> | 2024-08-16 15:40:37 +0200 | 
|---|---|---|
| committer | Orangerot <purple@orangerot.dev> | 2024-08-16 15:40:37 +0200 | 
| commit | 3d19fd72716561a0322ba0acc5c94aac9f161e9d (patch) | |
| tree | ef99fce2c021d2c5f38eaa2d62be6493fa940dd1 /res/gui | |
| parent | 573403247538c50e1fb2133f73d8939532ee36fa (diff) | |
feat(Sport): select Discipline
Diffstat (limited to 'res/gui')
| -rw-r--r-- | res/gui/EventsPage.qml | 206 | 
1 files changed, 201 insertions, 5 deletions
| diff --git a/res/gui/EventsPage.qml b/res/gui/EventsPage.qml index bc8c6bd..ad36d15 100644 --- a/res/gui/EventsPage.qml +++ b/res/gui/EventsPage.qml @@ -31,13 +31,209 @@ Page {          displayText: "Disziplin: " + currentText          model: myListModel +        textRole: "text"          ListModel {            id: myListModel -          ListElement { key: "Archerie" } -          ListElement { key: "Shooting" } -          ListElement { key: "Break-Dance" } -          ListElement { key: "More" } +          ListElement { +            text: "AquaticsArtisticSwimming"     +            api: "SWA" +          } +          ListElement { +            text: "AquaticsDiving"               +            api: "DIV" +          } +          ListElement { +            text: "AquaticsMarathonSwimming"     +            api: "OWS" +          } +          ListElement { +            text: "AquaticsSwimming"             +            api: "SWM" +          } +          ListElement { +            text: "AquaticsWaterPolo"            +            api: "WPO" +          } +          ListElement { +            text: "Archery"                      +            api: "ARC" +          } +          ListElement { +            text: "Athletics"                    +            api: "ATH" +          } +          ListElement { +            text: "Badminton"                    +            api: "BDM" +          } +          ListElement { +            text: "Basketball3v3"                +            api: "BK3" +          } +          ListElement { +            text: "Basketball"                   +            api: "BKB" +          } +          ListElement { +            text: "Boxing"                       +            api: "BOX" +          } +          ListElement { +            text: "Breaking"                     +            api: "BKG" +          } +          ListElement { +            text: "CanoeingSprint"               +            api: "CSP" +          } +          ListElement { +            text: "CanoeingSlalom"               +            api: "CSL" +          } +          ListElement { +            text: "CyclingBMXFreestyle"          +            api: "BMF" +          } +          ListElement { +            text: "CyclingBMXRacing"             +            api: "BMX" +          } +          ListElement { +            text: "CyclingMaountainBike"         +            api: "MTB" +          } +          ListElement { +            text: "CyclingRoad"                  +            api: "CRD" +          } +          ListElement { +            text: "CyclingTrack"                 +            api: "CTR" +          } +          ListElement { +            text: "EquestrianDressage"           +            api: "EDR" +          } +          ListElement { +            text: "EquestrianEventing"           +            api: "EVE" +          } +          ListElement { +            text: "EquestrianJumping"            +            api: "EJP" +          } +          ListElement { +            text: "Fencing"                      +            api: "FEN" +          } +          ListElement { +            text: "FieldHockey"                  +            api: "HOC" +          } +          ListElement { +            text: "Football"                     +            api: "FBL" +          } +          ListElement { +            text: "Golf"                         +            api: "GLF" +          } +          ListElement { +            text: "GymnasticsArtistic"           +            api: "GAR" +          } +          ListElement { +            text: "GymnasticsRhythmic"           +            api: "GRY" +          } +          ListElement { +            text: "GymnasticsTrampoline"         +            api: "GTR" +          } +          ListElement { +            text: "HandballIndoor"               +            api: "HBL" +          } +          ListElement { +            text: "Judo"                         +            api: "JUD" +          } +          ListElement { +            text: "ModernPentathlon"             +            api: "MPN" +          } +          ListElement { +            text: "Rowing"                       +            api: "ROW" +          } +          ListElement { +            text: "Rugby7"                       +            api: "RU7" +          } +          ListElement { +            text: "Sailing"                      +            api: "SAL" +          } +          ListElement { +            text: "Shooting"                     +            api: "SHO" +          } +          ListElement { +            text: "Skateboarding"                +            api: "SKB" +          } +          ListElement { +            text: "SportClimbing"                +            api: "CLB" +          } +          ListElement { +            text: "Surfing"                      +            api: "SRF" +          } +          ListElement { +            text: "TableTennis"                  +            api: "TTE" +          } +          ListElement { +            text: "Taekwondo"                    +            api: "TKW" +          } +          ListElement { +            text: "Tennis"                       +            api: "TEN" +          } +          ListElement { +            text: "Triathlon"                    +            api: "TRI" +          } +          ListElement { +            text: "VolleyballBeach"              +            api: "VBV" +          } +          ListElement { +            text: "VolleyballIndoor"             +            api: "VVO" +          } +          ListElement { +            text: "Weightlifting"                +            api: "WLF" +          } +          ListElement { +            text: "WrestlingFreestyle"           +            api: "WRE" +          } +          ListElement { +            text: "WrestlingGrecoRoman"          +            api: "WRG" +          } +        } + +        onActivated: { +          if (currentIndex >= 0) { +            console.log(currentValue.api); +            sports.request(currentValue.api) +          }          }        }        ComboBox { @@ -80,7 +276,7 @@ Page {            id: avatar            height: 32            width: 32 -          source: "qrc:/qt/qml/itat/res/pictograms/ARC_small.svg" +          source: "qrc:/qt/qml/itat/res/pictograms/" + sports.discipline + "_small.svg"          }        }      } | 
