Warning, /education/gcompris/src/activities/learn_decimals/resource/TutorialBar.qml is written in an unsupported language. File is not indexed.
0001 /* GCompris - TutorialBar.qml 0002 * 0003 * SPDX-FileCopyrightText: 2021 Mariam Fahmy <mariamfahmy66@gmail.com> 0004 * 0005 * Authors: 0006 * Mariam Fahmy <mariamfahmy66@gmail.com> 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 import "../" 0015 0016 Item { 0017 id: tutorialBar 0018 width: background.horizontalLayout ? tutorialBar.cellSize * 10 : tutorialBar.cellSize 0019 height: background.horizontalLayout ? tutorialBar.cellSize : tutorialBar.cellSize * 10 0020 property int cellSize: 10 0021 0022 property alias model: rowRepeater.model 0023 0024 Grid { 0025 id: singleBarTuto 0026 anchors.fill: parent 0027 0028 states: [ 0029 State { 0030 when: background.horizontalLayout 0031 PropertyChanges { 0032 target: singleBarTuto 0033 rows: 1 0034 columns: 0 0035 } 0036 }, 0037 State { 0038 when: !background.horizontalLayout 0039 PropertyChanges { 0040 target: singleBarTuto 0041 rows: 0 0042 columns: 1 0043 } 0044 } 0045 ] 0046 0047 Repeater { 0048 id: rowRepeater 0049 0050 Image { 0051 source: activity.isQuantityMode ? "qrc:/gcompris/src/core/resource/empty.svg" : 0052 "qrc:/gcompris/src/activities/learn_decimals/resource/rectDark.svg" 0053 width: tutorialBar.cellSize 0054 height: width 0055 sourceSize.width: width 0056 visible: modelData != "none" 0057 0058 Image { 0059 id: whiteSquare 0060 source: activity.isQuantityMode ? "qrc:/gcompris/src/activities/babyshapes/resource/food/orange.svg" : 0061 "qrc:/gcompris/src/activities/learn_decimals/resource/rectWhite.svg" 0062 width: parent.width - 4 0063 height: width 0064 sourceSize.width: width 0065 anchors.centerIn: parent 0066 opacity: activity.isQuantityMode ? 0.2 : 1 0067 } 0068 Image { 0069 source: "qrc:/gcompris/src/activities/learn_decimals/resource/cross.svg" 0070 width: whiteSquare.width 0071 height: width 0072 sourceSize.width: width 0073 anchors.centerIn: parent 0074 visible: modelData === "deleted" 0075 } 0076 Image { 0077 source: activity.isQuantityMode ? "qrc:/gcompris/src/activities/babyshapes/resource/food/orange.svg" : 0078 "qrc:/gcompris/src/activities/learn_decimals/resource/rectFill.svg" 0079 width: whiteSquare.width 0080 height: width 0081 sourceSize.width: width 0082 anchors.centerIn: parent 0083 visible: modelData === "fill" 0084 } 0085 } 0086 } 0087 } 0088 }