Warning, /education/gcompris/src/activities/balancebox/Wall.qml is written in an unsupported language. File is not indexed.
0001 /* GCompris - Wall.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 0011 import QtQuick 2.12 0012 import GCompris 1.0 0013 import Box2D 2.0 0014 import QtGraphicalEffects 1.0 0015 import "balancebox.js" as Activity 0016 0017 Item { 0018 id: item 0019 0020 transformOrigin: Item.TopLeft 0021 property alias body: itemBody 0022 property alias world: itemBody.world 0023 property alias categories: itemFixture.categories 0024 property alias shadow: itemShadow.visible 0025 //property bool shadow: false //itemShadow.visible 0026 property alias shadowHorizontalOffset: itemShadow.horizontalOffset 0027 property alias shadowVerticalOffset: itemShadow.verticalOffset 0028 0029 Body { 0030 id: itemBody 0031 target: item 0032 world: physicsWorld 0033 active: item.visible 0034 0035 fixtures: Box { 0036 id: itemFixture 0037 width: item.width 0038 height: item.height 0039 friction: 0.0 0040 density: 1 0041 restitution: Activity.restitution 0042 categories: Box.Category2 0043 collidesWith: Box.Category1 0044 } 0045 } 0046 0047 Rectangle { 0048 id: itemRectangle 0049 anchors.fill: parent 0050 width: parent.width 0051 height: parent.height 0052 radius: height / 2 0053 color: "#B38B56" 0054 z: 2 0055 } 0056 0057 DropShadow { 0058 id: itemShadow 0059 anchors.fill: itemRectangle 0060 cached: true 0061 visible: false // note: dropping shadows for the walls is really expensive 0062 // in terms of CPU usage! 0063 radius: 0 0064 samples: 16 0065 color: "#80000000" 0066 source: itemRectangle 0067 z: 1 0068 } 0069 0070 }