Warning, /education/gcompris/src/core/GCProgressBar.qml is written in an unsupported language. File is not indexed.

0001 /* GCompris - GCProgressBar.qml
0002  *
0003  * SPDX-FileCopyrightText: 2022 Johnny Jazeix <jazeix@gmail.com>
0004  *
0005  * Authors:
0006  *   Johnny Jazeix <jazeix@gmail.com>
0007  *
0008  *   SPDX-License-Identifier: GPL-3.0-or-later
0009  */
0010 import QtQuick 2.12
0011 import QtQuick.Controls 2.12
0012 import GCompris 1.0
0013 
0014 ProgressBar {
0015     id: progressbar
0016     height: progressbarText.height
0017     width: bar.width
0018 
0019     property bool displayText: true
0020     property string message
0021     property int borderSize: 0
0022 
0023     background: Rectangle {
0024         height: progressbar.height
0025         width: progressbar.width
0026         border.color: "lightblue"
0027         border.width: borderSize
0028     }
0029     contentItem: Item {
0030         implicitWidth: 200
0031         implicitHeight: 4
0032 
0033         Rectangle {
0034             width: progressbar.visualPosition * parent.width
0035             height: parent.height
0036             radius: 2
0037             color: "lightblue"
0038         }
0039         GCText {
0040             id: progressbarText
0041             anchors.centerIn: parent
0042             visible: displayText
0043             fontSize: mediumSize
0044             font.bold: true
0045             color: "black"
0046             text: progressbar.message
0047         }
0048     }
0049 }