Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml =================================================================== diff -u -r86274f18e9356126c41d848bc78bfba318638aee -r7db80dd579054dd4754ae4d135a4a3e647f09b5f --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml (.../TreatmentAdjustmentUltrafiltrationStart.qml) (revision 86274f18e9356126c41d848bc78bfba318638aee) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml (.../TreatmentAdjustmentUltrafiltrationStart.qml) (revision 7db80dd579054dd4754ae4d135a4a3e647f09b5f) @@ -30,75 +30,156 @@ contentItem.objectName: "TreatmentAdjustmentUltrafiltrationStart" //SquishQt testability QtObject { id: _private - property real minimum: vTreatmentUltrafiltration.minimum - property real maximum: vTreatmentUltrafiltration.maximum - property real value : vTreatmentUltrafiltration.volumeRemoved + property real minimum : vTreatmentUltrafiltration.minimum + property real maximum : vTreatmentUltrafiltration.maximum + property real setVolume : vTreatmentUltrafiltration.setVolume + property real volumeRemoved : vTreatmentUltrafiltration.volumeRemoved } + signal editClicked() + signal isolatedUfClicked() signal pauseClicked() + signal resumeClicked() confirmVisible: false information { visible : true && information.text && ! notification.visible imageSource : ufInfoImageSource text : ufInfoText + radius : 0 + color : Colors.ufNotificationBarBg + textColor : Colors.ufVolumeGoalText + textfontSize : Fonts.fontPixelUltrafiltrationAdjustmentNotification + textfontWeight : Font.Normal } - titleText : qsTr("ULTRAFILTRATION VOLUME") + " " + Variables.unitTextUltrafiltrationVolume + titleText : qsTr("Ultrafiltration Volume ") + Variables.unitTextUltrafiltrationVolume - ProgressBarEx { id: _progressbarex - width : Variables.ultrafiltrationProgressbarWidth - height : Variables.ultraFiltrationProgressBarHeight + TreatmentAdjustmentUltrafiltrationMetrics { id: _ufMetrics anchors { - top: parent.top - topMargin: 250 + top : parent.top + topMargin : Variables.defaultMargin * 2 horizontalCenter: parent.horizontalCenter } + setVolume : _private.setVolume + volumeRemoved : _private.volumeRemoved + } + + ProgressBarEx { id: _progressbarex + anchors { + top : _ufMetrics.bottom + topMargin : 160 + left : parent.left + leftMargin : 60 + right : parent.right + rightMargin : anchors.leftMargin + } + height : Variables.ultraFiltrationProgressBarHeight decimal : Variables.ultrafiltrationPrecision minimum : _private.minimum - maximum : _private.maximum - value : _private.value + maximum : _private.setVolume + value : _private.volumeRemoved valueEx : 0 + progressEx.color: Colors.ufProgressBarFill + minText { + font { + pixelSize : Fonts.fontPixelButton + weight : Font.Normal + } + text : minimum.toFixed(Variables.ultrafiltrationPrecision) + " " + Variables.unitVolume + } + maxText { + font { + pixelSize : minText.font.pixelSize + weight : minText.font.weight + } + text : _private.setVolume.toFixed(Variables.ultrafiltrationPrecision) + " " + Variables.unitVolume + } } TouchRect { id: _pauseButton - onClicked: _root.pauseClicked() - - width: 530 - height: 95 anchors { - top: parent.top - topMargin: 400 + top : _progressbarex.bottom + topMargin : 110 horizontalCenter: parent.horizontalCenter } - isDefault: true - Image { id: _image + width : 360 + height : Variables.ultrafiltrationButtonHeight + text { + text : qsTr("Pause Ultrafiltration") + font.weight : Font.DemiBold anchors { - left : _pauseButton.left - leftMargin : 65 - verticalCenter: _pauseButton.verticalCenter + centerIn : null // disable the parent anchor + verticalCenter : _pauseButton.verticalCenter + left : _image.right + leftMargin : Variables.defaultMargin } + } + isDefault : true + visible : isUFPaused === false - width : Variables.pauseIconDiameter - height: Variables.pauseIconDiameter + onClicked : _root.pauseClicked() + + Image { id: _image + anchors { + top : parent.top + topMargin : 10 + bottom : parent.bottom + bottomMargin : anchors.topMargin + left : parent.left + leftMargin : (parent.width - (_image.width + _pauseButton.text.anchors.leftMargin + _pauseButton.text.contentWidth)) / 2 + } + width : height source: "qrc:/images/iPauseDarkBlue" } + } - text { - text: qsTr("PAUSE ULTRAFILTRATION") - font.weight: Font.DemiBold - font.pixelSize: 26 //Fonts.fontPixelBack - anchors { - centerIn: null // disable the parent anchor - verticalCenter: _pauseButton.verticalCenter - left: _image.right - leftMargin: 15 + Row { id: _pausedButtonArea + anchors { + top : _progressbarex.bottom + topMargin : _pauseButton.anchors.topMargin + horizontalCenter : parent.horizontalCenter + } + spacing : Variables.defaultMargin + visible : ! _pauseButton.visible + + TouchRect { id: _resumeButton + width : Variables.ultrafiltrationButtonWidth + height : Variables.ultrafiltrationButtonHeight + text { + text : qsTr("Resume Ultrafiltration") + font.weight : Font.DemiBold } + isDefault : true + onClicked : _root.resumeClicked() } + + TouchRect { id: _editButton + width : Variables.ultrafiltrationButtonWidth + height : Variables.ultrafiltrationButtonHeight + text { + text : qsTr("Edit UF") + font.weight : Font.DemiBold + } + isDefault : true + onClicked : _root.editClicked() + } + + TouchRect { id: _isolatedUfButton + width : Variables.ultrafiltrationButtonWidth + height : Variables.ultrafiltrationButtonHeight + text { + text : qsTr("Isolated UF") + font.weight : Font.DemiBold + } + isDefault : true + onClicked : _root.isolatedUfClicked() + } } + Text { id: _informationText - text: qsTr("Note: Ultrafiltration needs to be paused to edit the volume.") + text: qsTr("Note: Ultrafiltration must be paused to edit the volume.") color: "#a3b7c9" font { pixelSize: 25 @@ -109,5 +190,6 @@ topMargin: 35 horizontalCenter: parent.horizontalCenter } + visible: _pauseButton.visible } }