Index: sources/gui/qml/components/ProgressBar.qml =================================================================== diff -u -r9391d4058233e096350d9dc3ced79aed8ed93b38 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/gui/qml/components/ProgressBar.qml (.../ProgressBar.qml) (revision 9391d4058233e096350d9dc3ced79aed8ed93b38) +++ sources/gui/qml/components/ProgressBar.qml (.../ProgressBar.qml) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,20 +1,20 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. - * \copyright \n - * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, \n - * IN PART OR IN WHOLE, \n - * WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. \n + * Copyright (c) 2020-2024 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file ProgressBar.qml - * \date 2020/01/22 - * \author Behrouz NematiPour + * \author (last) Behrouz NematiPour + * \date (last) 11-Oct-2022 + * \author (original) Behrouz NematiPour + * \date (original) 23-Jan-2020 * */ // Qt import QtQuick 2.12 -import QtQuick.Controls 2.12 // Project // Qml imports @@ -24,14 +24,23 @@ * \brief Denali project ProgressBar */ RangeRect { id: _root - property alias value : _progressRect.value - property alias valueEx : _progressRectEx.value - property alias color : _progressRect.color - property alias bgColor : _root.color + property alias progress : _progressRect + property int progressWidth : _progressRect.width + property alias value : _progressRect.value - property alias marker : _marker + property alias color : _progressRect.color + property alias bgColor : _root.color + property alias marker : _marker + property alias markerHeight : _marker.height + + property alias decimal : _root.decimal + property alias minimum : _root.minimum + property alias maximum : _root.maximum + + signal progressClicked() + height : Variables.progressbarHeight minimum : 0 @@ -40,35 +49,31 @@ minText.visible : true maxText.visible : true + // Since this Component is the base Component of the ProgressBarEx + // we need to use the z order + // to order the parent object (ProgressBar) Components + // in the child(ProgressBarEx) + ProgressRect { id: _progressRect + z : 1 // Main ProgressBar Rect, z order in the gui + decimal : _root.decimal + minimum : _root.minimum + maximum : _root.maximum + value : _root.value - ProgressRect { id: _progressRectEx - visible : value - - minimum : _root.minimum - maximum : _root.maximum - value : _root.valueEx - - color : Colors.highlightMedProgressBar - maxText.visible: visible - margin : 0 + color : Colors.highlightProgressBar + onClicked : progressClicked() } - ProgressRect { id: _progressRect - minimum : _root.minimum - maximum : _root.maximum - value : _root.value + RangeMarker { id: _marker + z : 2 // ProgressBar marker should be on top of the all ProgressBars z order in the gui + anchors { + left : _progressRect.right + } - color : Colors.highlightProgressBar + height : Variables.rangeMarkerHeight + hasHandle : true - RangeMarker { id: _marker - anchors { - left : parent.right - } - - height : Variables.rangeMarkerHeight - hasHandle : true - - value : _root.value - } + decimal : _root.decimal + value : _root.value } }