Warning, /education/gcompris/src/activities/binary_bulb/resource/tutorial5.qml is written in an unsupported language. File is not indexed.
0001 /* GCompris - tutorial5.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: ["128", "64", "32", "16", "8", "4", "2", "1"] 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: tableBlock2 0077 width: parent.width * 0.9 0078 height: parent.height * 0.1 0079 anchors.verticalCenter: tableBlock1.top 0080 anchors.left: parent.left 0081 anchors.leftMargin: parent.width * 0.05 + tableBlock1.width/20 0082 Repeater { 0083 model: 7 0084 Item { 0085 width: parent.width / 8 0086 height: parent.height 0087 anchors.verticalCenter: parent.verticalCenter 0088 Image { 0089 source: "multipleTwo.svg" 0090 fillMode: Image.PreserveAspectFit 0091 anchors.fill: parent 0092 sourceSize.width: implicitWidth 0093 } 0094 } 0095 } 0096 } 0097 0098 Row { 0099 id: bulbBlock 0100 width: parent.width * 0.9 0101 height: parent.height * 0.4 0102 anchors.top: tableBlock1.bottom 0103 anchors.left: parent.left 0104 anchors.leftMargin: parent.width * 0.05 0105 Repeater { 0106 model: ["off", "off", "off", "off", "off", "off", "off", "off"] 0107 Item { 0108 id: item128 0109 width: parent.width / 8 0110 height: parent.height 0111 anchors.verticalCenter: parent.verticalCenter 0112 Image { 0113 source: "bulb_" + modelData + ".svg" 0114 fillMode: Image.PreserveAspectFit 0115 anchors.fill: parent 0116 sourceSize.width: implicitWidth 0117 } 0118 } 0119 } 0120 } 0121 0122 Row { 0123 width: parent.width * 0.9 0124 height: parent.height * 0.2 0125 anchors.top: bulbBlock.bottom 0126 anchors.left: parent.left 0127 anchors.leftMargin: parent.width * 0.05 0128 Repeater { 0129 model: ["0", "0", "0", "0", "0", "0", "0", "0"] 0130 Item { 0131 id: item128 0132 width: parent.width / 8 0133 height: parent.height 0134 anchors.verticalCenter: parent.verticalCenter 0135 GCText { 0136 anchors { 0137 right: parent.right 0138 verticalCenter: parent.verticalCenter 0139 horizontalCenter: parent.horizontalCenter 0140 } 0141 text: modelData 0142 fontSizeMode: Text.Fit 0143 minimumPixelSize: 15 0144 color: "black" 0145 horizontalAlignment: Text.AlignHCenter 0146 width: 0.9 * parent.width 0147 height: 0.9 * parent.height 0148 wrapMode: Text.WordWrap 0149 z: 2 0150 } 0151 } 0152 } 0153 } 0154 }