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

0001 /* GCompris - wind.qml
0002  *
0003  * SPDX-FileCopyrightText: 2015 Bruno Coudoin <bruno.coudoin@gcompris.net>
0004  *
0005  * Authors:
0006  *   Bruno Coudoin <bruno.coudoin@gcompris.net> (GTK+ version)
0007  *
0008  *   SPDX-License-Identifier: GPL-3.0-or-later
0009  */
0010 import QtQuick 2.12
0011 import GCompris 1.0
0012 import "../../core"
0013 
0014 Image {
0015     id: windTurbine
0016     source: activity.url + "wind/mast.svg"
0017     sourceSize.width: width
0018     fillMode: Image.PreserveAspectFit
0019     property int duration
0020 
0021     Image {
0022         id: blade
0023         source: activity.url + "wind/blade.svg"
0024         width: parent.width
0025         sourceSize.width: width
0026         fillMode: Image.PreserveAspectFit
0027         anchors {
0028             horizontalCenter: parent.horizontalCenter
0029             verticalCenter: parent.verticalCenter
0030             verticalCenterOffset: parent.height * -0.08
0031         }
0032 
0033         SequentialAnimation on rotation {
0034             id: anim
0035             loops: Animation.Infinite
0036             running: cloud.started
0037             NumberAnimation {
0038                 from: 0; to: 360
0039                 duration: windTurbine.duration
0040             }
0041         }
0042     }
0043 }