Index: leahi.qrc
===================================================================
diff -u -r45ce5cd058a8d0239d486e0ab4b057731f7dba76 -re5576e4397ed640fec2a936dc5e42c773870b29a
--- leahi.qrc (.../leahi.qrc) (revision 45ce5cd058a8d0239d486e0ab4b057731f7dba76)
+++ leahi.qrc (.../leahi.qrc) (revision e5576e4397ed640fec2a936dc5e42c773870b29a)
@@ -299,6 +299,7 @@
sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentIsolatedUFConfirm.qml
sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitals.qml
sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentVitalsInterval.qml
+ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentMode.qml
sources/gui/qml/pages/endtreatment/EndTreatmentRinsebackStack.qml
Index: sources/gui/qml/pages/treatment/TreatmentHDF.qml
===================================================================
diff -u -r45ce5cd058a8d0239d486e0ab4b057731f7dba76 -re5576e4397ed640fec2a936dc5e42c773870b29a
--- sources/gui/qml/pages/treatment/TreatmentHDF.qml (.../TreatmentHDF.qml) (revision 45ce5cd058a8d0239d486e0ab4b057731f7dba76)
+++ sources/gui/qml/pages/treatment/TreatmentHDF.qml (.../TreatmentHDF.qml) (revision e5576e4397ed640fec2a936dc5e42c773870b29a)
@@ -27,15 +27,19 @@
ScreenItem { id: _root
readonly property int margin : Variables.defaultMargin * 5
readonly property color statusColor : Colors.statusActive
+ readonly property real minimum : vTreatmentRanges.substitutionVolumeMin
+ readonly property real maximum : vTreatmentRanges.substitutionVolumeMax
+ readonly property real resolution : vTreatmentRanges.substitutionVolumeRes
signal sectionPressuresClicked()
+ signal treatmentModeEditClicked()
Component.onCompleted: {
_headerBar.hdfStatusColor = _root.statusColor // TODO update later
}
- Column { id: _column
- objectName: "column"
+ Row { id: _row
+ objectName: "_row"
spacing: Variables.defaultMargin
@@ -47,34 +51,107 @@
margins: Variables.defaultMargin
}
- readonly property int cellHeight: Variables.treatmentCellHeight
readonly property int cellWidth : width / 2 - ( Variables.defaultMargin / 2 )
- Row { id: _topRow
- objectName: "topRow"
+ TreatmentHDFComponent { id: _treatmentHdfComponent
+ objectName : "_treatmentHdfComponent"
+ width : _row.cellWidth
+ height : _column.implicitHeight
+ statusColor : _root.statusColor
+ onSubstitutionFlowClicked: print ("Substitution Flow Clicked")
+ }
+
+
+ Column { id: _column
+ objectName: "_column"
+
spacing : Variables.defaultMargin
- height : _column.cellHeight
+ height : _row.height
TreatmentPressures { id: _treatmentPressures
objectName : "_treatmentPressures"
- width : _column.cellWidth
- height : _column.cellHeight
+ width : _row.cellWidth
+ height : Variables.treatmentCellHeight
onEditClicked : sectionPressuresClicked()
color : Colors.panelBackgroundColor
header.color : Colors.heparinSectionHeader
enableDropShadow: false
}
- }
- TreatmentHDFComponent { id: _treatmentHdfComponent
- objectName : "_treatmentHdfComponent"
- width : _column.width
- height : _column.cellHeight
- statusColor : _root.statusColor
+ Item { id: _autoSub
+ width : _row.cellWidth
+ height : Variables.contentHeight
- onSubstitutionFlowClicked: print ("Substitution Flow Clicked")
+ Text { id: _autoSubText
+ anchors {
+ verticalCenter : _autoSub.verticalCenter
+ right : _autoSub.right
+ }
+ text : qsTr("Auto Sub")
+ color : Colors.offWhite
+ height : Variables.contentHeight
+ width : implicitWidth
+ verticalAlignment : Text.AlignVCenter
+
+ font {
+ pixelSize : 22
+ family : Fonts.fontFamilyFixed
+ weight : Font.Medium
+ }
+ }
+
+ BaseSwitch { id: _autoSubSwitch
+ anchors {
+ verticalCenter : _autoSubText.verticalCenter
+ right : _autoSubText.left
+ rightMargin : Variables.defaultMargin
+ }
+ checked : true // TODO
+ height : Variables.contentHeight
+
+ onClicked: {
+ print (("Auto Sub Switch set to %1").arg(_autoSubSwitch.checked ? "On" : "Off"))
+ }
+ }
+ }
+
+ LabelUnitContainer { id: _treatmentMode
+ objectName : "_treatmentMode"
+ text : qsTr("Treatment Mode")
+ width : _row.cellWidth
+ height : Variables.adjustmentLabelUnitContainerHeight
+ showEdit : true
+ onEditClicked : _root.treatmentModeEditClicked()
+
+ contentItem : ValueAdjusterCustom { id: _treatmentModeControl
+ value : vTreatmentCreate.hdfTreatmentMode
+ model : vTreatmentRanges.hdfTreatmentModeOptions
+ editable : false
+ onDidChange : function(vValue) {
+ vTreatmentCreate.hdfTreatmentMode = vValue
+ }
+ }
+ }
+
+ LabelUnitValueAdjuster { id: _prescribedFluidVolume
+ objectName : "_prescribedFluidVolume"
+ text : qsTr("Prescribed Sub. Fluid Volume")
+ unitText : Variables.unitVolume
+ decimal : Variables.substitutionPrecision
+ isActive : true
+ minimum : _root.minimum
+ maximum : _root.maximum
+ step : _root.resolution
+ width : _row.cellWidth
+ value : 24.0
+ defaultValue : 24.0
+
+ onDidChange : function(vValue) {
+ value = vValue
+ }
+ }
}
}
}
Index: sources/gui/qml/pages/treatment/TreatmentStack.qml
===================================================================
diff -u -r45ce5cd058a8d0239d486e0ab4b057731f7dba76 -re5576e4397ed640fec2a936dc5e42c773870b29a
--- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 45ce5cd058a8d0239d486e0ab4b057731f7dba76)
+++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision e5576e4397ed640fec2a936dc5e42c773870b29a)
@@ -127,13 +127,19 @@
function onSectionPressuresClicked ( ) {
_treatmentAdjustmentPressuresLimits.open()
}
+
+ function onTreatmentModeEditClicked ( ) {
+ _treatmentAdjustmentMode.open()
+
+ }
}
//// Treatment Adjustment Dialogs
TreatmentAdjustmentSetPoints { id: _treatmentAdjustmentSetPoints }
TreatmentAdjustmentPressuresLimits { id: _treatmentAdjustmentPressuresLimits }
TreatmentAdjustmentBolusVolume { id: _treatmentAdjustmentBolusVolume }
TreatmentAdjustmentUltrafiltrationStack { id: _treatmentAdjustmentUltrafiltration }
+ TreatmentAdjustmentMode { id: _treatmentAdjustmentMode }
Connections { target: _treatmentAdjustmentSetPoints
function onConfirmClicked ( vValue ) {
Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentMode.qml
===================================================================
diff -u
--- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentMode.qml (revision 0)
+++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentMode.qml (revision e5576e4397ed640fec2a936dc5e42c773870b29a)
@@ -0,0 +1,63 @@
+
+// Qt
+import QtQuick 2.12
+
+// Project
+import "qrc:/globals"
+import "qrc:/components"
+import "qrc:/compounds"
+
+TreatmentAdjustmentBase { id: _root
+ contentItem.objectName: "TreatmentAdjustmentMode"
+ titleText : qsTr("Treatment Mode")
+
+ titlePixelSize : Fonts.fontPixelSection
+ height : Variables.smallDialogHeight
+ width : Variables.smallDialogWidth
+
+ function confirm() {
+ vTreatmentCreate.hdfTreatmentMode = _treatmentModeControl.currentIndex
+ _root.close()
+ }
+
+ onOpened: _treatmentModeControl.currentIndex = vTreatmentCreate.hdfTreatmentMode
+
+ LabelUnitContainer { id: _treatmentMode
+ objectName : "_treatmentMode"
+ anchors {
+ verticalCenter : _root.contentItem.verticalCenter
+ verticalCenterOffset: Variables.defaultMargin * -3 // better align label with dialog height
+ horizontalCenter : _root.contentItem.horizontalCenter
+ }
+ text : qsTr("Treatment Mode")
+ width : Variables.adjustmentLabelUnitContainerWidth
+ height : Variables.adjustmentLabelUnitContainerHeight
+ onEditClicked : _root.treatmentModeEditClicked()
+
+ contentItem : ValueAdjusterCustom { id: _treatmentModeControl
+ value : vTreatmentCreate.hdfTreatmentMode
+ model : vTreatmentRanges.hdfTreatmentModeOptions
+
+ }
+ }
+
+ ConfirmButton { id : _confirmButton
+ anchors {
+ bottom : _root.contentItem.bottom
+ bottomMargin : Variables.defaultMargin * 4
+ horizontalCenter: _root.contentItem.horizontalCenter
+ }
+
+ width : Variables.defaultButtonWidth
+ height : Variables.defaultButtonHeight
+
+ anchors {
+ top : undefined
+ right : undefined
+ margins : 0
+ }
+ onClicked : {
+ _root.confirm()
+ }
+ }
+}
Index: sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml
===================================================================
diff -u -r45ce5cd058a8d0239d486e0ab4b057731f7dba76 -re5576e4397ed640fec2a936dc5e42c773870b29a
--- sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml (.../TreatmentHDFComponent.qml) (revision 45ce5cd058a8d0239d486e0ab4b057731f7dba76)
+++ sources/gui/qml/pages/treatment/sections/TreatmentHDFComponent.qml (.../TreatmentHDFComponent.qml) (revision e5576e4397ed640fec2a936dc5e42c773870b29a)
@@ -31,10 +31,10 @@
}
contentArea.anchors {
- topMargin : Variables.defaultMargin
- leftMargin : Variables.defaultMargin * 2
- rightMargin : Variables.defaultMargin
- bottomMargin: Variables.defaultMargin
+ topMargin : Variables.defaultMargin * 2
+ leftMargin : Variables.defaultMargin * 3
+ rightMargin : Variables.defaultMargin * 2
+ bottomMargin: Variables.defaultMargin * 2
}
border {
width: 1
@@ -64,222 +64,137 @@
readonly property string buttonText : qsTr("Pause Substitution Flow")
property color statusColor : Colors.transparent
-
- readonly property int cellHeight: contentItem.height
- readonly property int cellWidth : contentItem.width / 2 - _row.spacing
-
signal substitutionFlowClicked()
- contentItem: Row { id: _row
- spacing: Variables.defaultMargin * 2
+ contentItem: Item { id: _content
- Item { id: _leftColumnContent
- width : _root.cellWidth
- height : _root.cellHeight
+ LabelValue { id: _estimatedSubstitutionVol
+ anchors {
+ top : parent.top
+ left : parent.left
+ }
+ height : parent.height / 3
+ width : parent.width * 0.2
+ topText : qsTr("Estimated Final Substitution Volume")
+ topTextFont.pixelSize : topTextFontSize
+ topTextFont.weight : Font.Medium
+ bottomText : (_root.estimatedSubstitutionVal).toFixed(Variables.substitutionPrecision) //vTreatmentUltrafiltration.setVolume.toFixed(Variables.substitutionPrecision)
+ bottomTextFont.pixelSize: bottomTextFontSize
+ bottomTextFont.weight : Font.Normal
+ leftAlign : true
+ unitText : Variables.unitVolume
+ bottomTextTopMargin : Variables.defaultMargin
+ }
- LabelValue { id: _estimatedSubstitutionVol
- anchors {
- top : parent.top
- left : parent.left
- }
- height : parent.height / 3
- width : parent.width * 0.2
- topText : qsTr("Estimated Final Substitution Volume")
- topTextFont.pixelSize : topTextFontSize
- topTextFont.weight : Font.Medium
- bottomText : (_root.estimatedSubstitutionVal).toFixed(Variables.substitutionPrecision) //vTreatmentUltrafiltration.setVolume.toFixed(Variables.substitutionPrecision)
- bottomTextFont.pixelSize: bottomTextFontSize
- bottomTextFont.weight : Font.Normal
- leftAlign : true
- unitText : Variables.unitVolume
+ LabelValue { id: _substitutionRate
+ anchors {
+ top : _estimatedSubstitutionVol.bottom
+ topMargin : Variables.defaultMargin
+ left : parent.left
}
+ height : parent.height / 3
+ width : parent.width * 0.2
+ topText : qsTr("Substitution Rate")
+ topTextFont.pixelSize : topTextFontSize
+ topTextFont.weight : Font.Medium
+ bottomText : _root.substitutionRate //vTreatmentUltrafiltration.setVolume.toFixed(Variables.substitutionPrecision)
+ bottomTextFont.pixelSize: bottomTextFontSize
+ bottomTextFont.weight : Font.Normal
+ leftAlign : true
+ unitText : Variables.unitTextFlowRate
+ bottomTextTopMargin : Variables.defaultMargin
+ }
- LabelValue { id: _substitutionRate
- anchors {
- top : _estimatedSubstitutionVol.bottom
- topMargin : Variables.defaultMargin
- left : parent.left
- }
- height : parent.height / 3
- width : parent.width * 0.2
- topText : qsTr("Substitution Rate")
- topTextFont.pixelSize : topTextFontSize
- topTextFont.weight : Font.Medium
- bottomText : _root.substitutionRate //vTreatmentUltrafiltration.setVolume.toFixed(Variables.substitutionPrecision)
- bottomTextFont.pixelSize: bottomTextFontSize
- bottomTextFont.weight : Font.Normal
- leftAlign : true
- unitText : Variables.unitTextFlowRate
+ ProgressBar { id: _progressbar
+ anchors {
+ verticalCenter : parent.verticalCenter
+ verticalCenterOffset: Variables.defaultMargin * -2
+ right : parent.right
}
+ width : parent.width * 0.6
+ height : 20
+ decimal : Variables.substitutionPrecision
+ minimum : _root.minimum
+ maximum : _root.maximum
+ value : _root.substitutionValue
+ unitText : Variables.unitVolume
+ color : Colors.progressBarUltrafiltration
+ bgColor : Colors.heparinSectionHeader
+ radius : height
+ showMarker : false
+ minText.color: "#818181"
+ minText.font {
+ pixelSize : 18
+ weight : Font.Normal
+ }
- ProgressBar { id: _progressbar
- anchors {
- verticalCenter : parent.verticalCenter
- right : parent.right
- }
- width : parent.width * 0.6
- height : 20
- decimal : Variables.substitutionPrecision
- minimum : _root.minimum
- maximum : _root.maximum
- value : _root.substitutionValue
- unitText : Variables.unitVolume
- color : Colors.progressBarUltrafiltration
- bgColor : Colors.heparinSectionHeader
- radius : height
- showMarker : false
- minText.color: "#818181"
- minText.font {
- pixelSize : 18
- weight : Font.Normal
- }
-
- maxText.color: "#818181"
- maxText.font {
- pixelSize : 18
- weight : Font.Normal
- }
-
- Text { id: _valueText
- anchors {
- bottom : parent.top
- bottomMargin : Variables.defaultMargin
- right : parent.right
- }
- text : _root.substitutionValue.toFixed(Variables.substitutionPrecision) + " " + Variables.unitVolume
- color : Colors.white
- font.pixelSize : 40
- font.weight : Font.DemiBold
- }
-
- Text { id: _substituionVolume
- anchors {
- top : parent.bottom
- topMargin : Variables.defaultMargin * 2.5
- right : parent.right
- }
- text : qsTr("Substitution Volume")
- color : Colors.textTextRectLabel
- font.pixelSize : 20
- font.weight : Font.Medium
- }
+ maxText.color: "#818181"
+ maxText.font {
+ pixelSize : 18
+ weight : Font.Normal
}
- Rectangle { id: _status
+ Text { id: _valueText
anchors {
- top : parent.top
+ bottom : parent.top
+ bottomMargin : Variables.defaultMargin
right : parent.right
}
- width : 100
- height : 30
- radius : height
- color : _root.statusColor
- Text { id: _statusText
- anchors.centerIn: parent
- text : _root.statusText
- color : Colors.white
- font.pixelSize : Fonts.fontPixelContainerUnitSmall
- font.weight : Font.DemiBold
- }
+ text : _root.substitutionValue.toFixed(Variables.substitutionPrecision) + " " + Variables.unitVolume
+ color : Colors.white
+ font.pixelSize : 40
+ font.weight : Font.DemiBold
}
- TouchRect { id : _substitutionFlowButton
- width : text.implicitWidth + Variables.defaultMargin * 2
- height : Variables.contentHeight
- text {
- text : _root.buttonText
- font.pixelSize : Fonts.fontPixelConfirm
- font.weight : Font.Medium
- }
-
- isDefault: true
-
+ Text { id: _substituionVolume
anchors {
- bottom : parent.bottom
- horizontalCenter: parent.horizontalCenter
+ top : parent.bottom
+ topMargin : Variables.defaultMargin * 2.5
+ right : parent.right
}
-
- onClicked: substitutionFlowClicked()
+ text : qsTr("Substitution Volume")
+ color : Colors.textTextRectLabel
+ font.pixelSize : 20
+ font.weight : Font.Medium
}
}
- Column { id: _rightColumn
- leftPadding : Variables.defaultMargin
- width : _root.cellWidth
- height : _root.cellHeight
- spacing : Variables.defaultMargin
-
- Item { id: _autoSub
- width : _rightColumn.width
- height : _rightColumn.height / 4
-
- Text { id: _autoSubText
- anchors {
- verticalCenter : _autoSub.verticalCenter
- right : _autoSub.right
- }
- text : qsTr("Auto Sub")
- color : Colors.offWhite
- height : Variables.contentHeight
- width : implicitWidth
- verticalAlignment : Text.AlignVCenter
-
- font {
- pixelSize : 22
- family : Fonts.fontFamilyFixed
- weight : Font.Medium
- }
- }
-
- BaseSwitch { id: _autoSubSwitch
- anchors {
- verticalCenter : _autoSubText.verticalCenter
- right : _autoSubText.left
- rightMargin : Variables.defaultMargin
- }
- checked : true // TODO
- height : Variables.contentHeight
-
- onClicked: {
- print (("Auto Sub Switch set to %1").arg(_autoSubSwitch.checked ? "On" : "Off"))
- }
- }
+ Rectangle { id: _status
+ anchors {
+ top : parent.top
+ right : parent.right
}
+ width : 100
+ height : 30
+ radius : height
+ color : _root.statusColor
+ Text { id: _statusText
+ anchors.centerIn: parent
+ text : _root.statusText
+ color : Colors.white
+ font.pixelSize : Fonts.fontPixelContainerUnitSmall
+ font.weight : Font.DemiBold
+ }
+ }
- LabelUnitContainer { id: _treatmentMode
- objectName : "_treatmentMode"
- text : qsTr("Treatment Mode")
- width : _rightColumn.width
- height : Variables.adjustmentLabelUnitContainerHeight
- showEdit : true
- onEditClicked : print ("Treatment Mode Edit Clicked")
-
- contentItem : ValueAdjusterCustom { id: _bpMeasurementIntervalControl
- value : vTreatmentCreate.hdfTreatmentMode
- model : vTreatmentRanges.hdfTreatmentModeOptions
- onDidChange : function(vValue) {
- vTreatmentCreate.hdfTreatmentMode = vValue
- }
- }
+ TouchRect { id : _substitutionFlowButton
+ width : text.implicitWidth + Variables.defaultMargin * 2
+ height : 60
+ text {
+ text : _root.buttonText
+ font.pixelSize : Fonts.fontPixelConfirm
+ font.weight : Font.Medium
}
- LabelUnitValueAdjuster { id: _prescribedFluidVolume
- objectName : "_prescribedFluidVolume"
- text : qsTr("Prescribed Sub. Fluid Volume")
- unitText : Variables.unitVolume
- decimal : Variables.substitutionPrecision
- isActive : true
- minimum : _root.minimum
- maximum : _root.maximum
- step : _root.resolution
- width : _rightColumn.width
- value : 24.0
- defaultValue : 24.0
+ isDefault: true
- onDidChange : function(vValue) {
- value = vValue
- }
+ anchors {
+ bottom : parent.bottom
+ bottomMargin : Variables.defaultMargin
+ horizontalCenter: parent.horizontalCenter
}
+
+ onClicked: substitutionFlowClicked()
}
}
}