Index: leahi.qrc =================================================================== diff -u -r6825a57fe430253271712f0afbac14d046b44794 -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 --- leahi.qrc (.../leahi.qrc) (revision 6825a57fe430253271712f0afbac14d046b44794) +++ leahi.qrc (.../leahi.qrc) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -179,7 +179,7 @@ sources/gui/qml/components/Footer.qml sources/gui/qml/components/TextEntry.qml sources/gui/qml/components/ScrollBar.qml - sources/gui/qml/components/ScrollBar2.qml + sources/gui/qml/components/ScrollBarVH.qml sources/gui/qml/components/FooterStatic.qml sources/gui/qml/components/TimeEntry.qml sources/gui/qml/components/Label.qml Index: sources/gui/qml/AlarmItem.qml =================================================================== diff -u -rfdddcd8b25b5acc99f8c044c998af0e95752063c -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 --- sources/gui/qml/AlarmItem.qml (.../AlarmItem.qml) (revision fdddcd8b25b5acc99f8c044c998af0e95752063c) +++ sources/gui/qml/AlarmItem.qml (.../AlarmItem.qml) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -47,8 +47,6 @@ readonly property alias alarm_AlarmID : vAlarmStatus.alarm_AlarmID readonly property alias hasAlarm : vAlarmStatus.hasAlarm - signal goToPost() - function alarmMinimize() { // The has alarm check has been added here to let other components call this function, // without worrying about the alarmDialog popoing up without an alarm present. @@ -89,21 +87,20 @@ _alarmBar .visible = false } + NotificationDialog { id : _notificationDialog } + Connections { target: _alarmBar function onListClicked ( ) { alarmList () } function onMaximizeClicked ( ) { alarmMaximize () } function onClicked ( ) { alarmMaximize () } function onMuteClicked ( ) { vAlarmStatus.doSilence() } } + Connections { target: vAlarmStatus function onDidAlarmRaise ( ) { alarmMaximize () } function onDidAlarmEmpty ( ) { alarmHide () } } - NotificationDialog { id : _notificationDialog - onGoToPost: _root.goToPost() - } - Connections { target: vAlarmStatus function onAlarm_PriorityChanged ( vValue ) { [ Index: sources/gui/qml/components/ModalDialog.qml =================================================================== diff -u -r2b56995303cc088d8c74a480cb9be88e46899ac9 -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 --- sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision 2b56995303cc088d8c74a480cb9be88e46899ac9) +++ sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -39,7 +39,7 @@ property bool showDropShadow : false property alias backgroundItem : _backgroundItem.children property alias backgroundItemZ : _backgroundItem.z - property bool highPriorityDialog : false + property bool closeOnStateChange : true width : Variables.dialogWidth height : Variables.dialogHeight @@ -90,7 +90,7 @@ // fix closing opened dialogs when opmode is changed Connections { target: vTDOpMode - function onOpModeChanged() { if ( _root.visible && ! _root.highPriorityDialog ) { _root.close() } } + function onOpModeChanged() { if ( _root.visible && _root.closeOnStateChange ) { _root.close() } } } NumberAnimation { id: _autoHideAnimation Fisheye: Tag 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 refers to a dead (removed) revision in file `sources/gui/qml/components/ScrollBar2.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/components/ScrollBarVH.qml =================================================================== diff -u --- sources/gui/qml/components/ScrollBarVH.qml (revision 0) +++ sources/gui/qml/components/ScrollBarVH.qml (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -0,0 +1,71 @@ +/*! + * + * Copyright (c) 2021-2024 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. + * + * \file ScrollBarVH.qml + * \author (last) Vy + * \date (last) 04-Apr-2023 + * \author (original) Behrouz NematiPour + * \date (original) 06-May-2021 + * + */ + +// Qt +import QtQuick 2.12 + + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief the ScrollBar Component + */ + +Rectangle { id: _root + enum Direction { Vertical, Horizontal } + + property int direction : ScrollBarVH.Vertical + property Flickable flickable: undefined + property alias scrollColor : _scrollbar.color + property alias backColor : _root.color + property real scrollMargin : 0 + property alias handleWidth : _scrollbar.width + + width : Variables.dialogRadius + height : Variables.dialogRadius + radius : direction === ScrollBarVH.Horizontal ? height : width + clip : true + color : "transparent" + + Rectangle { id: _scrollbar + readonly property real xPos: (flickable instanceof Flickable) ? flickable.visibleArea.xPosition * parent.width : 0 + readonly property real yPos: (flickable instanceof Flickable) ? flickable.visibleArea.yPosition * parent.height : 0 + readonly property int barWidth: (flickable instanceof Flickable) ? parent.width * flickable.visibleArea.widthRatio : 0 + readonly property int barHeight: (flickable instanceof Flickable) ? parent.height * flickable.visibleArea.heightRatio : 0 + readonly property int minSize: parent.radius * 2 + readonly property int deltaWidth: direction === ScrollBarVH.Horizontal + ? xPos < 0 ? Math.abs(xPos) : Math.max(0, xPos - (parent.width - barWidth)) + : 0 + readonly property int deltaHeight: direction === ScrollBarVH.Vertical + ? yPos < 0 ? Math.abs(yPos) : Math.max(0, yPos - (parent.height - barHeight)) + : 0 + + anchors { + bottom : direction === ScrollBarVH.Horizontal ? parent.bottom : undefined + bottomMargin : direction === ScrollBarVH.Horizontal ? parent.scrollMargin : 0 + right : direction === ScrollBarVH.Horizontal ? undefined : parent.right + rightMargin : direction === ScrollBarVH.Horizontal ? 0 : parent.scrollMargin + } + x : direction === ScrollBarVH.Horizontal ? Math.min(Math.max(0, xPos), parent.width - minSize) : 0 + y : direction === ScrollBarVH.Horizontal ? 0 : Math.min(Math.max(0, yPos), parent.height - minSize) + width : direction === ScrollBarVH.Horizontal ? Math.max(minSize, barWidth - deltaWidth) : parent.width + height : direction === ScrollBarVH.Horizontal ? parent.height : Math.max(minSize, barHeight - deltaHeight) + radius : parent.radius + color : Colors.scrollBarBgColor + } +} Index: sources/gui/qml/dialogs/NotificationDialog.qml =================================================================== diff -u -r2b56995303cc088d8c74a480cb9be88e46899ac9 -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 --- sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision 2b56995303cc088d8c74a480cb9be88e46899ac9) +++ sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -35,10 +35,8 @@ radius : Variables.alarmDialogRadius backgroundColor : Colors.offWhite - highPriorityDialog : true + closeOnStateChange : false - signal goToPost() - enum AlarmPage { AlarmMain , AlarmList @@ -77,8 +75,7 @@ onMuteClicked : vAlarmStatus.doSilence () onResumeClicked : vAlarmStatus.doUserActionResume () onRinsebackClicked : vAlarmStatus.doUserActionRinseback () - onEndClicked : _root.goToPost() -// onEndClicked : vAlarmStatus.doUserActionEnd () + onEndClicked : vAlarmStatus.doUserActionEnd () onTemporaryBreakClicked : vAlarmStatus.doUserActionTemporaryBreak () onOkClicked : vAlarmStatus.doUserActionOk () onListClicked : alarmList () Index: sources/gui/qml/main.qml =================================================================== diff -u -rfdddcd8b25b5acc99f8c044c998af0e95752063c -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 --- sources/gui/qml/main.qml (.../main.qml) (revision fdddcd8b25b5acc99f8c044c998af0e95752063c) +++ sources/gui/qml/main.qml (.../main.qml) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -414,9 +414,7 @@ RinsebackCompleteDialog { id: _rinsebackCompleteDialog } LockDialog { id: _lockDialog } - AlarmItem { id: _alarmItem ; z: 996 - onGoToPost: _mainStack.goToPost() - } + AlarmItem { id: _alarmItem ; z: 996 } PowerItem { id: _powerItem ; z: 997 } ConfirmDialog { id: _confirmDialog ; z: 998 } DiagnosticsDialog { id: _diagnosticsDialog; z: 999 } Index: sources/gui/qml/pages/MainStack.qml =================================================================== diff -u -rfdddcd8b25b5acc99f8c044c998af0e95752063c -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 --- sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision fdddcd8b25b5acc99f8c044c998af0e95752063c) +++ sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -44,10 +44,6 @@ stackView.initialItem : _root.initialItem - function goToPost() { - page( _postTreatmentStack ) - } - // Standby / Disinfection DisinfectStack { id: _disinfectStack } // Pre Treatment @@ -68,7 +64,10 @@ MainInitialization { id: _postModeScreen } MainHome { id: _mainHome - onCreateTreatment : { vPreTreatmentAdjustmentInitTreatment.doInitiate( )} + onCreateTreatment: function (vValue) { + vTreatmentCreate.treatmentModality = vValue + vPreTreatmentAdjustmentInitTreatment.doInitiate( ) + } } Connections { target: vTDOpMode Index: sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml =================================================================== diff -u -r18e4634800357ac1d8bc1da1cad04836ba85d33c -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 --- sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml (.../PostTreatmentBase.qml) (revision 18e4634800357ac1d8bc1da1cad04836ba85d33c) +++ sources/gui/qml/pages/posttreatment/PostTreatmentBase.qml (.../PostTreatmentBase.qml) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -33,11 +33,9 @@ onVisibleChanged: if (visible) { _root.updateModel() } function updateModel () { - let stepName = stepNames[stackStepIndex] - if ( stepName === undefined ) stepName = "" + let stepName = stepNames[stackStepIndex] ?? "" + let group = vSettings.groupFormat(stepName, _root.subStepName.length === 0 ? "" : _root.subStepName ) - let group = vSettings.groupFormat(stepName, _root.subStepName.length === 0 ? "" : _root.subStepName ) - let instructionsGroup = vSettings.instructions[group] if ( instructionsGroup !== undefined ) { Index: sources/gui/qml/pages/posttreatment/PostTreatmentDisconnectStack.qml =================================================================== diff -u -r952d633ac2d84a05dff3355cf864064b21a5ee7e -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 --- sources/gui/qml/pages/posttreatment/PostTreatmentDisconnectStack.qml (.../PostTreatmentDisconnectStack.qml) (revision 952d633ac2d84a05dff3355cf864064b21a5ee7e) +++ sources/gui/qml/pages/posttreatment/PostTreatmentDisconnectStack.qml (.../PostTreatmentDisconnectStack.qml) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -22,28 +22,14 @@ property int subStepIndex: PostTreatmentDisconnectStack.Step.DisconnectPatient - onVisibleChanged: { - if (visible) { - _headerBar.activeStack = stackView - } - else { - stackView.initialItem = null - } - } - signal goToNextStep() function initStack() { page ( _postTreatmentDisconnectPatient ) } - function goToDrain() { - page ( _postTreatmentDrainConsumables ) - } - function continueClicked() { switch ( _root.subStepIndex ) { case PostTreatmentDisconnectStack.Step.DisconnectPatient: vPostTreatmentAdjustmentPatientDisconnectionConfirm.doConfirm() - startNavigationTimer(_postTreatmentDrainConsumables) // TODO remove later with integration break case PostTreatmentDisconnectStack.Step.DrainConsumable: goToNextStep () @@ -79,4 +65,25 @@ PostTreatmentDrainConsumables { id: _postTreatmentDrainConsumables onVisibleChanged : if (visible) { _root.subStepIndex = PostTreatmentDisconnectStack.Step.DrainConsumable } } + + // Confirm Patient Disconnection + Connections { target: vPostTreatmentAdjustmentPatientDisconnectionConfirm + function onAdjustmentTriggered ( vValue ) { + if ( vPostTreatmentAdjustmentPatientDisconnectionConfirm.adjustment_Accepted ) { + _postTreatmentDisconnectPatient.reasonText = "" + page ( _postTreatmentDrainConsumables ) + } else { + _postTreatmentDisconnectPatient.reasonText = vPostTreatmentAdjustmentPatientDisconnectionConfirm.text() + } + } + } + + onVisibleChanged: { + if (visible) { + _headerBar.activeStack = stackView + } + else { + stackView.initialItem = null + } + } } Index: sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml =================================================================== diff -u -rfdddcd8b25b5acc99f8c044c998af0e95752063c -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 --- sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision fdddcd8b25b5acc99f8c044c998af0e95752063c) +++ sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml (.../PostTreatmentStack.qml) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -52,40 +52,19 @@ if (visible) { _mainMenu.hidden = true _headerBar.activeStack = stackView - page( _postTreatmentDisconnectStack) //REMOVE FOR DEMO ONLY } else { stackView.initialItem = null } } - ////////////// TODO Test Code Remove for integration///////////// - Timer { id: _navigationTimer - interval: 2000 - repeat : false - onTriggered: { - if (targetPage) { - page(targetPage) - } - } - } - - property var targetPage - - function startNavigationTimer(pageComponent) { - targetPage = pageComponent - _navigationTimer.restart() - } - ////////////////////////////////////////// - function confirmClicked() { switch ( _root.stackStepIndex ) { case PostTreatmentStack.Disconnect: _postTreatmentDisconnectStack.continueClicked() break case PostTreatmentStack.Remove: vPostTreatmentAdjustmentDisposablesRemovalConfirm.doConfirm() - startNavigationTimer(_postTreatmentReview) // TODO remove later with integration break case PostTreatmentStack.Review: page( _postTreatmentDisinfection ) @@ -238,19 +217,6 @@ function onGoToNextStep () { page ( _postTreatmentRemove )} } - // Confirm Patient Disconnection - Connections { target: vPostTreatmentAdjustmentPatientDisconnectionConfirm - function onAdjustmentTriggered ( vValue ) { - if ( vPostTreatmentAdjustmentPatientDisconnectionConfirm.adjustment_Accepted ) { - _postTreatmentReview.reasonText = "" - _postTreatmentDisconnectStack.goToDrain() - - } else { - _postTreatmentReview.reasonText = vPostTreatmentAdjustmentPatientDisconnectionConfirm.text() - } - } - } - // Auto - Eject Connections { target: vPostTreatmentAdjustmentDisposablesRemovalConfirm function onAdjustmentTriggered ( vValue ) { Index: sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml =================================================================== diff -u -r1286d74bd015276aab604808be2766136091c125 -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 --- sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml (.../PreTreatmentBase.qml) (revision 1286d74bd015276aab604808be2766136091c125) +++ sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml (.../PreTreatmentBase.qml) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -34,11 +34,9 @@ // update model for instruction based steps function updateModel () { - let stepName = stepNames[stackStepIndex] - if ( stepName === undefined ) stepName = "" + let stepName = stepNames[stackStepIndex] ?? "" + let group = vSettings.groupFormat(stepName, vSettings.advancedMode || _root.subStepName.length === 0 ? "" : _root.subStepName ) - let group = vSettings.groupFormat(stepName, vSettings.advancedMode || _root.subStepName.length === 0 ? "" : _root.subStepName ) - let instructionsGroup = vSettings.instructions[group] if ( instructionsGroup !== undefined ) { Index: sources/gui/qml/pages/pretreatment/PreTreatmentInstallStack.qml =================================================================== diff -u -r952d633ac2d84a05dff3355cf864064b21a5ee7e -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 --- sources/gui/qml/pages/pretreatment/PreTreatmentInstallStack.qml (.../PreTreatmentInstallStack.qml) (revision 952d633ac2d84a05dff3355cf864064b21a5ee7e) +++ sources/gui/qml/pages/pretreatment/PreTreatmentInstallStack.qml (.../PreTreatmentInstallStack.qml) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -33,32 +33,12 @@ signal goToNextStep() signal goToPreviousStep() - ////////////// TODO Test Code Remove for integration///////////// - Timer { id: _navigationTimer - interval : 2000 - repeat : false - onTriggered : { - if (targetPage) { - page(targetPage) - } - } - } - - property var targetPage - - function startNavigationTimer(pageComponent) { - targetPage = pageComponent - _navigationTimer.restart() - } - ////////////////////////////////////////// - function initStack() { page ( _preTreatmentBloodSetTubing ) } function continueClicked() { switch ( _root.subStepIndex ) { case PreTreatmentInstallStack.Step.BloodSetTubing: vPreTreatmentAdjustmentDisposablesConfirm.doConfirm() - startNavigationTimer(_preTreatmentBloodLines) // TODO remove later with integration break case PreTreatmentInstallStack.Step.BloodLines: page ( _preTreatmentPressureLinesAndDialyzer ) Index: sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml =================================================================== diff -u -r952d633ac2d84a05dff3355cf864064b21a5ee7e -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 --- sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml (.../PreTreatmentStack.qml) (revision 952d633ac2d84a05dff3355cf864064b21a5ee7e) +++ sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml (.../PreTreatmentStack.qml) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -59,25 +59,6 @@ } } - ////////////// TODO Test Code Remove for integration///////////// - Timer { id: _navigationTimer - interval : 2000 - repeat : false - onTriggered : { - if (targetPage) { - page(targetPage) - } - } - } - - property var targetPage - - function startNavigationTimer(pageComponent) { - targetPage = pageComponent - _navigationTimer.restart() - } - ////////////////////////////////////////// - // dynamically rebuild map 🗺️ when entering pretreatment. // { step key (enum) : step name (string) } -- decided to use 2 parallel list for better indexing function rebuildMap() { @@ -119,8 +100,7 @@ page ( _pretreatmentInstallation ) break case PreTreatmentStack.Step.Installation: - if ( vSettings.advancedMode ) { vPreTreatmentAdjustmentDisposablesConfirm.doConfirm() - startNavigationTimer(_pretreatmentSelfTests) }// TODO remove later with integration + if ( vSettings.advancedMode ) { vPreTreatmentAdjustmentDisposablesConfirm.doConfirm() } else { _pretreatmentInstallation.continueClicked() } break case PreTreatmentStack.Step.SelfTests: Index: sources/gui/qml/pages/treatment/TreatmentTrends.qml =================================================================== diff -u -raacca8cc53f5e4ff5abb6d7df3d5ad48c915645c -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 --- sources/gui/qml/pages/treatment/TreatmentTrends.qml (.../TreatmentTrends.qml) (revision aacca8cc53f5e4ff5abb6d7df3d5ad48c915645c) +++ sources/gui/qml/pages/treatment/TreatmentTrends.qml (.../TreatmentTrends.qml) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -441,7 +441,7 @@ } } - ScrollBar2 { id: _scrollbar + ScrollBarVH { id: _scrollbar objectName: "_scrollbar" anchors { bottom : parent.bottom @@ -452,7 +452,7 @@ rightMargin : Variables.defaultMargin } height : 5 - direction : ScrollBar2.Horizontal + direction : ScrollBarVH.Horizontal scrollColor : "#606060" flickable : _paramList opacity : _paramList.count > _paramList.visibleParamCount @@ -675,7 +675,7 @@ onModelCountChanged: { positionViewAtBeginning() } } - ScrollBar2 { id: _historyScrollbar + ScrollBarVH { id: _historyScrollbar objectName: "_historyScrollbar" anchors { top : _historyList.top @@ -685,7 +685,7 @@ } width : 5 scrollColor : "#606060" - direction : ScrollBar2.Vertical + direction : ScrollBarVH.Vertical flickable : _historyList opacity : _historyList.contentHeight > _historyList.height || _historyList.flicking || _historyList.dragging ? 1 : 0 Index: sources/gui/qml/pages/treatment/sections/TreatmentTime.qml =================================================================== diff -u -rf7f4a55f5476526408708722bad1367c4db79936 -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 --- sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision f7f4a55f5476526408708722bad1367c4db79936) +++ sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -143,13 +143,11 @@ objectName: "notification" anchors { -// left : _timeTitleRect.left -// leftMargin : Variables.defaultMargin - left: undefined - right: undefined + left : undefined + right : undefined horizontalCenter: _root.horizontalCenter - top : _timeTitleRect.bottom - topMargin : Variables.defaultMargin * 3 + top : _timeTitleRect.bottom + topMargin : Variables.defaultMargin * 3 } height : 25