Warning, /education/gcompris/src/activities/balancebox/Goal.qml is written in an unsupported language. File is not indexed.
0001 /* GCompris - Goal.qml 0002 * 0003 * SPDX-FileCopyrightText: 2014-2015 Holger Kaelberer <holger.k@elberer.de> 0004 * 0005 * Authors: 0006 * Holger Kaelberer <holger.k@elberer.de> 0007 * 0008 * SPDX-License-Identifier: GPL-3.0-or-later 0009 */ 0010 import QtQuick 2.12 0011 import Box2D 2.0 0012 0013 import "../../core" 0014 import "balancebox.js" as Activity 0015 0016 Item { 0017 id: goal 0018 property alias world: itemBody.world 0019 property alias imageSource: goalImage.source 0020 property alias body: itemBody 0021 property alias bodyType: itemBody.bodyType 0022 property alias linearDamping: itemBody.linearDamping 0023 property alias fixtures: itemBody.fixtures 0024 property alias sensor: itemFixture.sensor 0025 property alias categories: itemFixture.categories 0026 property alias collidesWith: itemFixture.collidesWith 0027 property alias density: itemFixture.density 0028 property alias friction: itemFixture.friction 0029 property alias restitution: itemFixture.restitution 0030 0031 signal beginContact(Item item, Item other) 0032 signal endContact(Item item, Item other) 0033 0034 Image { 0035 id: goalImage 0036 0037 width: goal.width * 1.1 0038 height: goal.height * 1.1 0039 sourceSize.height: height 0040 sourceSize.width: width 0041 source: Activity.baseUrl + "/door_closed.svg" 0042 anchors.centerIn: parent 0043 } 0044 0045 Body { 0046 id: itemBody 0047 0048 target: goal 0049 bodyType: Body.Static 0050 world: physicsWorld 0051 sleepingAllowed: false 0052 fixedRotation: true 0053 linearDamping: 0 0054 0055 fixtures: Box { 0056 id: itemFixture 0057 0058 categories: Circle.Category4 0059 width: goal.width 0060 height: goal.height 0061 density: 0 0062 friction: 0 0063 restitution: 0 0064 sensor: true 0065 } 0066 } 0067 }