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

0001 /* GCompris - Tux.qml
0002  *
0003  * SPDX-FileCopyrightText: 2014 Emmanuel Charruau <echarruau@gmail.com>
0004  *
0005  * Authors:
0006  *   Bruno Coudoin <bruno.coudoin@gcompris.net> (GTK+ version)
0007  *   Emmanuel Charruau <echarruau@gmail.com> (Qt Quick port)
0008  *
0009  *   SPDX-License-Identifier: GPL-3.0-or-later
0010  */
0011 
0012 import QtQuick 2.12
0013 import "reversecount.js" as Activity
0014 import GCompris 1.0
0015 
0016 Image {
0017     id: tux
0018 
0019     source: "qrc:/gcompris/src/activities/maze/resource/tux_top_south.svg"
0020     fillMode: Image.PreserveAspectFit
0021     z: 10
0022 
0023     property int duration: 1000
0024 
0025     signal init
0026 
0027     onInit: {
0028        tux.rotation = -90
0029         Activity.moveTuxToIceBlock()
0030     }
0031 
0032     Behavior on x {
0033         SmoothedAnimation {
0034             reversingMode: SmoothedAnimation.Immediate
0035             onRunningChanged: Activity.tuxRunningChanged()
0036             duration: tux.duration
0037         }
0038     }
0039     Behavior on y {
0040         SmoothedAnimation {
0041             reversingMode: SmoothedAnimation.Immediate
0042             onRunningChanged: Activity.tuxRunningChanged()
0043             duration: tux.duration
0044         }
0045     }
0046     Behavior on rotation {
0047         RotationAnimation {
0048             duration: tux.duration / 2
0049             direction: RotationAnimation.Shortest
0050         }
0051     }
0052 
0053 }