qmlFrontend/qml/qmlFrontend/GameConfig.qml
author unc0rr
Sat, 25 Oct 2014 00:31:10 +0400
branchqmlfrontend
changeset 10444 47a6231f1fc1
parent 10442 c58db813240b
child 10448 4cb727e029fa
permissions -rw-r--r--
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10422
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
     1
import QtQuick 2.0
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
     2
import Hedgewars.Engine 1.0
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
     3
10442
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
     4
10422
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
     5
Rectangle {
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
     6
    HWButton {
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
     7
        id: btnPreview
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
     8
        x: 50
10434
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
     9
        y: 16
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
    10
        width: 256
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
    11
        height: 128
10422
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
    12
10432
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10428
diff changeset
    13
        onClicked: HWEngine.getPreview()
10422
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
    14
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
    15
        Connections {
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
    16
            target: HWEngine
10424
4be6cd55f1cf - Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents: 10422
diff changeset
    17
            onPreviewImageChanged: previewImage.source = "image://preview/" + HWEngine.currentSeed()
10422
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
    18
        }
10434
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
    19
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
    20
        Image {
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
    21
            id: previewImage
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
    22
            x: 0
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
    23
            y: 0
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
    24
            width: 256
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
    25
            height: 128
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
    26
            cache: false
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
    27
        }
10422
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
    28
    }
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
    29
10436
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    30
    Rectangle {
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    31
        x: 320
10434
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
    32
        y: 16
10436
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    33
        width: 100
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    34
        height: 256
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    35
        color: "#15193a"
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    36
        radius: 8
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    37
        border.width: 4
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    38
        border.color: "#eaea00"
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    39
        Image {
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    40
            id: themeImage
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    41
            x: 0
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    42
            y: 0
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    43
            width: 64
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    44
            height: 64
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    45
            fillMode: Image.Pad
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    46
        }
10434
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
    47
10436
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    48
        ListView {
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    49
            id: themesList
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    50
            x: 0
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    51
            y: 64
10434
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
    52
            width: 100
10436
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    53
            height: 192
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    54
            highlight: Rectangle { color: "#eaea00"; radius: 4 }
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    55
            focus: true
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    56
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    57
            model: themesModel
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    58
            delegate: Rectangle {
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    59
                height: 25
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    60
                width: 100
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    61
                color: "transparent"
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    62
                Text {id: themeName; text: modelData }
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    63
                MouseArea {
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    64
                     z: 1
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    65
                     anchors.fill: parent
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    66
                     onClicked: {
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    67
                         themeImage.source = "image://theme/" + themeName.text
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    68
                         themesList.currentIndex = index
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    69
                     }
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    70
                }
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10434
diff changeset
    71
            }
10434
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents: 10432
diff changeset
    72
        }
10422
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
    73
    }
10442
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    74
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    75
    ListView {
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    76
        id: playingTeamsList
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    77
        x: 440
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    78
        y: 16
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    79
        width: 100
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    80
        height: 192
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    81
        highlight: Rectangle { color: "#eaea00"; radius: 4 }
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    82
        focus: true
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    83
        clip: true
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    84
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    85
        model: ListModel {
10444
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
    86
            id: playingTeamsModel
10442
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    87
        }
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    88
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    89
        delegate: Rectangle {
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    90
            id: teamDelegate
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    91
            height: 24
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    92
            width: parent.width
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    93
            radius: 8
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    94
            border.width: 2
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    95
            border.color: "#eaea00"
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    96
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    97
            Row {
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    98
                Text { text: name }
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
    99
            }
10444
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   100
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   101
            MouseArea {
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   102
                 z: 1
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   103
                 anchors.fill: parent
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   104
                 onClicked: HWEngine.tryRemoveTeam(name)
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   105
            }
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   106
        }
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   107
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   108
        Connections {
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   109
            target: HWEngine
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   110
            onPlayingTeamAdded: playingTeamsModel.append({"aiLevel": aiLevel, "name": teamName, "local": isLocal})
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   111
            onPlayingTeamRemoved: {
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   112
                var i = playingTeamsModel.count - 1;
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   113
                while ((i >= 0) && (playingTeamsModel.get(i).name !== teamName)) --i
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   114
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   115
                if(i >= 0) playingTeamsModel.remove(i, 1)
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   116
            }
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   117
        }
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   118
    }
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   119
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   120
    ListView {
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   121
        id: localTeamsList
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   122
        x: 440
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   123
        y: 224
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   124
        width: 100
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   125
        height: 192
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   126
        highlight: Rectangle { color: "#eaea00"; radius: 4 }
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   127
        focus: true
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   128
        clip: true
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   129
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   130
        model: ListModel {
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   131
            id: localTeamsModel
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   132
        }
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   133
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   134
        delegate: Rectangle {
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   135
            id: localTeamDelegate
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   136
            height: 24
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   137
            width: parent.width
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   138
            radius: 8
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   139
            border.width: 2
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   140
            border.color: "#eaea00"
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   141
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   142
            Row {
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   143
                Text { text: name }
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   144
            }
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   145
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   146
            MouseArea {
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   147
                 z: 1
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   148
                 anchors.fill: parent
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   149
                 onClicked: HWEngine.tryAddTeam(name)
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   150
            }
10442
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
   151
        }
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
   152
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
   153
        Connections {
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
   154
            target: HWEngine
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
   155
            onLocalTeamAdded: localTeamsModel.append({"aiLevel": aiLevel, "name": teamName})
10444
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   156
            onLocalTeamRemoved: {
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   157
                var i = localTeamsModel.count - 1;
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   158
                while ((i >= 0) && (localTeamsModel.get(i).name !== teamName)) --i
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   159
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   160
                if(i >= 0) localTeamsModel.remove(i, 1)
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10442
diff changeset
   161
            }
10442
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
   162
        }
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
   163
    }
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
   164
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
   165
    Component.onCompleted: {
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
   166
        HWEngine.getTeamsList()
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
   167
        HWEngine.getPreview()
c58db813240b Load and show local teams list
unc0rr
parents: 10436
diff changeset
   168
    }
10422
4cf23d4c7624 - Pages
unc0rr
parents:
diff changeset
   169
}