Warning, /education/gcompris/src/activities/guesscount/DragTile.qml is written in an unsupported language. File is not indexed.
0001 /* GCompris - DragTile.qml 0002 * 0003 * SPDX-FileCopyrightText: 2016 RAHUL YADAV <rahulyadav170923@gmail.com> 0004 * 0005 * Authors: 0006 * Pascal Georges <pascal.georges1@free.fr> (GTK+ version) 0007 * RAHUL YADAV <rahulyadav170923@gmail.com> (Qt Quick port) 0008 * 0009 * SPDX-License-Identifier: GPL-3.0-or-later 0010 */ 0011 import QtQuick 2.12 0012 0013 import "../../core" 0014 0015 Item { 0016 id: root 0017 property string type 0018 property int length: root.children.length 0019 function createDynamicObject() { 0020 var component = Qt.createComponent('Tile.qml') 0021 component.createObject(root) 0022 } 0023 Loader { 0024 active: type == "operands" ? true : false 0025 sourceComponent: Tile { 0026 id: tile 0027 } 0028 } 0029 Component.onCompleted: { 0030 if(type == "operators") 0031 createDynamicObject() 0032 } 0033 onChildrenChanged: { 0034 if(type == "operators") { 0035 if(root.children.length-1 == 0) 0036 createDynamicObject() 0037 } 0038 } 0039 }