Index: sources/gui/qml/pages/treatment/sections/TreatmentTime.qml =================================================================== diff -u -r43ae56f762e6f3e1416d39e3d16f9103fc597e41 -r7b71ec23c53c04a24e3db8ace0ca4825ec57d721 --- sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision 43ae56f762e6f3e1416d39e3d16f9103fc597e41) +++ sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision 7b71ec23c53c04a24e3db8ace0ca4825ec57d721) @@ -21,12 +21,12 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/pages/treatment" /*! * \brief Treatment Screen Treatment Time Remaining section */ Rectangle { id: _root - objectName: "TreatmentTime" property int minimum : 0 property int maximum : vTreatmentTime.time_Total property int progressValue : vTreatmentTime.time_Elapsed @@ -35,79 +35,124 @@ property bool isRunning : vTDTreatmentStates.txDialysis && !( vTDTreatmentStates.sbWaitPump || vTDTreatmentStates.sbRunning ) - signal clicked() + property bool isComplete : ( vTreatmentTime.time_Remaining <= 0 && vTreatmentTime.time_Elapsed > 0 ) || vTDTreatmentStates.txEnd - anchors.centerIn: parent - width : _circle.width - height: _circle.height - color: "transparent" + property bool isHDTreatment : vTreatmentCreate.treatmentModality === 0 + property bool isHDFTreatment: vTreatmentCreate.treatmentModality === 1 + property bool isIsoTreatment: vTreatmentCreate.treatmentModality === 2 + property string notificationText: isComplete ? qsTr("Treatment Complete") : + ! isRunning ? qsTr("Treatment Paused") : + isHDTreatment ? qsTr("HD Time") : + isHDFTreatment ? qsTr("HDF Time") : + isIsoTreatment ? qsTr("Isolated UF Time") : + "" + + property color notificationColor: isComplete ? Colors.statusComplete : + ! isRunning ? Colors.statusTextPaused : + isHDTreatment || + isHDFTreatment || + isIsoTreatment ? Colors.statusTextActive : + "" + + property bool editEnabled : ! isTreatmentEnd // LEAHI-PRS-376 + + color : "transparent" + width : _circle.width + height : _circle.height + + signal clicked() + ProgressCircle { id: _circle - minimum: _root.minimum - maximum: _root.maximum + objectName : "circle" + minimum : _root.minimum + maximum : _root.maximum - anchors.centerIn : parent - value: _root.progressValue + anchors.fill : parent + value : _root.progressValue + thickness : 35 + circleShadowColor : Colors.mainTreatmentLighterBlue + circleFillColor : Colors.transparent + runAnimation : ! _root.isRunning + + MouseArea { id: _mouseArea + anchors.fill : parent + onClicked : if ( _root.editEnabled ) { _root.clicked() } + } } TimeText { id: _timeText - anchors.centerIn : parent - seconds : _root.timeTextValue - secondsVisible: _root.isRunning + objectName: "timeText" + + anchors { + centerIn : parent + horizontalCenterOffset : -Variables.defaultMargin + } + seconds : _root.timeTextValue + textWeight : Font.Normal + secsPixelSize : 35 + secondsLeftMargin : 10 + textColor : _root.isRunning || _root.isComplete ? Colors.offWhite : Colors.mainTreatmentOrange } - Rectangle { id: _timeTitleRect - color: "Transparent" - anchors.horizontalCenter: _timeText.horizontalCenter - anchors.bottom: _timeText.top + Item { id: _timeTitleRect + objectName: "timeTextRect" - width : _timeTitle.width + _arrowImage.width + _arrowImage.anchors.leftMargin - height : _timeTitle.height + anchors { + horizontalCenter: _root.horizontalCenter + bottom : _timeText.top + bottomMargin : Variables.defaultMargin * 2 + } + width : _root.width + Text { id: _timeTitle - text: qsTr("Time Remaining") + objectName : "timeTitle" + text : qsTr("Time Remaining") - font.pixelSize: 26 - color: Colors.textMain + anchors { + horizontalCenter: parent.horizontalCenter + } - anchors.left: parent.left - Image { id: _arrowImage - visible: _root.isRunning - anchors.left : parent.right - anchors.bottom: parent.baseline - anchors.leftMargin: 10 - width : Variables.arrowWidth - height: Variables.arrowHeight - source: "qrc:/images/iArrowRight" + font.pixelSize : 26 + font.weight : Font.Normal + color : Colors.textMain + } + + IconButton { id : _editTimeIcon + objectName: "editTimeIcon" + anchors { + bottom: _timeTitle.top + bottomMargin: Variables.defaultMargin + horizontalCenter: parent.horizontalCenter } + enabled : _root.editEnabled + iconSize : 30 + iconImageSource : enabled ? "qrc:/images/iEdit" : "qrc:/images/iEditDisabled" + onClicked : _root.clicked() } } NotificationBarSmall { id: _notification - visible : ! _root.isRunning - height : 25 - imageAutoSize: false - imageAnimated: true - color: "transparent" + objectName: "notification" + anchors { - leftMargin : 80 - bottomMargin: 80 + left : _timeTitleRect.left + leftMargin : Variables.defaultMargin + top : _timeTitleRect.bottom + topMargin : Variables.defaultMargin * 2 } - imageSource : "qrc:/images/iPauseGray" - text : qsTr("Treatment Paused") - textColor : "gray" - textfontSize: 16 - rowAnchors.centerIn: null + height : 25 + color : "transparent" + imageDiameter : 25 + imageTopMargin : 4 + imageSource : "qrc:/images/iPauseOrange" + imageVisible : ! _root.isRunning && ! _root.isComplete + text : _root.notificationText + textColor : _root.notificationColor + textfontSize : 26 + textfontWeight : Font.Medium } - - MouseArea { id: _mouseArea - anchors.fill: parent - onClicked: { - if (_root.isRunning) { - _root.clicked() - } - } - } }