Index: sources/gui/qml/pages/treatment/sections/TreatmentTime.qml =================================================================== diff -u -r3676cd80ff97ac0785547e29e63f54b95b53f9f8 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision 3676cd80ff97ac0785547e29e63f54b95b53f9f8) +++ sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,22 +1,22 @@ /*! * - * 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 TreatmentTime.qml - * \date 2020/01/31 - * \author Behrouz NematiPour + * \author (last) Behrouz NematiPour + * \date (last) 15-May-2021 + * \author (original) Behrouz NematiPour + * \date (original) 31-Jan-2020 * */ // Qt import QtQuick 2.12 // Project -import VTreatmentTime 0.1; // Qml imports import "qrc:/globals" @@ -25,32 +25,35 @@ /*! * \brief Treatment Screen Treatment Time Remaining section */ -Rectangle { id: _treatmentTime +Rectangle { id: _root + objectName: "TreatmentTime" property int minimum : 0 property int maximum : vTreatmentTime.time_Total property int progressValue : vTreatmentTime.time_Elapsed property int timeTextValue : vTreatmentTime.time_Remaining + property bool isRunning : vHDTreatmentStates.txDialysis && + !( vHDTreatmentStates.sbWaitPump || vHDTreatmentStates.sbRunning ) + signal clicked() anchors.centerIn: parent width : _circle.width height: _circle.height color: "transparent" - VTreatmentTime { id: vTreatmentTime } - ProgressCircle { id: _circle - minimum: _treatmentTime.minimum - maximum: _treatmentTime.maximum + minimum: _root.minimum + maximum: _root.maximum anchors.centerIn : parent - value: _treatmentTime.progressValue + value: _root.progressValue } TimeText { id: _timeText anchors.centerIn : parent - seconds : _treatmentTime.timeTextValue + seconds : _root.timeTextValue + secondsVisible: _root.isRunning } Rectangle { id: _timeTitleRect @@ -65,24 +68,45 @@ text: qsTr("Time Remaining") font.pixelSize: 26 - color: "white" + color: Colors.textMain anchors.left: parent.left Image { id: _arrowImage - visible: true + visible: _root.isRunning anchors.left : parent.right anchors.bottom: parent.baseline anchors.leftMargin: 10 width : Variables.arrowWidth height: Variables.arrowHeight - source: "qrc:/images/iArrow" + source: "qrc:/images/iArrowRight" } } } + + NotificationBarSmall { id: _notification + visible : ! _root.isRunning + height : 25 + imageAutoSize: false + imageAnimated: true + color: "transparent" + anchors { + leftMargin : 80 + bottomMargin: 80 + } + + imageSource : "qrc:/images/iPauseGray" + text : qsTr("Treatment Paused") + textColor : "gray" + textfontSize: 16 + rowAnchors.centerIn: null + } + MouseArea { id: _mouseArea anchors.fill: parent onClicked: { - _treatmentTime.clicked() + if (_root.isRunning) { + _root.clicked() + } } } }