Index: main.cpp =================================================================== diff -u -r124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4 -r2e7d498210ba1837f0d77c23c62bf2cf43a26112 --- main.cpp (.../main.cpp) (revision 124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4) +++ main.cpp (.../main.cpp) (revision 2e7d498210ba1837f0d77c23c62bf2cf43a26112) @@ -380,7 +380,7 @@ gActiveCANBus = value; } } - + //DEBUG: qDebug() << "App can" << gActiveCANBus << gEnableDryDemo; if (parser.isSet(optionSendEmptyKeepAwake)) gSendEmptyKeepAwake = true; bool ok = false; Index: sources/gui/qml/PowerItem.qml =================================================================== diff -u -r07d06c2d00ca6f4d7a8246a3405e77961ff393dc -r2e7d498210ba1837f0d77c23c62bf2cf43a26112 --- sources/gui/qml/PowerItem.qml (.../PowerItem.qml) (revision 07d06c2d00ca6f4d7a8246a3405e77961ff393dc) +++ sources/gui/qml/PowerItem.qml (.../PowerItem.qml) (revision 2e7d498210ba1837f0d77c23c62bf2cf43a26112) @@ -1,6 +1,6 @@ /*! * - * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * Copyright (c) 2021-2025 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. Index: sources/gui/qml/SDCProgressItem.qml =================================================================== diff -u -r124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4 -r2e7d498210ba1837f0d77c23c62bf2cf43a26112 --- sources/gui/qml/SDCProgressItem.qml (.../SDCProgressItem.qml) (revision 124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4) +++ sources/gui/qml/SDCProgressItem.qml (.../SDCProgressItem.qml) (revision 2e7d498210ba1837f0d77c23c62bf2cf43a26112) @@ -50,7 +50,7 @@ topMargin : 5 rightMargin : 5 } - width : 30 + width : _GuiView.dryDemoMode ? 40 : 30 height: width radius: width Text { id: _percent Index: sources/gui/qml/components/GridSelection.qml =================================================================== diff -u -rdfd4fe3e511308ddd0e6ad9f93cc1d980d22e933 -r2e7d498210ba1837f0d77c23c62bf2cf43a26112 --- sources/gui/qml/components/GridSelection.qml (.../GridSelection.qml) (revision dfd4fe3e511308ddd0e6ad9f93cc1d980d22e933) +++ sources/gui/qml/components/GridSelection.qml (.../GridSelection.qml) (revision 2e7d498210ba1837f0d77c23c62bf2cf43a26112) @@ -1,6 +1,6 @@ /*! * - * Copyright (c) 2020-2024 Diality Inc. - All Rights Reserved. + * Copyright (c) 2020-2025 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. Index: sources/gui/qml/components/SliderCreateTreatment.qml =================================================================== diff -u -r124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4 -r2e7d498210ba1837f0d77c23c62bf2cf43a26112 --- sources/gui/qml/components/SliderCreateTreatment.qml (.../SliderCreateTreatment.qml) (revision 124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4) +++ sources/gui/qml/components/SliderCreateTreatment.qml (.../SliderCreateTreatment.qml) (revision 2e7d498210ba1837f0d77c23c62bf2cf43a26112) @@ -60,9 +60,9 @@ reset(defaultValue) if ( toggleSwich ) { toggleSwich.checked = false - toggleSwich.active = false + toggleSwich.active = _GuiView.dryDemoMode } - _root.active = false + _root.active = _GuiView.dryDemoMode } function reset(vValue) { @@ -132,6 +132,7 @@ touchMargin : Variables.createTreatmentSliderMargin handlerColor : Colors.createTreatmentInactive handlerVisible : _root.adjustable + // The slider is active by default if dryDemoMode is enables isActive : _root.active ticks : true onDragged : { setInteractive(false) ; ; } Index: sources/gui/qml/compounds/BPHREntry.qml =================================================================== diff -u -reae47411318bcf48addb424f3c2fedcd4d7b92f5 -r2e7d498210ba1837f0d77c23c62bf2cf43a26112 --- sources/gui/qml/compounds/BPHREntry.qml (.../BPHREntry.qml) (revision eae47411318bcf48addb424f3c2fedcd4d7b92f5) +++ sources/gui/qml/compounds/BPHREntry.qml (.../BPHREntry.qml) (revision 2e7d498210ba1837f0d77c23c62bf2cf43a26112) @@ -1,6 +1,6 @@ /*! * - * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * Copyright (c) 2021-2025 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. Index: sources/gui/qml/main.qml =================================================================== diff -u -r124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4 -r2e7d498210ba1837f0d77c23c62bf2cf43a26112 --- sources/gui/qml/main.qml (.../main.qml) (revision 124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4) +++ sources/gui/qml/main.qml (.../main.qml) (revision 2e7d498210ba1837f0d77c23c62bf2cf43a26112) @@ -394,11 +394,7 @@ // TODO: disable this later. this is only for diagnostic purpose. onDoubleClicked : { if ( _GuiView.dryDemoMode ) { - let dryDemoTempID = 99 - let id = vConfirm.id - vConfirm.id = dryDemoTempID - vConfirm.doConfirm( true ) - vConfirm.id = id + _dryDemoDialog.open() } else { _diagnosticsDialog.open() @@ -413,6 +409,7 @@ PowerItem { id: _powerItem ; z: 997 } ConfirmDialog { id: _confirmDialog ; z: 998 } DiagnosticsDialog { id: _diagnosticsDialog; z: 999 } + DryDemoDialog { id: _dryDemoDialog ; z: 999 } // Same z order because diagnostics is not used in dryDemo // Note: NotificationBar has to be anchored to the main menu and if it is moved into the AlarmItem // then cannot be anchored. Index: sources/gui/qml/pages/pretreatment/connection/PreTreatmentConnectionStack.qml =================================================================== diff -u -r40c81d8364424610feeffeb5ac30e990105c8c00 -r2e7d498210ba1837f0d77c23c62bf2cf43a26112 --- sources/gui/qml/pages/pretreatment/connection/PreTreatmentConnectionStack.qml (.../PreTreatmentConnectionStack.qml) (revision 40c81d8364424610feeffeb5ac30e990105c8c00) +++ sources/gui/qml/pages/pretreatment/connection/PreTreatmentConnectionStack.qml (.../PreTreatmentConnectionStack.qml) (revision 2e7d498210ba1837f0d77c23c62bf2cf43a26112) @@ -1,6 +1,6 @@ /*! * - * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. + * Copyright (c) 2021-2025 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. Index: sources/gui/qml/pages/pretreatment/connection/PreTreatmentUltrafiltration.qml =================================================================== diff -u -r124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4 -r2e7d498210ba1837f0d77c23c62bf2cf43a26112 --- sources/gui/qml/pages/pretreatment/connection/PreTreatmentUltrafiltration.qml (.../PreTreatmentUltrafiltration.qml) (revision 124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4) +++ sources/gui/qml/pages/pretreatment/connection/PreTreatmentUltrafiltration.qml (.../PreTreatmentUltrafiltration.qml) (revision 2e7d498210ba1837f0d77c23c62bf2cf43a26112) @@ -29,9 +29,16 @@ PreTreatmentBase { id: _root objectName: "_PreTreatmentUltrafiltration" - property alias ufVolume : _volumeSlider.value + property alias ufVolume : _volumeSlider.value header.confirmEnabled: _volumeSlider.isActive + onVisibleChanged: { + /* + It is only for the dry-demo due to its independent flow. + Otherwise, won't needed in the normal designed user-flow. + */ + clear() + } function reset( vValue ) { if ( ! handleMinimum( vValue ) ) // if not handled go next @@ -40,8 +47,8 @@ } function clear() { - _volumeSlider.reset ( _volumeSlider.defaultValue ) - _volumeSlider.isActive = false + _volumeSlider.reset ( _GuiView.dryDemoMode ? 2 : _volumeSlider.defaultValue ) + _volumeSlider.isActive = _GuiView.dryDemoMode } function handleMinimum( vValue ) { @@ -95,7 +102,8 @@ top: parent.top topMargin: 425 } - isActive: false + // The UF is active by default if the dryDemoMode + isActive: _GuiView.dryDemoMode width : Variables.ultrafiltrationProgressbarWidth step : 0.100 stepSnap: true @@ -136,5 +144,4 @@ _volumeSlider.isActive = true } } - } Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -r124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4 -r2e7d498210ba1837f0d77c23c62bf2cf43a26112 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 2e7d498210ba1837f0d77c23c62bf2cf43a26112) @@ -29,6 +29,9 @@ */ PreTreatmentBase { id: _root objectName: "_PreTreatmentCreate" // SquishQt testability + readonly property int bloodFlowRateDef : 400 + readonly property int dialysateFlowRateDef : 600 + readonly property int treatmentDurationDef : 240 header.confirmEnabled: _bloodFlowRate .active && _bloodFlowRate . valid && @@ -134,7 +137,7 @@ anchors.rightMargin : Variables.minVGap } - Flickable { id: _flickable + Flickable { id: _flickable objectName: "TreatmentCreateFlickable" clip: true anchors { @@ -170,7 +173,8 @@ minimum : vTreatmentRanges.bloodFlowRateMin maximum : vTreatmentRanges.bloodFlowRateMax step : vTreatmentRanges.bloodFlowRateRes - defaultValue: vTreatmentRanges.bloodFlowRateDef + defaultValue: _GuiView.dryDemoMode ? _root .bloodFlowRateDef : + vTreatmentRanges.bloodFlowRateDef valid : !vTreatmentCreate.bloodFlowRateRejectReason onValueChanged : { // Reset the valid state to allow repositioning to the next invalid parameter @@ -189,8 +193,9 @@ minimum : vTreatmentRanges.dialysateFlowRateMin maximum : vTreatmentRanges.dialysateFlowRateMax step : vTreatmentRanges.dialysateFlowRateRes - defaultValue: vTreatmentRanges.dialysateFlowRateDef - valid : !vTreatmentCreate.dialysateFlowRateRejectReason + defaultValue: _GuiView.dryDemoMode ? _root .dialysateFlowRateDef : + vTreatmentRanges.dialysateFlowRateDef + valid : !vTreatmentCreate.dialysateFlowRateRejectReason onValueChanged : { // Reset the valid state to allow repositioning to the next invalid parameter if(!valid) { @@ -208,7 +213,8 @@ minimum : vTreatmentRanges.treatmentDurationMin maximum : vTreatmentRanges.treatmentDurationMax step : vTreatmentRanges.treatmentDurationRes - defaultValue: vTreatmentRanges.treatmentDurationDef + defaultValue: _GuiView.dryDemoMode ? _root .treatmentDurationDef : + vTreatmentRanges.treatmentDurationDef valid : !vTreatmentCreate.treatmentDurationRejectReason onValueChanged: { // Reset the valid state to allow repositioning to the next invalid parameter @@ -433,7 +439,7 @@ minimum : vTreatmentRanges.salineBolusVolumeMin maximum : vTreatmentRanges.salineBolusVolumeMax step : vTreatmentRanges.salineBolusVolumeRes - defaultValue: vTreatmentRanges.salineBolusVolumeDef + defaultValue: _GuiView.dryDemoMode ? 200 : vTreatmentRanges.salineBolusVolumeDef valid : !vTreatmentCreate.salineBolusVolumeRejectReason onValueChanged: { // Reset the valid state to allow repositioning to the next invalid parameter @@ -512,7 +518,7 @@ minimum : vTreatmentRanges.dialysateTempMin maximum : vTreatmentRanges.dialysateTempMax step : vTreatmentRanges.dialysateTempRes - defaultValue: vTreatmentRanges.dialysateTempDef + defaultValue: _GuiView.dryDemoMode ? 37.0 : vTreatmentRanges.dialysateTempDef valid : !vTreatmentCreate.dialysateTempRejectReason onValueChanged: { Index: sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml =================================================================== diff -u -r124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4 -r2e7d498210ba1837f0d77c23c62bf2cf43a26112 --- sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml (.../TreatmentVitals.qml) (revision 124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4) +++ sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml (.../TreatmentVitals.qml) (revision 2e7d498210ba1837f0d77c23c62bf2cf43a26112) @@ -26,29 +26,37 @@ * \brief Treatment Screen Vitals section */ TouchArea { id: _root - readonly property string bloodSDSeparator: " / " + readonly property string bloodSDSeparator : " / " + readonly property int dryDemoSystolicMMHGDef : 140 + readonly property int dryDemoDiastolicMMHGDef : 90 + readonly property int dryDemoHearRateBPMDef : 80 + readonly property string systolic : Variables.notSetVariable(vTreatmentVitals.systolic, 2) + readonly property string diastolic : Variables.notSetVariable(vTreatmentVitals.diastolic, 2) + readonly property string heartRate : Variables.notSetVariable(vTreatmentVitals.heartRate, 2) + x: 0 y: 0 title: qsTr("VITALS") Column { anchors.top: _root.top anchors.topMargin: 60 - TextRect { id: _bloodPressure + TextRect { id: _bloodPressure labelHeight: 60 labelFont.pixelSize: Fonts.fontPixelVitals labelFont.weight: Font.ExtraLight labelAutoSize: true - label: Variables.notSetVariable(vTreatmentVitals.systolic, 2) + bloodSDSeparator + Variables.notSetVariable(vTreatmentVitals.diastolic, 2) + label: (_GuiView.dryDemoMode && systolic === Variables.notSetVariable(vTreatmentVitals.systolic, 2) ? _root.dryDemoSystolicMMHGDef : systolic) + bloodSDSeparator + + (_GuiView.dryDemoMode && diastolic === Variables.notSetVariable(vTreatmentVitals.diastolic, 2) ? _root.dryDemoDiastolicMMHGDef : diastolic) extra: Variables.unitTextBloodPressure } TextRect { id: _heartBeat labelHeight: 40 labelFont.pixelSize: Fonts.fontPixelVitals labelFont.weight: Font.ExtraLight labelAutoSize: true - label: Variables.notSetVariable(vTreatmentVitals.heartRate, 2) + label: (_GuiView.dryDemoMode && heartRate == "__" ? _root.dryDemoHearRateBPMDef : heartRate) extra: Variables.unitTextHeartBeat } } Index: sources/view/confirm/VConfirm.cpp =================================================================== diff -u -r124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4 -r2e7d498210ba1837f0d77c23c62bf2cf43a26112 --- sources/view/confirm/VConfirm.cpp (.../VConfirm.cpp) (revision 124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4) +++ sources/view/confirm/VConfirm.cpp (.../VConfirm.cpp) (revision 2e7d498210ba1837f0d77c23c62bf2cf43a26112) @@ -42,7 +42,6 @@ GuiConfirmCommand cmd = static_cast( _command ); visible( ( cmd == GuiConfirmCommand::GENERIC_CONFIRM_CMD_REQUEST_OPEN || cmd == GuiConfirmCommand::GENERIC_CONFIRM_CMD_REJECT ) ); - switch ( cmd ) { case GuiConfirmCommand::GENERIC_CONFIRM_CMD_REQUEST_OPEN : adjustment_Reason ( GuiConfirmId::GENERIC_CONFIRM_ID_NONE ); @@ -93,6 +92,18 @@ id ( vData.mId ); } +void View::VConfirm::sendDryDemoCommand(quint32 vCommandID) +{ + enum Command_Num { + DRY_DEMO_COMMAND = 99 + }; + + DuetConfirmUIrData data; + data.mId = DRY_DEMO_COMMAND; + data.mConfirm = vCommandID; + emit didAdjustment(data); +} + /*! * \brief View::VConfirm::setPowerOffCommand */ @@ -125,6 +136,18 @@ id ( 0 ); } +void View::VConfirm::setDryDemoStatus(const DuetConfirmHDiData &vData) +{ + enum User_Command_ID { + CMD_ULTRAFILTRATION = 7, + CMD_CONNECTION = 8, + }; + + if ( ! gEnableDryDemo ) return; + isUltrafilt (vData.mId == CMD_ULTRAFILTRATION); + isConnection(vData.mId == CMD_CONNECTION ); +} + /*! * \brief VConfirm::onActionReceive * \details received response model data handler @@ -133,9 +156,9 @@ void View::VConfirm::onActionReceive(const DuetConfirmHDiData &vData) { isPowerOff(false ); - setConfirmCommand ( vData ); setConfirmId ( vData ); + setDryDemoStatus ( vData ); // *** has to be the last to let the information to be set and then emit the signal *** // *** otherwise will use the Previous values before being set. *** Index: sources/view/confirm/VConfirm.h =================================================================== diff -u -r124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4 -r2e7d498210ba1837f0d77c23c62bf2cf43a26112 --- sources/view/confirm/VConfirm.h (.../VConfirm.h) (revision 124c2e38e72a1a655d9d479c9c7a1cd8c5d5e6c4) +++ sources/view/confirm/VConfirm.h (.../VConfirm.h) (revision 2e7d498210ba1837f0d77c23c62bf2cf43a26112) @@ -69,6 +69,9 @@ PROPERTY(bool , isReject , 0) PROPERTY(bool , isAccept , 0) + PROPERTY(bool , isUltrafilt , 0) + PROPERTY(bool , isConnection , 0) + TRIGGER (bool , visible , 0) IDBASED (QString , title ,tr("Confirm" ), confirms, id) @@ -82,14 +85,16 @@ void setPowerOffCommand (); void setPowerOffId (); + void setDryDemoStatus (const DuetConfirmHDiData &vData); VIEW_DEC_CLASS (VConfirm ) VIEW_DEC_SLOT (DuetConfirmHDiData ) VIEW_DEC_SLOT (PowerOffData ) VIEW_DEC_SLOT (SettingsData ) public slots: - void doConfirm(bool vConfirm); + void doConfirm (bool vConfirm ); + void sendDryDemoCommand (quint32 vCommandID ); signals: /*! @@ -98,6 +103,5 @@ * \param vData - data model includes request information */ void didAdjustment(const DuetConfirmUIrData &vData); - }; }