Warning, /education/gcompris/src/activities/binary_bulb/resource/tutorial4.qml is written in an unsupported language. File is not indexed.

0001 /* GCompris - tutorial4.qml
0002  *
0003  * SPDX-FileCopyrightText: 2018 Timothée Giet <animtim@gcompris.net>
0004  *
0005  * Authors:
0006  *   Timothée Giet <animtim@gcompris.net>
0007  *
0008  *   SPDX-License-Identifier: GPL-3.0-or-later
0009  */
0010 import QtQuick 2.12
0011 import GCompris 1.0 
0012 
0013 import "../../../core"
0014 
0015 Rectangle {
0016     anchors.fill: parent
0017     color: "#80FFFFFF"
0018 
0019     Item {
0020         id: topBlock
0021         width: parent.width
0022         height: parent.height * 0.2
0023 
0024         GCText {
0025             anchors {
0026                 right: parent.right
0027                 verticalCenter: parent.verticalCenter
0028             }
0029             text: qsTr("0 to 255 with")
0030             fontSizeMode: Text.Fit
0031             minimumPixelSize: 15
0032             color: "black"
0033             horizontalAlignment: Text.AlignHCenter
0034             width: 0.9 * parent.width
0035             height: 0.9 * parent.height
0036             wrapMode: Text.WordWrap
0037             z: 2
0038         }
0039     }
0040 
0041     Row {
0042         id: tableBlock1
0043         width: parent.width * 0.9
0044         height: parent.height * 0.2
0045         anchors.top: topBlock.bottom
0046         anchors.left: parent.left
0047         anchors.leftMargin: parent.width * 0.05
0048         Repeater {
0049             model: ["", "", "", "", "", "", "", ""]
0050             Item {
0051                 id: item128
0052                 width: parent.width / 8
0053                 height: parent.height
0054                 anchors.verticalCenter: parent.verticalCenter
0055                 GCText {
0056                     anchors {
0057                         right: parent.right
0058                         verticalCenter: parent.verticalCenter
0059                         horizontalCenter: parent.horizontalCenter
0060                     }
0061                     text: modelData
0062                     fontSizeMode: Text.Fit
0063                     minimumPixelSize: 15
0064                     color: "black"
0065                     horizontalAlignment: Text.AlignHCenter
0066                     width: 0.9 * parent.width
0067                     height: 0.9 * parent.height
0068                     wrapMode: Text.WordWrap
0069                     z: 2
0070                 }
0071             }
0072         }
0073     }
0074 
0075     Row {
0076         id: bulbBlock
0077         width: parent.width * 0.9
0078         height: parent.height * 0.4
0079         anchors.top: tableBlock1.bottom
0080         anchors.left: parent.left
0081         anchors.leftMargin: parent.width * 0.05
0082         Repeater {
0083             model: ["off", "off", "off", "off", "off", "off", "off", "off"]
0084             Item {
0085                 id: item128
0086                 width: parent.width / 8
0087                 height: parent.height
0088                 anchors.verticalCenter: parent.verticalCenter
0089                 Image {
0090                     source: "bulb_" + modelData + ".svg"
0091                     fillMode: Image.PreserveAspectFit
0092                     anchors.fill: parent
0093                     sourceSize.width: implicitWidth
0094                 }
0095             }
0096         }
0097     }
0098 
0099     Row {
0100         width: parent.width * 0.9
0101         height: parent.height * 0.2
0102         anchors.top: bulbBlock.bottom
0103         anchors.left: parent.left
0104         anchors.leftMargin: parent.width * 0.05
0105         Repeater {
0106             model: ["0", "0", "0", "0", "0", "0", "0", "0"]
0107             Item {
0108                 id: item128
0109                 width: parent.width / 8
0110                 height: parent.height
0111                 anchors.verticalCenter: parent.verticalCenter
0112                 GCText {
0113                     anchors {
0114                         right: parent.right
0115                         verticalCenter: parent.verticalCenter
0116                         horizontalCenter: parent.horizontalCenter
0117                     }
0118                     text: modelData
0119                     fontSizeMode: Text.Fit
0120                     minimumPixelSize: 15
0121                     color: "black"
0122                     horizontalAlignment: Text.AlignHCenter
0123                     width: 0.9 * parent.width
0124                     height: 0.9 * parent.height
0125                     wrapMode: Text.WordWrap
0126                     z: 2
0127                 }
0128             }
0129         }
0130     }
0131 }