Index: sources/gui/qml/components/Slider.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -rd058eb89be720f349c507886dbd120fb7a775dfb --- sources/gui/qml/components/Slider.qml (.../Slider.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/components/Slider.qml (.../Slider.qml) (revision d058eb89be720f349c507886dbd120fb7a775dfb) @@ -203,7 +203,7 @@ radius : diameter color : Colors.highlightProgressBar border { - width: 4 + width: Variables.progressbarHandlerBorderWidth color: Colors.textMain } } Index: sources/gui/qml/components/SliderCreateTreatment.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -rd058eb89be720f349c507886dbd120fb7a775dfb --- sources/gui/qml/components/SliderCreateTreatment.qml (.../SliderCreateTreatment.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/components/SliderCreateTreatment.qml (.../SliderCreateTreatment.qml) (revision d058eb89be720f349c507886dbd120fb7a775dfb) @@ -27,6 +27,7 @@ Rectangle { id: _root property Flickable flickable: null + property alias adjustable : _slider.enabled property alias label : _label.text property alias decimal : _slider.decimal property alias minimum : _slider.minimum Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r86e9dfbff50cb7e16fd94c16c1c818cef3b47eac -rd058eb89be720f349c507886dbd120fb7a775dfb --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 86e9dfbff50cb7e16fd94c16c1c818cef3b47eac) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision d058eb89be720f349c507886dbd120fb7a775dfb) @@ -76,6 +76,7 @@ readonly property int progressbarHeight : 30 readonly property int progressbarHandler : 35 + readonly property int progressbarHandlerBorderWidth : 4 readonly property int progressbarFluidHeight : 5 readonly property int progressbarSmall : 5 @@ -172,13 +173,13 @@ // - Artrial // - Artrial - Entire pressure value range readonly property int arterialValueMin : -400; ///< PRS362 const - readonly property int arterialValueMax : +600; ///< PRS362 const + readonly property int arterialValueMax : +100; ///< PRS362 const // - Artrial - Adjust pressure limit range and manufacturing default - Low readonly property int arterialLimitLowMin : -300; ///< PRS354 const - readonly property int arterialLimitLowMax : -30; ///< PRS354 const + readonly property int arterialLimitLowMax : +70; ///< PRS354 const // - Artrial - Adjust pressure limit range and manufacturing default - High readonly property int arterialLimitHighMin : -270; ///< PRS355 const - readonly property int arterialLimitHighMax : 0; ///< PRS355 const + readonly property int arterialLimitHighMax : +100; ///< PRS355 const // - Artrial - Adjust pressure limit resolution readonly property int arterialLimitStep : +10; ///< PRS354,PRS355 // has to be the same since it's on the same line scale readonly property int arterialLimitGap : +30; Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -r7e503c5459ec77a2816d6c7789da9b206cedbe8a -rd058eb89be720f349c507886dbd120fb7a775dfb --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 7e503c5459ec77a2816d6c7789da9b206cedbe8a) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision d058eb89be720f349c507886dbd120fb7a775dfb) @@ -109,6 +109,49 @@ onReleased : vTreatmentCreate.duration = value } +// ToDo: create a component for this, +// This is a full implementation of a CheckBox +// Switch { id: _heparinDelivery +// text: qsTr("Heparin Delivery") +// width : Variables.createTreatmentSliderWidth + 25 + +// anchors.horizontalCenter: parent.horizontalCenter + +// indicator: Rectangle { +// implicitWidth : Variables.sliderCircleDiameter * 1.7 +// implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) +// radius : implicitHeight +// x : _heparinDelivery.leftPadding +// y : parent.height / 2 - height / 2 +// color : _heparinDelivery.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive +// border.color : _heparinDelivery.checked ? Colors.borderButton : Colors.createTreatmentInactive +// Rectangle { id: _handler +// property real diameter : Variables.sliderCircleDiameter + +// x: _heparinDelivery.checked ? parent.width - width : 0 +// anchors.verticalCenter: parent.verticalCenter +// width : diameter +// height : diameter +// radius : diameter +// color : _heparinDelivery.checked ? Colors.highlightProgressBar : Colors.createTreatmentInactive +// border { +// width: 4 +// color: Colors.textMain +// } +// } +// } + +// contentItem: Text { +// enabled: _heparinDelivery.checked +// text: _heparinDelivery.text +// font: _heparinDelivery.font +// opacity: enabled ? 1.0 : 0.3 +// color : Colors.textButton +// verticalAlignment: Text.AlignVCenter +// leftPadding: _heparinDelivery.indicator.width + _heparinDelivery.spacing +// } +// } + SliderCreateTreatment { id: _heparinDispensingRate objectName : "_heparinDispensingRate" label : qsTr("Heparin Dispensing Rate") @@ -121,6 +164,57 @@ step : vTreatmentCreate.heparinDispensingRateRes onPressed : vTreatmentCreate.heparinDispensingRate = value onReleased : vTreatmentCreate.heparinDispensingRate = value + adjustable : _heparinDispensingRateSwitch.checked + + Switch { id: _heparinDispensingRateSwitch + property bool active: false + onCheckedChanged: { + if ( ! active ) { + active = true + checked = ! checked + } + _heparinDispensingRate.value = 0 + _heparinDispensingRate.active = ! checked + } + + x : width * -2 + y : parent.height - 13 // (height / 2) + width : indicator.width + indicator: Rectangle { + implicitWidth : Variables.sliderCircleDiameter * 1.7 + implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) + radius : implicitHeight + x : _heparinDispensingRateSwitch.leftPadding + y : parent.height / 2 - height / 2 + color : _heparinDispensingRateSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive + border.color : _heparinDispensingRateSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive + Rectangle { + property real diameter : Variables.sliderCircleDiameter + + x: _heparinDispensingRateSwitch.checked ? parent.width - width : 0 + anchors.verticalCenter: parent.verticalCenter + width : diameter + height : diameter + radius : diameter + color : _heparinDispensingRateSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive + border { + width: Variables.progressbarHandlerBorderWidth + color: Colors.textMain + } + } + } + + contentItem: Text { + width : _heparinDispensingRateSwitch.width + text : _heparinDispensingRateSwitch.checked ? qsTr("ON") : qsTr("OFF") + font : _heparinDispensingRateSwitch.font + color : _heparinDispensingRateSwitch.active ? Colors.textMain : Colors.textDisableButton + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + anchors.bottom: _heparinDispensingRateSwitch.top + anchors.bottomMargin: 12 + } + } } SliderCreateTreatment { id: _heparinBolusVolume @@ -135,6 +229,57 @@ step : vTreatmentCreate.heparinBolusVolumeRes onPressed : vTreatmentCreate.heparinBolusVolume = value onReleased : vTreatmentCreate.heparinBolusVolume = value + adjustable : _heparinBolusVolumeSwitch.checked + + Switch { id: _heparinBolusVolumeSwitch + property bool active: false + onCheckedChanged: { + if ( ! active ) { + active = true + checked = ! checked + } + _heparinBolusVolume.value = 0 + _heparinBolusVolume.active = ! checked + } + + x : width * -2 + y : parent.height - 13 // (height / 2) + width : indicator.width + indicator: Rectangle { + implicitWidth : Variables.sliderCircleDiameter * 1.7 + implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) + radius : implicitHeight + x : _heparinBolusVolumeSwitch.leftPadding + y : parent.height / 2 - height / 2 + color : _heparinBolusVolumeSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive + border.color : _heparinBolusVolumeSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive + Rectangle { + property real diameter : Variables.sliderCircleDiameter + + x: _heparinBolusVolumeSwitch.checked ? parent.width - width : 0 + anchors.verticalCenter: parent.verticalCenter + width : diameter + height : diameter + radius : diameter + color : _heparinBolusVolumeSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive + border { + width: Variables.progressbarHandlerBorderWidth + color: Colors.textMain + } + } + } + + contentItem: Text { + width : _heparinBolusVolumeSwitch.width + text : _heparinBolusVolumeSwitch.checked ? qsTr("ON") : qsTr("OFF") + font : _heparinBolusVolumeSwitch.font + color : _heparinBolusVolumeSwitch.active ? Colors.textMain : Colors.textDisableButton + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + anchors.bottom: _heparinBolusVolumeSwitch.top + anchors.bottomMargin: 12 + } + } } SliderCreateTreatment { id: _heparinStopTime Index: sources/model/hd/alarm/MAlarmMapping.cpp =================================================================== diff -u -ra5fe0c9504558ddafc2af2ccd852b8f311a00616 -rd058eb89be720f349c507886dbd120fb7a775dfb --- sources/model/hd/alarm/MAlarmMapping.cpp (.../MAlarmMapping.cpp) (revision a5fe0c9504558ddafc2af2ccd852b8f311a00616) +++ sources/model/hd/alarm/MAlarmMapping.cpp (.../MAlarmMapping.cpp) (revision d058eb89be720f349c507886dbd120fb7a775dfb) @@ -7,7 +7,7 @@ * * \file MAlarmMapping.cpp * \author (last) Behrouz NematiPour - * \date (last) 12-Jul-2022 + * \date (last) 19-Jul-2022 * \author (original) Behrouz NematiPour * \date (original) 03-May-2021 * Index: sources/view/VTreatmentCreate.h =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -rd058eb89be720f349c507886dbd120fb7a775dfb --- sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision d058eb89be720f349c507886dbd120fb7a775dfb) @@ -81,43 +81,43 @@ static constexpr quint32 bloodFlowRate_Min = 100 ; // PRS 30 static constexpr quint32 bloodFlowRate_Max = 500 ; // PRS 30 static constexpr quint32 bloodFlowRate_Res = 25 ; // PRS 30 - static constexpr quint32 bloodFlowRate_Def = bloodFlowRate_Min ; // PRS 30 + static constexpr quint32 bloodFlowRate_Def = 100 ; // PRS 30 // mL/min static constexpr quint32 dialysateFlowRate_Min = 100 ; // PRS 345 static constexpr quint32 dialysateFlowRate_Max = 600 ; // PRS 345 static constexpr quint32 dialysateFlowRate_Res = 50 ; // PRS 345 - static constexpr quint32 dialysateFlowRate_Def = dialysateFlowRate_Min ; // PRS 345 + static constexpr quint32 dialysateFlowRate_Def = 100 ; // PRS 345 // minutes static constexpr quint32 duration_Min = 60 ; // PRS 346 static constexpr quint32 duration_Max = 480 ; // PRS 346 static constexpr quint32 duration_Res = 15 ; // PRS 346 - static constexpr quint32 duration_Def = duration_Min ; // PRS 346 + static constexpr quint32 duration_Def = 60 ; // PRS 346 // mL/hr (0 = off) - static constexpr qreal heparinDispensingRate_Min = 0.0 ; // PRS 347 + static constexpr qreal heparinDispensingRate_Min = 0.2 ; // PRS 347 static constexpr qreal heparinDispensingRate_Max = 1.0 ; // PRS 347 static constexpr qreal heparinDispensingRate_Res = 0.1 ; // PRS 347 - static constexpr qreal heparinDispensingRate_Def = heparinDispensingRate_Min ; // PRS 347 + static constexpr qreal heparinDispensingRate_Def = 0.0 ; // PRS 347 // mL - static constexpr qreal heparinBolusVolume_Min = 0.0 ; // PRS 348 + static constexpr qreal heparinBolusVolume_Min = 0.2 ; // PRS 348 static constexpr qreal heparinBolusVolume_Max = 2.0 ; // PRS 348 static constexpr qreal heparinBolusVolume_Res = 0.1 ; // PRS 348 - static constexpr qreal heparinBolusVolume_Def = heparinBolusVolume_Min ; // PRS 348 + static constexpr qreal heparinBolusVolume_Def = 0.0 ; // PRS 348 // min static constexpr quint32 heparinStopTime_Min = 0 ; // PRS 464 - static constexpr quint32 heparinStopTime_Max = 470 ; // PRS 464 + static constexpr quint32 heparinStopTime_Max = 480 ; // PRS 464 static constexpr quint32 heparinStopTime_Res = 10 ; // PRS 464 - static constexpr quint32 heparinStopTime_Def = heparinStopTime_Min ; // PRS 464 + static constexpr quint32 heparinStopTime_Def = 0 ; // PRS 464 // mL static constexpr quint32 salineBolusVolume_Min = 100 ; // PRS 350 static constexpr quint32 salineBolusVolume_Max = 300 ; // PRS 350 static constexpr quint32 salineBolusVolume_Res = 100 ; // PRS 350 - static constexpr quint32 salineBolusVolume_Def = salineBolusVolume_Min ; // PRS 350 + static constexpr quint32 salineBolusVolume_Def = 100 ; // PRS 350 static constexpr quint32 heparinType_Res = 1 ; // PRS ??? static constexpr quint32 acidConcentrate_Res = 1 ; // PRS 35 @@ -128,43 +128,43 @@ static constexpr qreal dialysateTemp_Min = 35 ; // PRS 353 static constexpr qreal dialysateTemp_Max = 37 ; // PRS 353 static constexpr qreal dialysateTemp_Res = 0.5 ; // PRS 353 - static constexpr qreal dialysateTemp_Def = dialysateTemp_Min ; // PRS 353 + static constexpr qreal dialysateTemp_Def = 35 ; // PRS 353 // mmHg static constexpr qint32 arterialPressureLimitLow_Min = -300 ; // PRS 354 - static constexpr qint32 arterialPressureLimitLow_Max = -30 ; // PRS 354 + static constexpr qint32 arterialPressureLimitLow_Max = +70 ; // PRS 354 static constexpr qint32 arterialPressureLimitLow_Res = 10 ; // PRS 354 - static constexpr qint32 arterialPressureLimitLow_Def = arterialPressureLimitLow_Min ; // PRS 354 + static constexpr qint32 arterialPressureLimitLow_Def = 100 ; // PRS 354 // mmHg static constexpr qint32 arterialPressureLimitHigh_Min = -270 ; // PRS 355 - static constexpr qint32 arterialPressureLimitHigh_Max = 0 ; // PRS 355 + static constexpr qint32 arterialPressureLimitHigh_Max = 100 ; // PRS 355 static constexpr qint32 arterialPressureLimitHigh_Res = 10 ; // PRS 355 - static constexpr qint32 arterialPressureLimitHigh_Def = arterialPressureLimitHigh_Min ; // PRS 355 + static constexpr qint32 arterialPressureLimitHigh_Def = 100 ; // PRS 355 // mmHg static constexpr qint32 venousPressureLimitLow_Min = 20 ; // PRS 356 static constexpr qint32 venousPressureLimitLow_Max = 570 ; // PRS 356 static constexpr qint32 venousPressureLimitLow_Res = 10 ; // PRS 356 - static constexpr qint32 venousPressureLimitLow_Def = venousPressureLimitLow_Min ; // PRS 356 + static constexpr qint32 venousPressureLimitLow_Def = 20 ; // PRS 356 // mmHg static constexpr qint32 venousPressureLimitHigh_Min = 50 ; // PRS 357 static constexpr qint32 venousPressureLimitHigh_Max = 600 ; // PRS 357 static constexpr qint32 venousPressureLimitHigh_Res = 10 ; // PRS 357 - static constexpr qint32 venousPressureLimitHigh_Def = venousPressureLimitHigh_Min ; // PRS 357 + static constexpr qint32 venousPressureLimitHigh_Def = 400 ; // PRS 357 // min static constexpr quint32 bloodPressureMeasureInterval_Min = 0 ; // PRS 358 static constexpr quint32 bloodPressureMeasureInterval_Max = 60 ; // PRS 358 static constexpr quint32 bloodPressureMeasureInterval_Res = 5 ; // PRS 358 - static constexpr quint32 bloodPressureMeasureInterval_Def = bloodPressureMeasureInterval_Min ; // PRS 358 + static constexpr quint32 bloodPressureMeasureInterval_Def = 0 ; // PRS 358 // mL/min static constexpr quint32 rinsebackFlowRate_Min = 50 ; // PRS 359 static constexpr quint32 rinsebackFlowRate_Max = 150 ; // PRS 359 static constexpr quint32 rinsebackFlowRate_Res = 25 ; // PRS 359 - static constexpr quint32 rinsebackFlowRate_Def = rinsebackFlowRate_Min ; // PRS 359 + static constexpr quint32 rinsebackFlowRate_Def = 50 ; // PRS 359 enum ACID_ENUM { eAcidUnset = 9999,