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

0001 /* GCompris - Loco.qml
0002  *
0003  * SPDX-FileCopyrightText: 2017 Utkarsh Tiwari <iamutkarshtiwari@kde.org>
0004  * SPDX-FileCopyrightText: 2018 Amit Sagtani <asagtani06@gmail.com>
0005  *
0006  * Authors:
0007  *   <Pascal Georges> (GTK+ version)
0008  *   Utkarsh Tiwari <iamutkarshtiwari@kde.org> (Qt Quick port)
0009  *   Amit Sagtani <asagtani06@gmail.com> (Qt Quick port)
0010  *
0011  *   SPDX-License-Identifier: GPL-3.0-or-later
0012  */
0013 import QtQuick 2.12
0014 import GCompris 1.0
0015 
0016 Item {
0017     id: draggedItem
0018     property string imageURL
0019     Image {
0020         id: img
0021         source: imageURL
0022         height: background.height / 8.0
0023         width: ((background.width >= background.height) ? background.width : background.height) / 5.66
0024         Drag.hotSpot.x: width / 2
0025         Drag.hotSpot.y: height / 2
0026     }
0027     function destroy() {
0028         // Destroy this copy object on drop
0029         draggedItem.destroy();
0030     }
0031 }
0032 
0033