Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateTreatmentSettings.qml =================================================================== diff -u -r4a7dd11138d2321f1ab8d324b3bd25f02eaefe84 -r1132f049e169cc87a059261f72fca0ceb7d739f1 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateTreatmentSettings.qml (.../PreTreatmentCreateTreatmentSettings.qml) (revision 4a7dd11138d2321f1ab8d324b3bd25f02eaefe84) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateTreatmentSettings.qml (.../PreTreatmentCreateTreatmentSettings.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1) @@ -8,242 +8,402 @@ import "qrc:/components" import "qrc:/compounds" -Grid { id: _root +Row { id: _root readonly property int cellWidth : Variables.createRxLabelUnitContainerWidth readonly property int cellHeight : Variables.createRxLabelUnitContainerHeight readonly property bool heparinFeatured : vSettings.heparinSyringePump readonly property string patientID : _pretreatmentPatientIDEntry.text property bool isHDFFeatured : vTreatmentCreate.treatmentModality === HeaderBar.Mode_HDF - property bool editingEnabled : true + property int columnSpacing : 15 - flow : Grid.TopToBottom - rows : _root.isHDFFeatured ? 7 : 5 - columns : 2 - rowSpacing : 15 - columnSpacing : Variables.defaultMargin * 3 + spacing : Variables.defaultMargin * 3 + enum HeparinEnabled { + OFF, + ON + } + + signal clearHeparinDuration() + onIsHDFFeaturedChanged: { if ( ! isHDFFeatured ) { vTreatmentCreate.hdfTreatmentMode = 0 vTreatmentCreate.substitutionFluidVolume = 0 } } + function setPresetParameters () { + vTreatmentCreate.dialysateTemp = vTreatmentRanges.dialysateTempDef + } + function refreshAll () { + _hdfTreatmentModeControl .refresh() _subFluidVolume .refresh() - - _ufVolume .refresh() _bloodFlowRate .refresh() - - _dialysateFlowRateControl .refresh() - _durationControl .refresh() - _heparinDispensingRateControl .refresh() - _heparinBolusVolumeControl .refresh() - _heparinDeliveryDurationControl .refresh() - _dialysateTemperatureControl .refresh() - _fluidBolusVolumeControl .refresh() - _bpMeasurementIntervalControl .refresh() + _dialysateFlowRate .refresh() + _duration .refresh() + _ufVolume .refresh() + _heparinRxAdjustment .refresh() + _dialysateTemperature .refresh() } function clear () { - vTreatmentCreate.patientID = "" - _hdfTreatmentModeComboBox .clear() - _subFluidVolume .clear() - - _ufVolume .clear() - _bloodFlowRate .clear() - - - _dialysateFlowRateControl .clear() - _durationControl .clear() - _heparinDispensingRateControl .clear() - _heparinBolusVolumeControl .clear() - _heparinDeliveryDurationControl .clear() + vTreatmentCreate.patientID = "" + _hdfTreatmentModeControl .clear() + _subFluidVolume .clear() + _bloodFlowRate .clear() + _dialysateFlowRate .clear() + _duration .clear() + _ufVolume .clear() + _heparinRxAdjustment .clear() _acidConcentrateComboBox .clear() _bicarbonateConcentrateComboBox .clear() _dialyzerTypeComboBox .clear() - _dialysateTemperatureControl .clear() - _fluidBolusVolumeControl .clear() - _bpMeasurementIntervalControl .clear() - clearErrors() - canEdit (true) + _dialysateTemperature .clear() } function ready () { - return _root.isHDFFeatured ? _hdfTreatmentModeComboBox .isActive && _hdfTreatmentMode.valid && - _subFluidVolume .isActive && _subFluidVolume .valid : true && - _bloodFlowRate .isActive && _bloodFlowRate .valid && + return _root.isHDFFeatured ? _hdfTreatmentModeControl .isActive && _hdfTreatmentMode .valid && + _subFluidVolume .isActive && _subFluidVolume .valid : true && + _bloodFlowRate .isActive && _bloodFlowRate .valid && + _dialysateFlowRate .isActive && _dialysateFlowRate .valid && + _duration .isActive && _duration .valid && - _ufVolume .isActive && _ufVolume .valid && + _ufVolume .isActive && _ufVolume .valid && + _root.isHDFFeatured && + _heparinRxControl.value === PreTreatmentCreateTreatmentSettings.ON ? _heparinRxAdjustment.confirmReady() : + true && + _acidConcentrateComboBox .isActive && _acidConcentrate .valid && + _bicarbonateConcentrateComboBox .isActive && _bicarbonateConcentrate .valid && + _dialyzerTypeComboBox .isActive && _dialyzerType .valid && + _dialysateTemperature .isActive && _dialysateTemperature .valid + } + Column { id: _leftColumn + spacing : _root.columnSpacing + LabelUnitContainer { id: _patientID + text : qsTr("Patient ID") + contentArea.anchors.leftMargin : 120 - _dialysateFlowRateControl .isActive && _dialysateFlowRate .valid && - _durationControl .isActive && _duration .valid && - ( _root.heparinFeatured ? _heparinDispensingRateControl .isActive && _heparinDispensingRate .valid && - _heparinBolusVolumeControl .isActive && _heparinBolusVolume .valid && - _heparinDeliveryDurationControl .isActive && _heparinDeliveryDuration .valid : true ) && - _acidConcentrateComboBox .isActive && - _bicarbonateConcentrateComboBox .isActive && - _dialyzerTypeComboBox .isActive && - _dialysateTemperatureControl .isActive && _dialysateTemperature .valid && - _fluidBolusVolumeControl .isActive && _fluidBolusVolume .valid && - _bpMeasurementIntervalControl .isActive - } + contentItem : TextEntry { id: _pretreatmentPatientIDEntry + clip : true + textInput.width : parent.width - Variables.defaultMargin * 4 + text : vTreatmentCreate.patientID + anchors.centerIn : parent + textInput.maximumLength : 20 // LEAHI-PRS-236 + textInput.rightPadding : Variables.defaultMargin + textInput.leftPadding : Variables.defaultMargin * 14 + textInput.inputMethodHints : Qt.ImhPreferLowercase + textInput.echoMode : TextInput.Normal + textInput.validator : RegExpValidator { regExp: Variables.regExp_PatientID } + line.visible : false + enabled : _root.editingEnabled + onEditingFinished : vTreatmentCreate.patientID = text - LabelUnitContainer { id: _patientID - text : qsTr("Patient ID") - contentArea.anchors.leftMargin : 120 + Text { id: _patientIDPlaceHolderText + text : Variables.emptyEntry + anchors.fill : parent + rightPadding : 125 + horizontalAlignment : Text.AlignRight + font.pixelSize : Fonts.fontPixelValueControl + color : Colors.offWhite + visible : _pretreatmentPatientIDEntry.textInput.text.length === 0 && + ! _pretreatmentPatientIDEntry.textInput.activeFocus + } + } + } - contentItem : TextEntry { id: _pretreatmentPatientIDEntry - clip : true - textInput.width : parent.width - Variables.defaultMargin * 4 - text : vTreatmentCreate.patientID - anchors.centerIn : parent - textInput.maximumLength : 20 // LEAHI-PRS-236 - textInput.rightPadding : Variables.defaultMargin - textInput.leftPadding : Variables.defaultMargin * 14 - textInput.inputMethodHints : Qt.ImhPreferLowercase - textInput.echoMode : TextInput.Normal - textInput.validator : RegExpValidator { regExp: Variables.regExp_PatientID } - line.visible : false - enabled : _root.editingEnabled - onEditingFinished : vTreatmentCreate.patientID = text + LabelUnitContainer { id: _treatmentModality + text : qsTr("Treatment Modality") + valid : ! vTreatmentCreate.treatmentModalityRejectReason - Text { id: _patientIDPlaceHolderText - text : Variables.emptyEntry - anchors.fill : parent - rightPadding : 125 - horizontalAlignment : Text.AlignRight - font.pixelSize : Fonts.fontPixelValueControl - color : Colors.offWhite - visible : _pretreatmentPatientIDEntry.textInput.text.length === 0 && - ! _pretreatmentPatientIDEntry.textInput.activeFocus + contentItem : BaseComboBox { id: _treatmentModalityComboBox + anchors.rightMargin : Variables.defaultMargin * 2 + anchors.leftMargin : anchors.rightMargin + anchors.topMargin : Variables.defaultMargin / 2 + anchors.bottomMargin: anchors.topMargin + isActive : true // PRS-215 + enabled : _root.editingEnabled + currentIndex : vTreatmentCreate.treatmentModality + model : vTreatmentRanges.treatmentModalityOptions + centerHorizontally : true + + onActivated : { + if ( ! _treatmentModality.valid ) { vTreatmentCreate.treatmentModalityRejectReason = Variables.noRejectReason } + vTreatmentCreate.treatmentModality = _treatmentModalityComboBox.currentIndex + } } } - } - LabelUnitContainer { id: _treatmentModality - text : qsTr("Treatment Modality") - valid : ! vTreatmentCreate.treatmentModalityRejectReason + LabelUnitContainer { id: _hdfTreatmentMode + text : _root.isHDFFeatured ? qsTr("HDF Operating Mode") : "" + valid : ! vTreatmentCreate.hdfTreatmentModeRejectReason + height : _root.isHDFFeatured ? _root.cellHeight : 0 - contentItem : BaseComboBox { id: _treatmentModalityComboBox - anchors.rightMargin : Variables.defaultMargin * 2 - anchors.leftMargin : anchors.rightMargin - anchors.topMargin : Variables.defaultMargin / 2 - anchors.bottomMargin: anchors.topMargin - isActive : true // PRS-215 - enabled : _root.editingEnabled - currentIndex : vTreatmentCreate.treatmentModality - model : vTreatmentRanges.treatmentModalityOptions + contentItem : ValueAdjusterCustom { id: _hdfTreatmentModeControl + value : vTreatmentCreate.hdfTreatmentMode + model : vTreatmentRanges.hdfTreatmentModeOptions + isActive : vTreatmentCreate.hdfTreatmentModeSet + editable : _root.editingEnabled + visible : _root.isHDFFeatured - onActivated : { - if ( ! _treatmentModality.valid ) { vTreatmentCreate.treatmentModalityRejectReason = Variables.noRejectReason } - vTreatmentCreate.treatmentModality = _treatmentModalityComboBox.currentIndex + onDidActiveChange: function(vState) { vTreatmentCreate.hdfTreatmentModeSet = vState } + + onDidChange : function(vValue) { + if ( ! _hdfTreatmentMode.valid ) { vTreatmentCreate.hdfTreatmentModeRejectReason = Variables.noRejectReason } + vTreatmentCreate.hdfTreatmentModeSet = true + vTreatmentCreate.hdfTreatmentMode = vValue + } } + Behavior on height { NumberAnimation { duration: 250 } } } - } - LabelUnitContainer { id: _hdfTreatmentMode - text : qsTr("HDF Operating Mode") - valid : ! vTreatmentCreate.hdfTreatmentModeRejectReason - visible : _root.isHDFFeatured + LabelUnitValueAdjuster { id: _subFluidVolume + text : _root.isHDFFeatured ? qsTr("Substitution Fluid Volume") : "" + width : _root.cellWidth + height : _root.isHDFFeatured ? _root.cellHeight : 0 + contentItem.visible: _root.isHDFFeatured + unitText : _root.isHDFFeatured ? Variables.unitVolume : "" + valid : ! vTreatmentCreate.substitutionFluidVolumeRejectionReason + editable : _root.editingEnabled + minimum : vTreatmentRanges.substitutionVolumeMin + maximum : vTreatmentRanges.substitutionVolumeMax + step : vTreatmentRanges.substitutionVolumeRes + defaultValue : vTreatmentRanges.substitutionVolumeDef + decimal : Variables.substitutionPrecision + value : vTreatmentCreate.substitutionFluidVolume + isActive : vTreatmentCreate.substitutionFluidVolumeSet - contentItem : BaseComboBox { id: _hdfTreatmentModeComboBox - anchors.rightMargin : Variables.defaultMargin * 2 - anchors.leftMargin : anchors.rightMargin - anchors.topMargin : Variables.defaultMargin / 2 - anchors.bottomMargin: anchors.topMargin - isActive : vTreatmentCreate.hdfTreatmentModeSet - enabled : _root.editingEnabled - currentIndex : vTreatmentCreate.hdfTreatmentMode - model : vTreatmentRanges.hdfTreatmentModeOptions + onDidActiveChange : function(vState) { vTreatmentCreate.substitutionFluidVolumeSet = vState } + onDidChange : function(vValue) { + if ( ! _ufVolume.valid ) { vTreatmentCreate.substitutionFluidVolumeRejectionReason = Variables.noRejectReason } + vTreatmentCreate.substitutionFluidVolume = vValue + } + Behavior on height { NumberAnimation { duration: 250 } } + } - onClear : vTreatmentCreate.hdfTreatmentModeSet = false + LabelUnitValueAdjuster { id: _bloodFlowRate + text : qsTr("Blood Flow Rate") + unitText : Variables.unitTextFlowRate + valid : ! vTreatmentCreate.bloodFlowRateRejectReason + width : _root.cellWidth + height : _root.cellHeight + editable : _root.editingEnabled + minimum : vTreatmentRanges.bloodFlowRateMin + maximum : vTreatmentRanges.bloodFlowRateMax + step : vTreatmentRanges.bloodFlowRateRes + defaultValue : vTreatmentRanges.bloodFlowRateDef + value : vTreatmentCreate.bloodFlowRate + isActive : vTreatmentCreate.bloodFlowRateSet + onDidActiveChange : function(vState) { vTreatmentCreate.bloodFlowRateSet = vState } + onDidChange : function(vValue) { + if ( ! _bloodFlowRate.valid ) { vTreatmentCreate.bloodFlowRateRejectReason = Variables.noRejectReason } + vTreatmentCreate.bloodFlowRate = vValue + } + } - onActivated : { - if ( ! _hdfTreatmentMode.valid ) { vTreatmentCreate.hdfTreatmentModeRejectReason = Variables.noRejectReason } - vTreatmentCreate.hdfTreatmentModeSet = true - vTreatmentCreate.hdfTreatmentMode = _hdfTreatmentModeComboBox.currentIndex + LabelUnitValueAdjuster { id: _dialysateFlowRate + text : qsTr("Dialysate Flow Rate") + unitText : Variables.unitTextFlowRate + valid : ! vTreatmentCreate.dialysateFlowRateRejectReason + width : _root.cellWidth + height : _root.cellHeight + editable : _root.editingEnabled + minimum : vTreatmentRanges.dialysateFlowRateMin + maximum : vTreatmentRanges.dialysateFlowRateMax + step : vTreatmentRanges.dialysateFlowRateRes + defaultValue : vTreatmentRanges.dialysateFlowRateDef + value : vTreatmentCreate.dialysateFlowRate + isActive : vTreatmentCreate.dialysateFlowRateSet + onDidActiveChange : function(vState) { vTreatmentCreate.dialysateFlowRateSet = vState } + onDidChange : function(vValue) { + if ( ! _dialysateFlowRate.valid ) { vTreatmentCreate.dialysateFlowRateRejectReason = Variables.noRejectReason } + vTreatmentCreate.dialysateFlowRate = vValue } } - } - LabelUnitValueAdjuster { id: _subFluidVolume - text : qsTr("Substitution Fluid Volume") - visible : _root.isHDFFeatured - width : _root.cellWidth - height : _root.cellHeight - unitText : Variables.unitVolume - valid : ! vTreatmentCreate.substitutionFluidVolumeRejectionReason - editable : _root.editingEnabled - minimum : vTreatmentRanges.substitutionVolumeMin - maximum : vTreatmentRanges.substitutionVolumeMax - step : vTreatmentRanges.substitutionVolumeRes - defaultValue : vTreatmentRanges.substitutionVolumeDef - decimal : Variables.substitutionPrecision - value : vTreatmentCreate.substitutionFluidVolume - isActive : vTreatmentCreate.substitutionFluidVolumeSet + LabelUnitValueAdjuster { id: _duration + text : qsTr("Duration") + unitText : Variables.unitTextDuration + valid : ! vTreatmentCreate.treatmentDurationRejectReason + width : _root.cellWidth + height : _root.cellHeight + editable : _root.editingEnabled + minimum : vTreatmentRanges.treatmentDurationMin + maximum : vTreatmentRanges.treatmentDurationMax + step : vTreatmentRanges.treatmentDurationRes + defaultValue : vTreatmentRanges.treatmentDurationDef + value : vTreatmentCreate.treatmentDuration + isActive : vTreatmentCreate.treatmentDurationSet + onDidActiveChange: function(vState) { vTreatmentCreate.treatmentDurationSet = vState } + onDidChange : function(vValue) { + if ( ! _duration.valid ) { vTreatmentCreate.treatmentDurationRejectReason = Variables.noRejectReason } + vTreatmentCreate.treatmentDuration = vValue - onDidActiveChange : function(vState) { vTreatmentCreate.substitutionFluidVolumeSet = vState } - onDidChange : function(vValue) { - if ( ! _ufVolume.valid ) { vTreatmentCreate.substitutionFluidVolumeRejectionReason = Variables.noRejectReason } - vTreatmentCreate.substitutionFluidVolume = vValue + // set heparin time to clear when set + clearHeparinDuration() + } } } - LabelUnitValueAdjuster { id: _bloodFlowRate - text : qsTr("Blood Flow Rate") - width : _root.cellWidth - height : _root.cellHeight - unitText : Variables.unitTextFlowRate - valid : ! vTreatmentCreate.bloodFlowRateRejectReason - editable : _root.editingEnabled - minimum : vTreatmentRanges.bloodFlowRateMin - maximum : vTreatmentRanges.bloodFlowRateMax - step : vTreatmentRanges.bloodFlowRateRes - defaultValue : vTreatmentRanges.bloodFlowRateDef - value : vTreatmentCreate.bloodFlowRate - isActive : vTreatmentCreate.bloodFlowRateSet + Column { id: _rightColumn + spacing : _root.columnSpacing - onDidActiveChange : function(vState) { vTreatmentCreate.bloodFlowRateSet = vState } - onDidChange : function(vValue) { - if ( ! _bloodFlowRate.valid ) { vTreatmentCreate.bloodFlowRateRejectReason = Variables.noRejectReason } - vTreatmentCreate.bloodFlowRate = vValue - } - } + LabelUnitValueAdjuster { id: _ufVolume + text : qsTr("Ultrafiltration Volume") + width : _root.cellWidth + height : _root.cellHeight + unitText : Variables.unitVolume + showEdit : true + valid : ! vTreatmentCreate.ultrafiltrationVolumeRejectionReason + editable : _root.editingEnabled + minimum : vTreatmentRanges.ultrafiltrationVolumeMin + maximum : vTreatmentRanges.ultrafiltrationVolumeMax + step : vTreatmentRanges.ultrafiltrationVolumeRes + defaultValue : vTreatmentRanges.ultrafiltrationVolumeDef + decimal : Variables.ultrafiltrationPrecision + value : vTreatmentCreate.ultrafiltrationVolume + isActive : vTreatmentCreate.ultrafiltrationVolumeSet + onDidActiveChange : function(vState) { vTreatmentCreate.ultrafiltrationVolumeSet = vState } + onDidChange : function(vValue) { + if ( ! _ufVolume.valid ) { vTreatmentCreate.ultrafiltrationVolumeRejectionReason = Variables.noRejectReason } + vTreatmentCreate.ultrafiltrationVolume = vValue + } + onEditClicked :_ufVolumeAdjustment.open() + } - LabelUnitValueAdjuster { id: _ufVolume - text : qsTr("Ultrafiltration Volume") - width : _root.cellWidth - height : _root.cellHeight - unitText : Variables.unitVolume - showEdit : true - valid : ! vTreatmentCreate.ultrafiltrationVolumeRejectionReason - editable : _root.editingEnabled - minimum : vTreatmentRanges.ultrafiltrationVolumeMin - maximum : vTreatmentRanges.ultrafiltrationVolumeMax - step : vTreatmentRanges.ultrafiltrationVolumeRes - defaultValue : vTreatmentRanges.ultrafiltrationVolumeDef - decimal : Variables.ultrafiltrationPrecision - value : vTreatmentCreate.ultrafiltrationVolume - isActive : vTreatmentCreate.ultrafiltrationVolumeSet + LabelUnitContainer { id: _heparinRx + text : qsTr("Heparin Rx") + valid : ! vTreatmentCreate.heparinDeliveryDurationRejectReason && + ! vTreatmentCreate.heparinTypeRejectReason && + ! vTreatmentCreate.heparinBolusVolumeRejectReason && + ! vTreatmentCreate.heparinDispensingRateRejectReason + visible : _root.heparinFeatured + showEdit : true + needsAttention : ! _heparinRxAdjustment.confirmReady() + editEnabled : _heparinRxControl.value === PreTreatmentCreateTreatmentSettings.ON - onDidActiveChange : function(vState) { vTreatmentCreate.ultrafiltrationVolumeSet = vState } - onDidChange : function(vValue) { - if ( ! _ufVolume.valid ) { vTreatmentCreate.ultrafiltrationVolumeRejectionReason = Variables.noRejectReason } - vTreatmentCreate.ultrafiltrationVolume = vValue + contentItem : ValueAdjusterCustom { id: _heparinRxControl + defaultValue : 0 + value : 0 + editable : _root.editingEnabled + model : [qsTr("OFF"), qsTr("ON")] + onDidChange : function(vValue) { + value = vValue + if ( value ) { + _heparinRxAdjustment.open() + } + else { + vTreatmentCreate.heparinBolusVolume = 0 + vTreatmentCreate.heparinDispensingRate = 0 + vTreatmentCreate.heparinDeliveryDuration = 0 + } + } + } + + onEditClicked : _heparinRxAdjustment.open() } - } + LabelUnitContainer { id: _acidConcentrate + text : qsTr("Acid Concentrate") +// showEdit : _root.editingEnabled // Hide 👋📋 TODO Phase 2 + onEditClicked : _acidConcentrateAdjustment.open() + valid : ! vTreatmentCreate.acidConcentrateRejectReason + contentItem : BaseComboBox { id: _acidConcentrateComboBox + anchors.rightMargin : Variables.defaultMargin * 2 + anchors.leftMargin : anchors.rightMargin + anchors.topMargin : Variables.defaultMargin / 2 + anchors.bottomMargin: anchors.topMargin + isActive : vTreatmentCreate.acidConcentrateSet + enabled : _root.editingEnabled + currentIndex : vTreatmentCreate.acidConcentrate + model : vTreatmentRanges.acidConcentrateOptions + onClear : { + vTreatmentRanges.doClearAcidConcentrate(vTreatmentCreate.acidConcentrateSet) + vTreatmentCreate.acidConcentrateSet = false + } + onActivated : { + if ( ! _acidConcentrate.valid ) { vTreatmentCreate.acidConcentrateRejectReason = Variables.noRejectReason } + vTreatmentCreate.acidConcentrate = _acidConcentrateComboBox.currentIndex + vTreatmentCreate.acidConcentrateSet = true + vTreatmentCreate.acidConcentrateConversionFactor = vTreatmentRanges.acidConcentrateModel.get(vTreatmentCreate.acidConcentrate).value + print( vTreatmentCreate.acidConcentrateConversionFactor ) + } + } + } + LabelUnitContainer { id: _bicarbonateConcentrate + text : qsTr("Bicarbonate Concentrate Size") + valid : ! vTreatmentCreate.dryBicarbCartSizeRejectReason + contentItem : BaseComboBox { id: _bicarbonateConcentrateComboBox + anchors.rightMargin : Variables.defaultMargin * 2 + anchors.leftMargin : anchors.rightMargin + anchors.topMargin : Variables.defaultMargin / 2 + anchors.bottomMargin: anchors.topMargin + isActive : vTreatmentCreate.dryBicarbCartSizeSet + enabled : _root.editingEnabled + currentIndex : vTreatmentCreate.dryBicarbCartSize + model : vTreatmentRanges.dryBicabCartridgeSizeOptions + centerHorizontally : true + onClear : vTreatmentCreate.dryBicarbCartSizeSet = false + onActivated : { + if ( ! _bicarbonateConcentrate.valid ) { vTreatmentCreate.dryBicarbCartSizeRejectReason = Variables.noRejectReason } + vTreatmentCreate.dryBicarbCartSize = _bicarbonateConcentrateComboBox.currentIndex + vTreatmentCreate.dryBicarbCartSizeSet = true + } + } + } + LabelUnitContainer { id: _dialyzerType + text : qsTr("Dialyzer Type") + valid : ! vTreatmentCreate.dialyzerTypeRejectReason + + contentItem : BaseComboBox { id: _dialyzerTypeComboBox + anchors.rightMargin : Variables.defaultMargin * 2 + anchors.leftMargin : anchors.rightMargin + anchors.topMargin : Variables.defaultMargin / 2 + anchors.bottomMargin: anchors.topMargin + isActive : vTreatmentCreate.dialyzerTypeSet + enabled : _root.editingEnabled + currentIndex : vTreatmentCreate.dialyzerType + model : vTreatmentRanges.dialyzerTypeOptions + onClear : vTreatmentCreate.dialyzerTypeSet = false + onActivated : { + if ( ! _dialyzerType.valid ) { vTreatmentCreate.dialyzerTypeRejectReason = Variables.noRejectReason } + vTreatmentCreate.dialyzerType = _dialyzerTypeComboBox.currentIndex + vTreatmentCreate.dialyzerTypeSet = true + } + } + } + + LabelUnitValueAdjuster { id: _dialysateTemperature + text : qsTr("Dialysate Temperature") + unitText : Variables.unitTextTemperature + valid : ! vTreatmentCreate.dialysateTempRejectReason + width : _root.cellWidth + height : _root.cellHeight + editable : _root.editingEnabled + minimum : vTreatmentRanges.dialysateTempMin + maximum : vTreatmentRanges.dialysateTempMax + step : vTreatmentRanges.dialysateTempRes + defaultValue : vTreatmentRanges.dialysateTempDef + value : vTreatmentCreate.dialysateTemp + decimal : Variables.dialysateTempPrecision + isActive : true + + onDidChange : function(vValue) { + if ( ! _dialysateTemperature.valid ) { vTreatmentCreate.dialysateTempRejectReason = Variables.noRejectReason } + vTreatmentCreate.dialysateTemp = vValue + } + } + } }