Warning, /education/gcompris/src/activities/share/BasketWidget.qml is written in an unsupported language. File is not indexed.

0001 /* GCompris - BasketWidget.qml
0002  *
0003  * SPDX-FileCopyrightText: 2016 Stefan Toncu <stefan.toncu29@gmail.com>
0004  *
0005  *   SPDX-License-Identifier: GPL-3.0-or-later
0006  */
0007 
0008 import QtQuick 2.12
0009 import GCompris 1.0
0010 
0011 import "../../core"
0012 
0013 WidgetOption {
0014     id: widget
0015 
0016     src: "resource/images/basket.svg"
0017     name: "basket"
0018     availableItems: ""
0019 
0020     releaseElement: function() {
0021         var newCoordinate = widget.mapToItem(background, element.x, element.y)
0022         if (background.contains(newCoordinate.x, newCoordinate.y, grid)) {
0023             if (widget.canDrag) {
0024                 widget.canDrag = false
0025                 widget.element.opacity = 0.6
0026                 listModel.append({countS: 0, nameS: "basket"});
0027             }
0028         }
0029     }
0030 
0031     element {
0032         opacity: 0
0033     }
0034 }