Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r6712a4779cf81ad4d16ca070c7accb5c8de45fdd -r45e5c99b5488d4593356d85bed5b3e8430c25834 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 6712a4779cf81ad4d16ca070c7accb5c8de45fdd) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 45e5c99b5488d4593356d85bed5b3e8430c25834) @@ -184,7 +184,7 @@ readonly property int circleButtonDefaultDiameter : 45 - readonly property int fwRejectReasonNONE : 0 // value for no reject reason == accepted value / not rejected + readonly property int noRejectReason : 0 // ---------- < PRS > Related Section ---------- // blood flow rate Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -r6712a4779cf81ad4d16ca070c7accb5c8de45fdd -r45e5c99b5488d4593356d85bed5b3e8430c25834 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 6712a4779cf81ad4d16ca070c7accb5c8de45fdd) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 45e5c99b5488d4593356d85bed5b3e8430c25834) @@ -31,43 +31,43 @@ objectName: "_PreTreatmentCreate" // SquishQt testability header.confirmEnabled: - _bloodFlowRate .active && - _dialysateFlowRate .active && - _duration .active && - _heparinDispensingRate .active && - _heparinBolusVolume .active && - _heparinStopTime .active && - _salineBolus .active && + _bloodFlowRate .active && _bloodFlowRate .valid && + _dialysateFlowRate .active && _dialysateFlowRate .valid && + _duration .active && _duration .valid && + _heparinDispensingRate .active && _heparinDispensingRate .valid && + _heparinBolusVolume .active && _heparinBolusVolume .valid && + _heparinStopTime .active && _heparinStopTime .valid && + _salineBolus .active && _salineBolus .valid && _heparinType .active && _acidConcentrate .active && _bicarbonateConcentrate .active && _dialyzerType .active && - _dialysateTemperature .active && - _arterialPressureLimits .minAdjusted && - _arterialPressureLimits .maxAdjusted && - _venousPressureLimits .minAdjusted && - _venousPressureLimits .maxAdjusted && - _bloodPressureInterval .active && - _rinsebackFlowRate .active + _dialysateTemperature .active && _dialysateTemperature .valid && + _arterialPressureLimits .minAdjusted && _arterialPressureLimits .lowerBoundValid && + _arterialPressureLimits .maxAdjusted && _arterialPressureLimits .upperBoundValid && + _venousPressureLimits .minAdjusted && _venousPressureLimits .lowerBoundValid && + _venousPressureLimits .maxAdjusted && _venousPressureLimits .upperBoundValid && + _bloodPressureInterval .active && _bloodPressureInterval .valid && + _rinsebackFlowRate .active && _rinsebackFlowRate .valid onConfirmClicked: _flickable.isUpdatingView = true Connections{ target:vTreatmentCreate // Update flicker location to show the invalid parameter - function onBloodFlowRateRejectReasonTriggered () { _flickable.setFlickableFocus(!_bloodFlowRate.valid , _bloodFlowRate.y )} - function onDialysateFlowRateRejectReasonChanged () { _flickable.setFlickableFocus(!_dialysateFlowRate.valid , _dialysateFlowRate.y )} - function onTreatmentDurationRejectReasonChanged () { _flickable.setFlickableFocus(!_duration.valid , _duration.y )} - function onHeparinDispensingRateRejectReasonChanged () { _flickable.setFlickableFocus(!_heparinDispensingRate.valid , _heparinDispensingRate.y )} - function onHeparinBolusVolumeRejectReasonChanged () { _flickable.setFlickableFocus(!_heparinBolusVolume.valid , _heparinBolusVolume.y )} - function onHeparinStopTimeRejectReasonChanged () { _flickable.setFlickableFocus(!_heparinStopTime.valid , _heparinStopTime.y )} - function onSalineBolusVolumeRejectReasonChanged () { _flickable.setFlickableFocus(!_salineBolus.valid , _salineBolus.y )} - function onDialysateTempRejectReasonChanged () { _flickable.setFlickableFocus(!_dialysateTemperature.valid , _dialysateTemperature.y )} - function onVenousPressureLimitLowRejectReasonChanged() { _flickable.setFlickableFocus(!_venousPressureLimits.lowerBoundValid, _venousPressureLimits.y);} - function onVenousPressureLimitHighRejectReasonChanged(){ _flickable.setFlickableFocus(!_venousPressureLimits.upperBoundValid, _venousPressureLimits.y);} - function onArterialPressureLimitLowRejectReasonChanged () { _flickable.setFlickableFocus(!_arterialPressureLimits.lowerBoundValid, _arterialPressureLimits.y )} - function onArterialPressureLimitHighRejectReasonChanged () { _flickable.setFlickableFocus(!_arterialPressureLimits.upperBoundValid, _arterialPressureLimits.y )} - function onBloodPressureMeasureIntervalRejectReasonChanged () { _flickable.setFlickableFocus(!_bloodPressureInterval.valid , _bloodPressureInterval.y )} - function onRinsebackFlowRateRejectReasonChanged () { _flickable.setFlickableFocus(!_rinsebackFlowRate.valid , _rinsebackFlowRate.y )} + function onBloodFlowRateRejectReasonChanged() { _flickable.setFlickableFocus(! _bloodFlowRate.valid, _bloodFlowRate.y )} + function onDialysateFlowRateRejectReasonChanged() { _flickable.setFlickableFocus(! _dialysateFlowRate.valid, _dialysateFlowRate.y )} + function onTreatmentDurationRejectReasonChanged() { _flickable.setFlickableFocus(! _duration.valid, _duration.y )} + function onHeparinDispensingRateRejectReasonChanged() { _flickable.setFlickableFocus(! _heparinDispensingRate.valid, _heparinDispensingRate.y )} + function onHeparinBolusVolumeRejectReasonChanged() { _flickable.setFlickableFocus(! _heparinBolusVolume.valid, _heparinBolusVolume.y )} + function onHeparinStopTimeRejectReasonChanged() { _flickable.setFlickableFocus(! _heparinStopTime.valid, _heparinStopTime.y )} + function onSalineBolusVolumeRejectReasonChanged() { _flickable.setFlickableFocus(! _salineBolus.valid, _salineBolus.y )} + function onDialysateTempRejectReasonChanged() { _flickable.setFlickableFocus(! _dialysateTemperature.valid, _dialysateTemperature.y )} + function onVenousPressureLimitLowRejectReasonChanged() { _flickable.setFlickableFocus(! _venousPressureLimits.lowerBoundValid, _venousPressureLimits.y )} + function onVenousPressureLimitHighRejectReasonChanged() { _flickable.setFlickableFocus(! _venousPressureLimits.upperBoundValid, _venousPressureLimits.y )} + function onArterialPressureLimitLowRejectReasonChanged() { _flickable.setFlickableFocus(!_arterialPressureLimits.lowerBoundValid, _arterialPressureLimits.y )} + function onArterialPressureLimitHighRejectReasonChanged() { _flickable.setFlickableFocus(!_arterialPressureLimits.upperBoundValid, _arterialPressureLimits.y )} + function onBloodPressureMeasureIntervalRejectReasonChanged() { _flickable.setFlickableFocus(!_bloodPressureInterval.valid , _bloodPressureInterval.y )} + function onRinsebackFlowRateRejectReasonChanged() { _flickable.setFlickableFocus(!_rinsebackFlowRate.valid , _rinsebackFlowRate.y )} } function setInteractive(vInteractive) { @@ -134,14 +134,13 @@ maximum : vTreatmentRanges.bloodFlowRateMax step : vTreatmentRanges.bloodFlowRateRes value : vTreatmentRanges.bloodFlowRateDef - valid : vTreatmentCreate.bloodFlowRateRejectReason == Variables.fwRejectReasonNONE + valid : !vTreatmentCreate.bloodFlowRateRejectReason onValueChanged : { // Reset the valid state to allow repositioning to the next invalid parameter if(!valid) { - vTreatmentCreate.bloodFlowRateRejectReason = Variables.fwRejectReasonNONE + vTreatmentCreate.bloodFlowRateRejectReason = Variables.noRejectReason } vTreatmentCreate.bloodFlowRate = value - } } SliderCreateTreatment { id: _dialysateFlowRate @@ -153,11 +152,11 @@ maximum : vTreatmentRanges.dialysateFlowRateMax step : vTreatmentRanges.dialysateFlowRateRes value : vTreatmentRanges.dialysateFlowRateDef - valid : vTreatmentCreate.dialysateFlowRateRejectReason == Variables.fwRejectReasonNONE + valid : !vTreatmentCreate.dialysateFlowRateRejectReason onValueChanged : { // Reset the valid state to allow repositioning to the next invalid parameter if(!valid) { - vTreatmentCreate.dialysateFlowRateRejectReason = Variables.fwRejectReasonNONE + vTreatmentCreate.dialysateFlowRateRejectReason = Variables.noRejectReason } vTreatmentCreate.dialysateFlowRate = value } @@ -172,11 +171,11 @@ maximum : vTreatmentRanges.treatmentDurationMax step : vTreatmentRanges.treatmentDurationRes value : vTreatmentRanges.treatmentDurationDef - valid : vTreatmentCreate.treatmentDurationRejectReason == Variables.fwRejectReasonNONE + valid : !vTreatmentCreate.treatmentDurationRejectReason onValueChanged: { // Reset the valid state to allow repositioning to the next invalid parameter if(!valid) { - vTreatmentCreate.treatmentDurationRejectReason = Variables.fwRejectReasonNONE + vTreatmentCreate.treatmentDurationRejectReason = Variables.noRejectReason } vTreatmentCreate.treatmentDuration = value } @@ -223,14 +222,14 @@ maximum : vTreatmentRanges.heparinDispensingRateMax step : vTreatmentRanges.heparinDispensingRateRes value : vTreatmentRanges.heparinDispensingRateDef - valid : vTreatmentCreate.heparinDispensingRateRejectReason == Variables.fwRejectReasonNONE + valid : !vTreatmentCreate.heparinDispensingRateRejectReason adjustable : _heparinDispensingRateSwitch.checked inActiveZero : true enableAdjustButtons: _heparinDispensingRateSwitch.checked onValueChanged: { // Reset the valid state to allow repositioning to the next invalid parameter if(!valid) { - vTreatmentCreate.heparinDispensingRateRejectReason = Variables.fwRejectReasonNONE + vTreatmentCreate.heparinDispensingRateRejectReason = Variables.noRejectReason } vTreatmentCreate.heparinDispensingRate = value } @@ -300,14 +299,14 @@ maximum : vTreatmentRanges.heparinBolusVolumeMax step : vTreatmentRanges.heparinBolusVolumeRes value : vTreatmentRanges.heparinBolusVolumeDef - valid : vTreatmentCreate.heparinBolusVolumeRejectReason == Variables.fwRejectReasonNONE + valid : !vTreatmentCreate.heparinBolusVolumeRejectReason adjustable : _heparinBolusVolumeSwitch.checked inActiveZero : true enableAdjustButtons: _heparinBolusVolumeSwitch.checked onValueChanged : { // Reset the valid state to allow repositioning to the next invalid parameter if(!valid) { - vTreatmentCreate.heparinBolusVolumeRejectReason = Variables.fwRejectReasonNONE + vTreatmentCreate.heparinBolusVolumeRejectReason = Variables.noRejectReason } vTreatmentCreate.heparinBolusVolume = value } @@ -376,13 +375,13 @@ maximum : vTreatmentRanges.heparinStopTimeMax step : vTreatmentRanges.heparinStopTimeRes value : vTreatmentRanges.heparinStopTimeDef - valid : vTreatmentCreate.heparinStopTimeRejectReason == Variables.fwRejectReasonNONE + valid : !vTreatmentCreate.heparinStopTimeRejectReason enabled : false // this switch depends on the heparin dispencing enableAdjustButtons: _heparinDispensingRateSwitch.checked onValueChanged: { // Reset the valid state to allow repositioning to the next invalid parameter if(!valid) { - vTreatmentCreate.heparinStopTimeRejectReason = Variables.fwRejectReasonNONE + vTreatmentCreate.heparinStopTimeRejectReason = Variables.noRejectReason } vTreatmentCreate.heparinStopTime = value } @@ -397,11 +396,11 @@ maximum : vTreatmentRanges.salineBolusVolumeMax step : vTreatmentRanges.salineBolusVolumeRes value : vTreatmentRanges.salineBolusVolumeDef - valid : vTreatmentCreate.salineBolusVolumeRejectReason == Variables.fwRejectReasonNONE + valid : !vTreatmentCreate.salineBolusVolumeRejectReason onValueChanged: { // Reset the valid state to allow repositioning to the next invalid parameter if(!valid) { - vTreatmentCreate.salineBolusVolumeRejectReason = Variables.fwRejectReasonNONE + vTreatmentCreate.salineBolusVolumeRejectReason = Variables.noRejectReason } vTreatmentCreate.salineBolusVolume = value } @@ -455,11 +454,11 @@ maximum : vTreatmentRanges.dialysateTempMax step : vTreatmentRanges.dialysateTempRes value : vTreatmentRanges.dialysateTempDef - valid : vTreatmentCreate.dialysateTempRejectReason == Variables.fwRejectReasonNONE + valid : !vTreatmentCreate.dialysateTempRejectReason onValueChanged: { // Reset the valid state to allow repositioning to the next invalid parameter if(!valid) { - vTreatmentCreate.dialysateTempRejectReason = Variables.fwRejectReasonNONE + vTreatmentCreate.dialysateTempRejectReason = Variables.noRejectReason } vTreatmentCreate.dialysateTemp = value } @@ -525,8 +524,8 @@ upperText.anchors.topMargin : -60 upperTextHorizontalCenter : true - lowerBoundValid: vTreatmentCreate.arterialPressureLimitLowRejectReason == Variables.fwRejectReasonNONE - upperBoundValid: vTreatmentCreate.arterialPressureLimitHighRejectReason == Variables.fwRejectReasonNONE + lowerBoundValid: !vTreatmentCreate.arterialPressureLimitLowRejectReason + upperBoundValid: !vTreatmentCreate.arterialPressureLimitHighRejectReason minText.visible : true minText.font.bold : false @@ -555,7 +554,7 @@ if ( minAdjusted ) { // Reset the valid state to allow repositioning to the next invalid parameter if(!lowerBoundValid) { - vTreatmentCreate.arterialPressureLimitLowRejectReason = Variables.fwRejectReasonNONE + vTreatmentCreate.arterialPressureLimitLowRejectReason = Variables.noRejectReason } vTreatmentCreate.arterialPressureLimitLow = minValue } @@ -564,7 +563,7 @@ if ( maxAdjusted ) { // Reset the valid state to allow repositioning to the next invalid parameter if(!upperBoundValid) { - vTreatmentCreate.arterialPressureLimitHighRejectReason = Variables.fwRejectReasonNONE + vTreatmentCreate.arterialPressureLimitHighRejectReason = Variables.noRejectReason } vTreatmentCreate.arterialPressureLimitHigh = maxValue } @@ -653,8 +652,8 @@ upperText.anchors.topMargin : -60 upperTextHorizontalCenter : true - lowerBoundValid : vTreatmentCreate.venousPressureLimitLowRejectReason == Variables.fwRejectReasonNONE - upperBoundValid : vTreatmentCreate.venousPressureLimitHighRejectReason == Variables.fwRejectReasonNONE + lowerBoundValid : !vTreatmentCreate.venousPressureLimitLowRejectReason + upperBoundValid : !vTreatmentCreate.venousPressureLimitHighRejectReason minText.visible : true minText.font.bold : false @@ -683,7 +682,7 @@ if ( minAdjusted ) { // Reset the valid state to allow repositioning to the next invalid parameter if(!lowerBoundValid) { - vTreatmentCreate.venousPressureLimitLowRejectReason = Variables.fwRejectReasonNONE + vTreatmentCreate.venousPressureLimitLowRejectReason = Variables.noRejectReason } vTreatmentCreate.venousPressureLimitLow = minValue } @@ -692,7 +691,7 @@ if ( maxAdjusted ) { // Reset the valid state to allow repositioning to the next invalid parameter if(!upperBoundValid) { - vTreatmentCreate.venousPressureLimitHighRejectReason = Variables.fwRejectReasonNONE + vTreatmentCreate.venousPressureLimitHighRejectReason = Variables.noRejectReason } vTreatmentCreate.venousPressureLimitHigh = maxValue } @@ -726,14 +725,14 @@ maximum : vTreatmentRanges.bloodPressureMeasureIntervalMax step : vTreatmentRanges.bloodPressureMeasureIntervalRes value : vTreatmentRanges.bloodPressureMeasureIntervalDef - valid : vTreatmentCreate.bloodPressureMeasureIntervalRejectReason == Variables.fwRejectReasonNONE + valid : !vTreatmentCreate.bloodPressureMeasureIntervalRejectReason adjustable : _bloodPressureIntervalSwitch.checked inActiveZero: true enableAdjustButtons: _bloodPressureIntervalSwitch.checked onValueChanged: { // Reset the valid state to allow repositioning to the next invalid parameter if(!valid) { - vTreatmentCreate.bloodPressureMeasureIntervalRejectReason = Variables.fwRejectReasonNONE + vTreatmentCreate.bloodPressureMeasureIntervalRejectReason = Variables.noRejectReason } vTreatmentCreate.bloodPressureMeasureInterval = value } @@ -803,11 +802,11 @@ maximum : vTreatmentRanges.rinsebackFlowRateMax step : vTreatmentRanges.rinsebackFlowRateRes value : vTreatmentRanges.rinsebackFlowRateDef - valid : vTreatmentCreate.rinsebackFlowRateRejectReason == Variables.fwRejectReasonNONE + valid : !vTreatmentCreate.rinsebackFlowRateRejectReason onValueChanged: { // Reset the valid state to allow repositioning to the next invalid parameter if(!valid) { - vTreatmentCreate.rinsebackFlowRateRejectReason = Variables.fwRejectReasonNONE + vTreatmentCreate.rinsebackFlowRateRejectReason = Variables.noRejectReason } vTreatmentCreate.rinsebackFlowRate = value }