Warning, /education/gcompris/src/activities/canal_lock/Lock.qml is written in an unsupported language. File is not indexed.
0001 /* GCompris - Lock.qml 0002 * 0003 * SPDX-FileCopyrightText: 2014 Bruno Coudoin <bruno.coudoin@gcompris.net> 0004 * 0005 * Authors: 0006 * Bruno Coudoin <bruno.coudoin@gcompris.net> (GTK+ version) 0007 * Bruno Coudoin <bruno.coudoin@gcompris.net> (Qt Quick port) 0008 * 0009 * SPDX-License-Identifier: GPL-3.0-or-later 0010 */ 0011 import QtQuick 2.12 0012 import GCompris 1.0 0013 0014 import "../../core" 0015 0016 Rectangle { 0017 id: lock 0018 anchors.bottom: parent.bottom 0019 anchors.horizontalCenter: parent.horizontalCenter 0020 width: parent.paintedWidth * 0.05 0021 height: maxHeight 0022 border.width: 0 0023 state: "close" 0024 0025 property int minHeight 0026 property int maxHeight 0027 property int duration 0028 property bool opened: height == minHeight 0029 0030 Behavior on height { NumberAnimation { duration: lock.duration } } 0031 0032 states: [ 0033 State { 0034 name: "open" 0035 PropertyChanges { target: lock; height: lock.minHeight} 0036 }, 0037 State { 0038 name: "close" 0039 PropertyChanges { target: lock; height: lock.maxHeight} 0040 } 0041 ] 0042 }