1/* GCompris - OperatorRow.qml 2 * 3 * SPDX-FileCopyrightText: 2016 RAHUL YADAV <rahulyadav170923@gmail.com> 4 * 5 * Authors: 6 * Pascal Georges <pascal.georges1@free.fr> (GTK+ version) 7 * RAHUL YADAV <rahulyadav170923@gmail.com> (Qt Quick port) 8 * 9 * SPDX-License-Identifier: GPL-3.0-or-later 10 */ 11 12 13import QtQuick 2.9 14import "../../core" 15import "guesscount.js" as Activity 16 17Row { 18 id: operatorRow 19 spacing: 20 20 property string mode 21 property var operators 22 property int level 23 property alias repeater: repeater 24 Rectangle { 25 id: operator 26 width: parent.width*0.328 27 height: parent.height 28 radius: 20.0; 29 color: "#E16F6F" //red 30 Rectangle { 31 id: insideFill 32 width: parent.width - anchors.margins 33 height: parent.height - anchors.margins 34 anchors.verticalCenter: parent.verticalCenter 35 anchors.horizontalCenter: parent.horizontalCenter 36 anchors.margins: parent.height/4 37 radius: 10 38 color: "#E8E8E8" 39 } 40 GCText { 41 anchors.horizontalCenter: parent.horizontalCenter 42 anchors.verticalCenter: parent.verticalCenter 43 fontSize: mediumSize 44 text: qsTr("Operators") 45 } 46 } 47 Repeater { 48 id: repeater 49 model: (mode == "builtin") ? Activity.defaultOperators[level] : operators[level] 50 delegate: DragTile { 51 id: root 52 type: "operators" 53 width: operatorRow.width * 0.1 54 height: operatorRow.height 55 } 56 } 57} 58