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 + } + } } } }