Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentHDF.qml =================================================================== diff -u -r600b6707b102919d981f3b1d18611834e23eae60 -r04892d957c8f85eba1dc0550c2c9b01eef86efe9 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentHDF.qml (.../TreatmentAdjustmentHDF.qml) (revision 600b6707b102919d981f3b1d18611834e23eae60) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentHDF.qml (.../TreatmentAdjustmentHDF.qml) (revision 04892d957c8f85eba1dc0550c2c9b01eef86efe9) @@ -15,10 +15,13 @@ height : Variables.smallDialogHeight width : Variables.smallDialogWidth + readonly property bool isValid : _prescribedFluidVolume.valid && _treatmentMode.valid + readonly property int txMode : _treatmentModeControl.value + readonly property real prescFluidVolume: _prescribedFluidVolume.value + function confirm() { - vTreatmentCreate.hdfTreatmentMode = _treatmentModeControl.currentIndex - vTreatmentCreate.substitutionFluidVolume = _prescribedFluidVolume.value - _root.close() + vTreatmentAdjustmentHDF.doAdjustment( _treatmentModeControl.value , + _prescribedFluidVolume.value ) } onOpened: { @@ -40,11 +43,18 @@ text : qsTr("Treatment Mode") width : Variables.adjustmentLabelUnitContainerWidth height : Variables.adjustmentLabelUnitContainerHeight + valid : ! vTreatmentAdjustmentHDF.treatmentModeRejectionReason + onEditClicked : _root.treatmentHDFEditClicked() contentItem : ValueAdjusterCustom { id: _treatmentModeControl value : vTreatmentCreate.hdfTreatmentMode model : vTreatmentRanges.hdfTreatmentModeOptions + + onDidChange : function(vValue) { + if ( ! _treatmentMode.valid ) { vTreatmentAdjustmentHDF.treatmentModeRejectionReason = Variables.noRejectReason } + value = vValue + } } } @@ -53,6 +63,8 @@ text : qsTr("Prescribed Sub. Fluid Volume") width : Variables.adjustmentLabelUnitContainerWidth height : Variables.adjustmentLabelUnitContainerHeight + valid : ! vTreatmentAdjustmentHDF.prescSubVolumeRejectionReason + unitText : Variables.unitVolume decimal : Variables.substitutionPrecision valueTextColor : Colors.offWhite @@ -64,6 +76,7 @@ defaultValue : vTreatmentRanges.substitutionVolumeDef onDidChange : function(vValue) { + if ( ! _prescribedFluidVolume.valid ) { vTreatmentAdjustmentHDF.prescSubVolumeRejectionReason = Variables.noRejectReason } value = vValue } } @@ -78,6 +91,7 @@ width : Variables.defaultButtonWidth height : Variables.defaultButtonHeight + enabled : _root.isValid anchors { top : undefined