Warning, /education/gcompris/src/activities/penalty/Progress.qml is written in an unsupported language. File is not indexed.
0001 /* GCompris - Progress.qml 0002 * 0003 * SPDX-FileCopyrightText: 2017 Rohit Das <rohit.das950@gmail.com> 0004 * 0005 * SPDX-License-Identifier: GPL-3.0-or-later 0006 */ 0007 import QtQuick 2.12 0008 0009 Rectangle { 0010 id: progress 0011 property int ratio: 0 0012 property ParallelAnimation anim: animation 0013 opacity: items.progressBarOpacity 0014 anchors.top: parent.top 0015 anchors.topMargin: parent.height / parent.implicitHeight * 100 0016 width: ratio / 100 * parent.width / parent.implicitWidth * 200 0017 height: parent.height / parent.implicitHeight * 20 0018 ParallelAnimation { 0019 id: animation 0020 onRunningChanged: { 0021 if (!animation.running) { 0022 timerBonus.start() 0023 } 0024 } 0025 PropertyAnimation { 0026 target: progress 0027 property: "ratio" 0028 from: 0 0029 to: 100 0030 duration: items.duration 0031 } 0032 PropertyAnimation { 0033 target: progress 0034 property: "color" 0035 from: "#00FF00" 0036 to: "#FF0000" 0037 duration: items.duration 0038 } 0039 } 0040 }