Warning, /education/gcompris/src/activities/path_encoding/MoveButtons.qml is written in an unsupported language. File is not indexed.
0001 /* GCompris - MoveButtons.qml 0002 * 0003 * SPDX-FileCopyrightText: 2021 Harsh Kumar <hadron43@yahoo.com> 0004 * SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 import QtQuick 2.12 0008 import GCompris 1.0 0009 0010 import "../../core" 0011 import "path.js" as Activity 0012 0013 Item { 0014 id: moveButtons 0015 0016 property double spacing: size / 3 0017 property double size: Math.min(width / 5, height) 0018 0019 Flow { 0020 id: flow 0021 anchors { 0022 verticalCenter: parent.verticalCenter 0023 horizontalCenter: parent.horizontalCenter 0024 } 0025 spacing: moveButtons.spacing 0026 0027 BarButton { 0028 id: upButton 0029 source: "qrc:/gcompris/src/activities/path_encoding/resource/arrow.svg" 0030 rotation: -90 0031 sourceSize.width: size 0032 onClicked: Activity.moveTowards(Activity.Directions.UP) 0033 Rectangle { 0034 anchors.fill: parent 0035 radius: width * 0.5 0036 color: "#00FFFFFF" 0037 border.color: "#F2F2F2" 0038 border.width: 4 0039 } 0040 } 0041 0042 BarButton { 0043 id: downButton 0044 source: "qrc:/gcompris/src/activities/path_encoding/resource/arrow.svg" 0045 rotation: 90 0046 sourceSize.width: size 0047 onClicked: Activity.moveTowards(Activity.Directions.DOWN) 0048 Rectangle { 0049 anchors.fill: parent 0050 radius: width * 0.5 0051 color: "#00FFFFFF" 0052 border.color: "#F2F2F2" 0053 border.width: 4 0054 } 0055 } 0056 0057 BarButton { 0058 id: leftButton 0059 source: "qrc:/gcompris/src/activities/path_encoding/resource/arrow.svg" 0060 rotation: -180 0061 sourceSize.width: size 0062 onClicked: Activity.moveTowards(Activity.Directions.LEFT) 0063 Rectangle { 0064 anchors.fill: parent 0065 radius: width * 0.5 0066 color: "#00FFFFFF" 0067 border.color: "#F2F2F2" 0068 border.width: 4 0069 } 0070 } 0071 0072 BarButton { 0073 id: rightButton 0074 source: "qrc:/gcompris/src/activities/path_encoding/resource/arrow.svg" 0075 rotation: 0 0076 sourceSize.width: size 0077 onClicked: Activity.moveTowards(Activity.Directions.RIGHT) 0078 Rectangle { 0079 anchors.fill: parent 0080 radius: width * 0.5 0081 color: "#00FFFFFF" 0082 border.color: "#F2F2F2" 0083 border.width: 4 0084 } 0085 } 0086 } 0087 }