Index: sources/gui/qml/pages/treatment/TreatmentHome.qml =================================================================== diff -u -r23f8a6036e22f80c3c5fd2834a2980bb62d2a34d -r3454906bbb35aa2976572145068980bf691daf1c --- sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision 23f8a6036e22f80c3c5fd2834a2980bb62d2a34d) +++ sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision 3454906bbb35aa2976572145068980bf691daf1c) @@ -37,65 +37,13 @@ signal sectionFlowClicked() signal sectionVitalsClicked() signal sectionPressuresClicked() + signal sectionSalineClicked() signal sectionTimeClicked() signal sectionUltrafiltrationClicked() - signal logVitalTime() - readonly property int cellWidth : (_root.width / 7) - 10 // = screen width / # columns - readonly property int cellHeight: (_root.height / 2) - Variables.notificationHeight - (Variables.defaultMargin * 2) // = screen height / # rows - header bar - margin + readonly property int cellWidth : Variables.treatmentCellWidth + readonly property int cellHeight: Variables.treatmentCellHeight - onLogVitalTime: _treatmentVitals.updateVitalTime() - - AutoHideInfo { id: _lockDialog - objectName : "lockDialog" - - width: 600 - height: 400 - backgroundColor: "#091E31" - fontSize: 35 - verticalOffset: Variables.defaultMargin * 5 - - Rectangle { id: _mainCircle - objectName: "lockDialogMainCircle" - anchors { - top: parent.top - topMargin: Variables.defaultMargin * 2 - horizontalCenter: parent.horizontalCenter - } - height : 200 - width : height - radius : height - color : "transparent" - border.color: _treatmentFlows.editEnabled ? "#6697D2" : - "#A47E38" - border.width: 2 - - Image { id : _iconImage - objectName: "lockDialogIcon" - - anchors.centerIn : parent - height : 80 - width : 80 - fillMode: Image.PreserveAspectFit - source : _treatmentFlows.editEnabled ? "qrc:/images/iUnlock" : - "qrc:/images/iLock" - } - - Rectangle { id: _innerCircle - objectName: "lockDialogInnerCircle" - - anchors.centerIn: parent - color : "transparent" - border.color : _treatmentFlows.editEnabled ? "#8FC1FE" : - "#CDAF78" - border.width : 1 - height : parent.height - 20 - width : height - radius : height - } - } - } - Column { id: _column objectName: "column" @@ -104,7 +52,7 @@ anchors { fill: parent margins: Variables.defaultMargin - topMargin : Variables.notificationHeight + 30 + topMargin : 30 } Row { id: _topRow @@ -114,75 +62,56 @@ height: cellHeight TreatmentTime { id: _treatmentTime - objectName: "treatmentTime" - width: (cellWidth * 2) - (Variables.defaultMargin * 2) - height: cellHeight - onClicked: sectionTimeClicked() + objectName : "treatmentTime" + width : (cellWidth * 2) - (Variables.defaultMargin * 2) + height : cellHeight + onClicked : sectionTimeClicked() } TreatmentSaline { id: _treatmentSaline - objectName: "treatmentSaline" - - width: cellWidth + Variables.defaultMargin - height: cellHeight + objectName : "treatmentSaline" + width : cellWidth + Variables.defaultMargin + height : cellHeight + onEditClicked: sectionSalineClicked() } TreatmentVitals { id: _treatmentVitals - objectName: "treatmentVitals" - - width: cellWidth + Variables.defaultMargin - height: cellHeight - onEditClicked: sectionVitalsClicked() - - Text { id: _vitalCountdown - objectName: "vitalCountdown" - - color : "gray" - anchors { - top : parent.top - topMargin : Variables.defaultMargin * 4 - right : parent.right - } - horizontalAlignment : Text.AlignHCenter - verticalAlignment : Text.AlignVCenter - height : 15 - width : 100 - text : vTreatmentVitals.interval ? ( vTreatmentVitals.countdown ) : "" - font.pixelSize: 16 - } + objectName : "treatmentVitals" + width : cellWidth + Variables.defaultMargin + height : cellHeight + onEditClicked : sectionVitalsClicked() } - TreatmentPressures { id: _treatmentPressures - objectName: "treatmentPressures" - - width: (cellWidth * 3) - (Variables.defaultMargin * 2) // without auto layouts needs to fine tune - height: cellHeight - onEditClicked: sectionPressuresClicked() + TreatmentPressures { id: _treatmentPressures + objectName : "treatmentPressures" + width : (cellWidth * 3) - (Variables.defaultMargin * 2) // without auto layouts needs to fine tune + height : cellHeight + onEditClicked : sectionPressuresClicked() } } Row { id: _bottomRow - objectName: "bottomRow" + objectName : "bottomRow" + spacing : Variables.defaultMargin + height : cellHeight - spacing: Variables.defaultMargin - height: cellHeight + TreatmentUltrafiltration { id: _treatmentUltrafiltration; + objectName : "treatmentUltrafiltration" + width : cellWidth * 3 + height : cellHeight - TreatmentUltrafiltration { id: _treatmentUltrafiltration; - objectName: "treatmentUltrafiltration" - - width: cellWidth * 3 - height: cellHeight onEditClicked : sectionUltrafiltrationClicked() } TreatmentFlows { id: _treatmentFlows - objectName: "treatmentFlows" - - width: cellWidth * 4 - height: cellHeight - + objectName : "treatmentFlows" + width : cellWidth * 4 + height : cellHeight + header.setEditActive: ! isTreatmentEnd // LEAHI-PRS-376 + editEnabled : ! _lockDialog.isLocked onEditClicked : sectionFlowClicked() onLockClicked : { + _lockDialog.isLocked = editEnabled _lockDialog.showDialog ( editEnabled ? qsTr("Treatment Parameters Unlocked") : qsTr("Treatment Parameters Locked"), @@ -193,10 +122,74 @@ } } + NotificationBarSmall { id: _notification + objectName : "_notification" + anchors.bottom : parent.bottom + height : 60 + visible : ! _alarmBar.visible && text + + CloseButton { id: _dismissButton + objectName: "_dismissButton" + anchors { + top: parent.top + bottom: parent.bottom + right: parent.right + margins: 20 + } + width: height + visible: true + onClicked: { _notification.text = "" } + } + } + + Connections { target: vTreatmentAdjustmentBloodFlowRate + function onAdjustmentTriggered ( vValue ) { + if (vTreatmentAdjustmentBloodFlowRate.adjustment_Accepted) { + _notification.text = "" + } + else { + _notification.text = vTreatmentAdjustmentBloodFlowRate.text() + } + } + } + + Connections { target: vTreatmentAdjustmentDialysateFlowRate + function onAdjustmentTriggered ( vValue ) { + if (vTreatmentAdjustmentDialysateFlowRate.adjustment_Accepted) { + _notification.text = "" + } + else { + _notification.text = vTreatmentAdjustmentDialysateFlowRate.text() + } + } + } + + Connections { target: vTreatmentAdjustmentDialysateTemperature + function onAdjustmentTriggered ( vValue ) { + if (vTreatmentAdjustmentDialysateTemperature.adjustment_Accepted) { + _notification.text = "" + } + else { + _notification.text = vTreatmentAdjustmentDialysateTemperature.text() + } + } + } + + Connections { target: vTreatmentAdjustmentPressuresWidening + function onAdjustmentTriggered ( vValue ) { + if (vTreatmentAdjustmentPressuresWidening.adjustment_Accepted) { + _notification.text = "" + } + else { + _notification.text = vTreatmentAdjustmentPressuresWidening.text() + } + } + } + onVisibleChanged: { if (visible) { _mainMenu.hidden = true - _treatmentMenu.hidden = false + _headerBar.menuHidden = false } } }