Index: sources/gui/qml/components/StepIndicator.qml =================================================================== diff -u -r09ec5af58d98d8cd337359482e81045052a5c264 -r52d17dab2211c2e4d9160c55c316ad7a40ce4d6c --- sources/gui/qml/components/StepIndicator.qml (.../StepIndicator.qml) (revision 09ec5af58d98d8cd337359482e81045052a5c264) +++ sources/gui/qml/components/StepIndicator.qml (.../StepIndicator.qml) (revision 52d17dab2211c2e4d9160c55c316ad7a40ce4d6c) @@ -37,11 +37,14 @@ property int currentStepIndex : 0 property int diameter : 20 property int subStepIndex : 0 + property var currentStep : [] width : _row.width height : _row.height color : Colors.transparent + onCurrentStepChanged : print (currentStep) + Row { id: _row spacing : _root.spacing anchors.centerIn: parent @@ -79,7 +82,7 @@ horizontalCenter: parent.horizontalCenter } - subStepIndex : _root.subStepIndex + subStepIndex : _root.currentStep[index] ? _root.subStepIndex : 0 subStepsLength : _root.subSteps[index] ?? 0 height : 10 width : _stepsBullet.width * _root.subSteps[index] Index: sources/gui/qml/compounds/StepNavigationTitleBar.qml =================================================================== diff -u -r8a9a7d5cb3e54aa73e499ddec62653893e7d5ca7 -r52d17dab2211c2e4d9160c55c316ad7a40ce4d6c --- sources/gui/qml/compounds/StepNavigationTitleBar.qml (.../StepNavigationTitleBar.qml) (revision 8a9a7d5cb3e54aa73e499ddec62653893e7d5ca7) +++ sources/gui/qml/compounds/StepNavigationTitleBar.qml (.../StepNavigationTitleBar.qml) (revision 52d17dab2211c2e4d9160c55c316ad7a40ce4d6c) @@ -27,7 +27,7 @@ Rectangle { id: _root property int stepIndex : 0 property int subStepIndex : 0 - + property var currentStep : [] property int stepLineLength : 125 property var stepNames : [] property var subSteps : [] @@ -70,6 +70,7 @@ stepNames : _root.stepNames subStepIndex : _root.subStepIndex subSteps : _root.subSteps + currentStep : _root.currentStep } } } Index: sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml =================================================================== diff -u -r1132f049e169cc87a059261f72fca0ceb7d739f1 -r52d17dab2211c2e4d9160c55c316ad7a40ce4d6c --- sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml (.../HeaderbarPrescription.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1) +++ sources/gui/qml/dialogs/headerbar/HeaderbarPrescription.qml (.../HeaderbarPrescription.qml) (revision 52d17dab2211c2e4d9160c55c316ad7a40ce4d6c) @@ -61,8 +61,9 @@ rightMargin : Variables.defaultMargin * 3 } enabled : _root.isFirstTab ? true : _headerbarPrescriptionContent.confirmReady() - text.text : _root.isFirstTab ? qsTr("Next") - : vTreatmentCreate.parametersValidated ? qsTr("Confirm") : qsTr("Validate") + text.text : _root.isFirstTab ? qsTr("Next") : + vTreatmentCreate.parametersValidated ? qsTr("Confirm") : + qsTr("Validate") visible : ! vTDOpMode.inTreatment && ! isConfirmed onClicked : { Index: sources/gui/qml/pages/MainHome.qml =================================================================== diff -u -r1132f049e169cc87a059261f72fca0ceb7d739f1 -r52d17dab2211c2e4d9160c55c316ad7a40ce4d6c --- sources/gui/qml/pages/MainHome.qml (.../MainHome.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1) +++ sources/gui/qml/pages/MainHome.qml (.../MainHome.qml) (revision 52d17dab2211c2e4d9160c55c316ad7a40ce4d6c) @@ -54,31 +54,34 @@ anchors { horizontalCenter : parent.horizontalCenter verticalCenter : parent.verticalCenter - verticalCenterOffset: Variables.defaultMargin * -1 + verticalCenterOffset: Variables.defaultMargin * -3 } - text.text : qsTr("HD") - onClicked : createTreatment(HeaderBar.Mode_HD) - isDefault : true - width : 435 //// ----- @LEAHIZED: Move to Variables.qml - height : 92 //// ----- @LEAHIZED: Move to Variables.qml - pixelSize : 30 //// ----- @LEAHIZED: Move to Variables.qml + text.text : qsTr("Hemodialysis") + onClicked : createTreatment(HeaderBar.Mode_HD) + isDefault : true + width : 435 //// ----- @LEAHIZED: Move to Variables.qml + height : 92 //// ----- @LEAHIZED: Move to Variables.qml + pixelSize : 30 //// ----- @LEAHIZED: Move to Variables.qml + backgroundColor : Colors.panelBackgroundColor + borderColor : Colors.panelBorderColor } TouchRect { id : _createHDFTreatment anchors { top : _createHDTreatment.bottom - topMargin : Variables.defaultMargin + topMargin : Variables.defaultMargin * 2 horizontalCenter: _createHDTreatment.horizontalCenter } - text.text : qsTr("HDF") - onClicked : createTreatment(HeaderBar.Mode_HDF) - isDefault : true - width : 435 //// ----- @LEAHIZED: Move to Variables.qml - height : 92 //// ----- @LEAHIZED: Move to Variables.qml - pixelSize : 30 //// ----- @LEAHIZED: Move to Variables.qml + text.text : qsTr("Hemodiafiltration") + onClicked : createTreatment(HeaderBar.Mode_HDF) + isDefault : true + width : 435 //// ----- @LEAHIZED: Move to Variables.qml + height : 92 //// ----- @LEAHIZED: Move to Variables.qml + pixelSize : 30 //// ----- @LEAHIZED: Move to Variables.qml + backgroundColor : Colors.panelBackgroundColor + borderColor : Colors.panelBorderColor } - NotificationBarSmall { id: _notification anchors.bottomMargin: Variables.mainMenuHeight } Index: sources/gui/qml/pages/pretreatment/PreTreatmentInstallStack.qml =================================================================== diff -u -r1132f049e169cc87a059261f72fca0ceb7d739f1 -r52d17dab2211c2e4d9160c55c316ad7a40ce4d6c --- sources/gui/qml/pages/pretreatment/PreTreatmentInstallStack.qml (.../PreTreatmentInstallStack.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1) +++ sources/gui/qml/pages/pretreatment/PreTreatmentInstallStack.qml (.../PreTreatmentInstallStack.qml) (revision 52d17dab2211c2e4d9160c55c316ad7a40ce4d6c) @@ -18,7 +18,7 @@ BloodSetTubing , BloodLines , PressureLinesAndDialyzer, - Saline , + SalineSubStitution , Count } @@ -38,9 +38,9 @@ page ( _preTreatmentPressureLinesAndDialyzer ) break case PreTreatmentInstallStack.Step.PressureLinesAndDialyzer: - page ( _pretreatmentSaline ) + page ( _pretreatmentSalineSubstitution ) break - case PreTreatmentInstallStack.Step.Saline: + case PreTreatmentInstallStack.Step.SalineSubStitution: goToNextStep () break default: @@ -59,7 +59,7 @@ case PreTreatmentInstallStack.Step.PressureLinesAndDialyzer: page ( _preTreatmentBloodLines ) break - case PreTreatmentInstallStack.Step.Saline: + case PreTreatmentInstallStack.Step.SalineSubStitution: page ( _preTreatmentPressureLinesAndDialyzer ) break default: @@ -73,7 +73,7 @@ return qsTr("Auto Load") case PreTreatmentInstallStack.Step.BloodLines: case PreTreatmentInstallStack.Step.PressureLinesAndDialyzer: - case PreTreatmentInstallStack.Step.Saline: // fall through + case PreTreatmentInstallStack.Step.SalineSubStitution: // fall through default: return qsTr("Next") } @@ -102,12 +102,11 @@ subStepName : qsTr("Pressure Lines and Dialyzer") } - - PreTreatmentBase { id: _pretreatmentSaline + PreTreatmentBase { id: _pretreatmentSalineSubstitution instructionBased : true - onVisibleChanged : if (visible) { _root.subStepIndex = PreTreatmentInstallStack.Step.Saline; updateModel() } - subStepName : qsTr("Saline") - + onVisibleChanged : if (visible) { _root.subStepIndex = PreTreatmentInstallStack.Step.SalineSubStitution; updateModel() } + subStepName : vTreatmentCreate.treatmentModality === HeaderBar.Mode_HDF ? qsTr("Substitution") : + qsTr("Saline") } // blood tubing set auto-load Index: sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml =================================================================== diff -u -r1132f049e169cc87a059261f72fca0ceb7d739f1 -r52d17dab2211c2e4d9160c55c316ad7a40ce4d6c --- sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml (.../PreTreatmentStack.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1) +++ sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml (.../PreTreatmentStack.qml) (revision 52d17dab2211c2e4d9160c55c316ad7a40ce4d6c) @@ -131,6 +131,9 @@ if ( vSettings.advancedMode ) { vPreTreatmentAdjustmentInitTreatment.doCancel() } else { _pretreatmentInstallation.backClicked() } break + case PreTreatmentStack.Step.CreateRx: + _pretreatmentCreate.back() + break default: break } @@ -142,9 +145,9 @@ case PreTreatmentStack.Step.Installation: return _pretreatmentInstallation.confirmButtonText() case PreTreatmentStack.Step.CreateRx: - return vTreatmentCreate.parametersValidated - ? qsTr("Confirm") - : qsTr("Validate") + return _pretreatmentCreate.isFirstTab ? qsTr("Next") : + vTreatmentCreate.parametersValidated ? qsTr("Confirm") : + qsTr("Validate") case PreTreatmentStack.Step.Connect: return qsTr("Start") default: @@ -158,6 +161,8 @@ return true case PreTreatmentStack.Step.Installation: return _pretreatmentInstallation.backEnabled() + case PreTreatmentStack.Step.CreateRx: + return ! _pretreatmentCreate.isFirstTab default: return false // majority of pages back is disabled } @@ -193,10 +198,20 @@ backEnabled : _root.backEnabled() width : _root.width stepNames : _root.stepNames - subStepIndex : isInstall ? _pretreatmentInstallation.subStepIndex + 1 : 0 + subStepIndex : isInstall ? _pretreatmentInstallation.subStepIndex + 1 : + isCreateRx ? _pretreatmentCreate.subStepIndex + 1 : 0 + + currentStep : { + let arr =Array(stepNames.length).fill(false) + if ( ! vSettings.advancedMode ) { arr[stepKeys.indexOf(PreTreatmentStack.Step.Installation)] = isInstall} + arr[stepKeys.indexOf(PreTreatmentStack.Step.CreateRx)] = isCreateRx + return arr + } + subSteps : { let arr =Array(stepNames.length).fill(0) if ( ! vSettings.advancedMode ) { arr[stepKeys.indexOf(PreTreatmentStack.Step.Installation)] = PreTreatmentInstallStack.Step.Count } + arr[stepKeys.indexOf(PreTreatmentStack.Step.CreateRx)] = PreTreatmentCreateContent.Page.Count return arr } @@ -256,21 +271,6 @@ } } - // TODO - keep for now Ultrafiltration is beingn moved into Create Rx -// Connections { target: vPreTreatmentAdjustmentUltrafiltrationInit -// function onAdjustmentTriggered ( vValue ) { -// // the maximum ultrafiltration volume has to be set/revert regardless -// vTreatmentUltrafiltration.maximum = vPreTreatmentAdjustmentUltrafiltrationInit.volume - -// // but only if it has been accepted it will navigate -// if ( vPreTreatmentAdjustmentUltrafiltrationInit.adjustment_Accepted ) { -// } -// else { -// _pretreatmentDialysateUf.reasonText = vPreTreatmentAdjustmentUltrafiltrationInit.text() -// } -// } -// } - // start treatment Connections { target: vPreTreatmentAdjustmentStartTreatment function onAdjustmentTriggered ( vValue ) { Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -ra8c7ca4936378f104565408a48127e9a8a90495f -r52d17dab2211c2e4d9160c55c316ad7a40ce4d6c --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision a8c7ca4936378f104565408a48127e9a8a90495f) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 52d17dab2211c2e4d9160c55c316ad7a40ce4d6c) @@ -28,11 +28,15 @@ */ PreTreatmentBase { id: _root objectName: "_PreTreatmentCreate" // SquishQt testability + readonly property bool isFirstTab : _preTreatmentCreateContent.currentIndex === PreTreatmentCreateContent.PatientPrescription + property int subStepIndex :_preTreatmentCreateContent.currentIndex - function clear( vValue ) { if ( ! vValue ) return; _preTreatmentCreateContent.clear() } - function confirmReady() { return _preTreatmentCreateContent.confirmReady() } - function confirmButtonClicked() { if (vTreatmentCreate.parametersValidated) { _preTreatmentCreateContent.confirm() } - else { _preTreatmentCreateContent.validate() }} + function clear( vValue ) { if ( ! vValue ) return; _preTreatmentCreateContent.clear() } + function confirmReady() { return _root.isFirstTab ? true : _preTreatmentCreateContent.confirmReady() } + function confirmButtonClicked() { if ( _root.isFirstTab ) { _preTreatmentCreateContent.currentIndex = PreTreatmentCreateContent.TreatmentSettings; return; } + if (vTreatmentCreate.parametersValidated) { _preTreatmentCreateContent.confirm() } + else { _preTreatmentCreateContent.validate() }} + function back() { _preTreatmentCreateContent.currentIndex = PreTreatmentCreateContent.PatientPrescription } PreTreatmentCreateContent { id: _preTreatmentCreateContent anchors { Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml =================================================================== diff -u -r1132f049e169cc87a059261f72fca0ceb7d739f1 -r52d17dab2211c2e4d9160c55c316ad7a40ce4d6c --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision 52d17dab2211c2e4d9160c55c316ad7a40ce4d6c) @@ -38,7 +38,8 @@ enum Page { PatientPrescription , - TreatmentSettings + TreatmentSettings , + Count } function canEdit (state) { editingEnabled = state && ! vTDOpMode.inTreatment } Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreatePatientPrescription.qml =================================================================== diff -u -r1132f049e169cc87a059261f72fca0ceb7d739f1 -r52d17dab2211c2e4d9160c55c316ad7a40ce4d6c --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreatePatientPrescription.qml (.../PreTreatmentCreatePatientPrescription.qml) (revision 1132f049e169cc87a059261f72fca0ceb7d739f1) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreatePatientPrescription.qml (.../PreTreatmentCreatePatientPrescription.qml) (revision 52d17dab2211c2e4d9160c55c316ad7a40ce4d6c) @@ -84,6 +84,9 @@ } } + + + } Column { id: _rightColumn