Index: leahi.qrc =================================================================== diff -u -r1f9e84f74ead9e10577c8caa204c6eb911e12ab8 -rb59827b661a423b2b1ad2ca7b8611c2c0be7bd6a --- leahi.qrc (.../leahi.qrc) (revision 1f9e84f74ead9e10577c8caa204c6eb911e12ab8) +++ leahi.qrc (.../leahi.qrc) (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) @@ -105,6 +105,7 @@ resources/images/Vitals_Red.png resources/images/check_green.png resources/images/eye_closed.png + resources/images/stepCheck.png sources/gui/qml/components/MainMenu.qml @@ -238,13 +239,12 @@ sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml sources/gui/qml/pages/pretreatment/PreTreatmentWaterSampleStack.qml sources/gui/qml/pages/pretreatment/PreTreatmentConsumablesStack.qml - sources/gui/qml/pages/pretreatment/PreTreatmentDisposablesStack.qml sources/gui/qml/pages/pretreatment/PreTreatmentPrimeStack.qml + sources/gui/qml/pages/pretreatment/PreTreatmentInstallation.qml sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml - sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml sources/gui/qml/pages/pretreatment/connection/PreTreatmentUltrafiltration.qml Index: sources/gui/qml/components/StepBullet.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -rb59827b661a423b2b1ad2ca7b8611c2c0be7bd6a --- sources/gui/qml/components/StepBullet.qml (.../StepBullet.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/components/StepBullet.qml (.../StepBullet.qml) (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) @@ -61,9 +61,16 @@ radius : _root.diameter color : _root.current ? colorCurrent : _root.complete ? _root.colorComplete : Colors.transparent border.color: _root.current ? colorComplete : _root.complete ? _root.colorComplete : _root.colorInComplete - border.width: 2 + border.width: 1 } + Image { id: _checkComplete + anchors.centerIn : parent + source : "qrc:/images/iStepCheck" + fillMode : Image.PreserveAspectFit + visible : _root.complete + } + // this text is created only for the maximum(current) font info(height) Text { id: _textHightRef visible: false Index: sources/gui/qml/compounds/InstructionView.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -rb59827b661a423b2b1ad2ca7b8611c2c0be7bd6a --- sources/gui/qml/compounds/InstructionView.qml (.../InstructionView.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/compounds/InstructionView.qml (.../InstructionView.qml) (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) @@ -27,166 +27,72 @@ * as the current progress in each of the steps. */ Rectangle { id: _root - property string label : "" - property string location : "" + property string title : "" property var stepNames : [] property var stepImages : [] property int fontPixelMessage : 25 - property int fontPixelLabel : 20 + property int fontPixelTitle : 20 - property alias currentStepIndex: _swipeview.currentIndex - readonly property bool isEmpty : stepNames.length == 0 && stepImages.length == 0 - readonly property bool firstStep : isEmpty || _swipeview.currentIndex == 0 - readonly property bool lastStep : isEmpty || _swipeview.currentIndex == _swipeview.count - 1 - readonly property int frameVGapTop : 65 - readonly property int frameVGapBottom : 45 - readonly property int frameHGap : 45 // * 1.5 - readonly property int chevronWidth : 25 - readonly property int chevronHeight : 35 - readonly property int chevronMargin : ( _root.frameHGap - _root.chevronWidth ) / 2 readonly property int outerRadius : Variables.dialogRadius * 2 readonly property int innerRadius : Variables.dialogRadius - - signal leftClicked () - signal rightClicked() - - color : Colors.transparent - border.color : Colors.borderButton + color : Colors.offWhite radius : _root.outerRadius - Rectangle { id: _innerFrame - color : Colors.transparent - border.color : Colors.line + Text { id: _title anchors { - fill : _root - leftMargin : _root.frameHGap - rightMargin : _root.frameHGap - topMargin : _root.frameVGapTop - bottomMargin: _root.frameVGapBottom + left : parent.left + top : parent.top } - radius : _root.innerRadius - // DEBUG : This helps getting the final size of the available room for the instruction images. - // onWidthChanged : console.debug( " ----- ", "_innerFrame.width :" , label, width ) - // onHeightChanged : console.debug( " ----- ", "_innerFrame.height:" , label, height) + text : _root.title + color : Colors.backgroundMainMenu + font.pixelSize : 20 + font.weight : Font.Medium } + Item { id: _containerSwipeView clip : true // it has to be clipped although not performace friendly, otherwise the other pages will be partially shown. anchors { - right : _innerFrame.right - left : _innerFrame.left + right : _root.right + left : _root.left top : _root.top bottom : _root.bottom } - SwipeView { id: _swipeview - anchors.fill: parent - Repeater { - model: _root.stepNames - Loader { id: _content - anchors.bottom: parent.bottom - active: SwipeView.isPreviousItem || SwipeView.isCurrentItem || SwipeView.isNextItem - sourceComponent: Item { - Text { id: _message - text : _root.stepNames.length ? _root.stepNames[index] : "" - color : Colors.textMain - width : parent.width - height : _root.frameVGapTop - horizontalAlignment : Text.AlignHCenter - verticalAlignment : Text.AlignVCenter - font.pixelSize : _root.fontPixelMessage - } - Image { id: _image - source: _root.stepImages.length && _root.stepImages[index] ? "file:" + _root.location + _root.stepImages[index] : "" - width : _innerFrame.width - height : _innerFrame.height - anchors.top : parent.top - anchors.topMargin : _root.frameVGapTop - anchors.horizontalCenter : parent.horizontalCenter - horizontalAlignment : Image.AlignHCenter - verticalAlignment : Image.AlignVCenter - fillMode : Image.PreserveAspectFit - } + + Repeater { + model: _root.stepNames + Loader { id: _content + anchors.bottom: parent.bottom + active: SwipeView.isPreviousItem || SwipeView.isCurrentItem || SwipeView.isNextItem + sourceComponent: Item { + Text { id: _message + text : _root.stepNames.length ? _root.stepNames[index] : "" + color : Colors.textMain + width : parent.width + height : 65 + horizontalAlignment : Text.AlignHCenter + verticalAlignment : Text.AlignVCenter + font.pixelSize : _root.fontPixelMessage } + Image { id: _image + source: _root.stepImages.length && _root.stepImages[index] ? _root.stepImages[index] : "" +// width : _innerFrame.width +// height : _innerFrame.height + anchors.top : parent.top + anchors.topMargin : 65 + anchors.horizontalCenter : parent.horizontalCenter + horizontalAlignment : Image.AlignHCenter + verticalAlignment : Image.AlignVCenter + fillMode : Image.PreserveAspectFit + } } } } } - Item { - anchors.left : _innerFrame.left - anchors.right : _innerFrame.right - anchors.top : _innerFrame.bottom - anchors.bottom : _root.bottom - Text { id: _label - text : _root.label - color : Colors.textMain - width : parent.width - height : _root.frameVGapBottom - horizontalAlignment : Text.AlignLeft - verticalAlignment : Text.AlignVCenter - font.pixelSize : _root.fontPixelLabel - anchors.verticalCenter: parent.verticalCenter - anchors.left : parent.left - } - StepIndicator { id: _indicator - diameter : 10 - spacerLineLength: 25 - visible : _root.stepNames.length - currentComplete : true - hideLabels : true - stepNames : _root.stepNames - currentStepIndex: _swipeview.currentIndex - anchors.verticalCenter: parent.verticalCenter - anchors.right : parent.right - } - } - - Image { id: _leftImage - visible : ! _root.firstStep - width : _root.chevronWidth - height : _root.chevronHeight - source : "qrc:/images/iArrowLeft" - anchors.left : _root.left - anchors.right : _innerFrame.left - anchors.verticalCenter: _root.verticalCenter - anchors.margins : _root.chevronMargin - } - Image { id: _rightImage - visible : ! _root.lastStep - width : _root.chevronWidth - height : _root.chevronHeight - source : "qrc:/images/iArrowRight" - anchors.right : _root.right - anchors.left : _innerFrame.right - anchors.verticalCenter: _root.verticalCenter - anchors.margins : _root.chevronMargin - } - - MouseArea { id: _mouseAreaLeft - enabled : ! _root.firstStep - width : _root.frameHGap * 2 // mouse area is intenrionally set twice the size of the visible area for user convenience - anchors.left : _root.left - anchors.top : _root.top - anchors.bottom : _root.bottom - onClicked : { - _swipeview.currentIndex-- - _root.leftClicked - } - } - MouseArea { id: _mouseAreaRight - enabled : ! _root.lastStep - width : _root.frameHGap * 2 // mouse area is intenrionally set twice the size of the visible area for user convenience - anchors.right : _root.right - anchors.top : _root.top - anchors.bottom : _root.bottom - onClicked : { - _swipeview.currentIndex++ - _root.rightClicked - } - } } Index: sources/gui/qml/pages/MainStack.qml =================================================================== diff -u -rcc7aae88f15228ff37b840946818692e444718bf -rb59827b661a423b2b1ad2ca7b8611c2c0be7bd6a --- sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision cc7aae88f15228ff37b840946818692e444718bf) +++ sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) @@ -46,7 +46,6 @@ // Standby / Disinfection DisinfectStack { id: _disinfectStack } // Pre Treatment - PreTreatmentCreateStack { id: _preTreatmentCreateStack } PreTreatmentStack { id: _preTreatmentStack } // In TreatmentStack TreatmentStack { id: _treatmentStack } @@ -134,12 +133,11 @@ } function onHomeChanged ( vValue ) { page( _startupScreen , vValue )} - function onStandbyChanged ( vValue ) { if ( vTDOpMode.standby ) _preTreatmentCreateStack.clear(vValue) } + function onStandbyChanged ( vValue ) { if ( vTDOpMode.standby ) _preTreatmentStack.clear(vValue) } function onStandbyStartChanged ( vValue ) { /* It depends on the subModes of the standBy. Handled by onHome. */ } function onStandbyWaitTreatmentChanged ( vValue ) { if ( vValue ) vDisinfectAdjustDisinfect.hasCancel = false } function onStandbyWaitDisinfectChanged ( vValue ) { page( _disinfectStack , vValue )} - function onValidateParametersChanged ( vValue ) { page( _preTreatmentCreateStack , vValue )} function onPreTreatmentChanged ( vValue ) { page( _preTreatmentStack , vValue )} function onInTreatmentChanged ( vValue ) { page( _treatmentStack , vValue )} function onPostTreatmentChanged ( vValue ) { page( _postTreatmentStack , vValue )} Index: sources/gui/qml/pages/TreatmentFlowBase.qml =================================================================== diff -u -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5 -rb59827b661a423b2b1ad2ca7b8611c2c0be7bd6a --- sources/gui/qml/pages/TreatmentFlowBase.qml (.../TreatmentFlowBase.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5) +++ sources/gui/qml/pages/TreatmentFlowBase.qml (.../TreatmentFlowBase.qml) (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) @@ -36,10 +36,9 @@ property bool instructionBased : false readonly property alias instruction : _instructionLoader.item - property string instructionlocation : "" + property string instructionTitle : "" property var instructionStepNames : [] property var instructionStepImages : [] - readonly property bool instructionIsLast: instruction ? instruction.lastStep : true property bool hasTimeCircle : false readonly property alias timeCircle : _timeCircleLoader.item @@ -62,15 +61,14 @@ property bool isComplete : false readonly property int titleTopMargin: 110 + readonly property int sideMargins : Variables.defaultMargin * 2 + Variables.headerButtonsMargin // matching header button margins signal backClicked() signal confirmClicked() onVisibleChanged: { if (checkList) checkList.resetItems() - if (instruction) - instruction.currentStepIndex = 0 _notification.text = "" if (visible) { _mainMenu.hidden = true @@ -80,10 +78,15 @@ // vvvvvvvvvvvvvvvvvvvvvvvvv HEADER vvvvvvvvvvvvvvvvvvvvvvvvv // StepNavigationTitleBar { id: _titleBar stepIndex : stackStepIndex // shall have a definition in the parent stack - anchors.top : _root.top - anchors.horizontalCenter : parent.horizontalCenter + anchors { + top : _root.top + left : parent.left + right : parent.right + leftMargin : Variables.defaultMargin * 2 + rightMargin : anchors.leftMargin + } + width : _root.width - confirmEnabled : instruction ? instruction.lastStep : true stepNames : [ ] onBackClicked : _root.backClicked() onConfirmClicked: _root.confirmClicked() @@ -96,39 +99,34 @@ topMargin : titleTopMargin horizontalCenter: parent.horizontalCenter } - text : qsTr("TreatmentFlowBase") color : Colors.textMain font.pixelSize : Fonts.fontPixelTitle } - // ^^^^^^^^^^^^^^^^^^^^^^^^^ HEADER ^^^^^^^^^^^^^^^^^^^^^^^^^ // // vvvvvvvvvvvvvvvvvvvv Optional Components vvvvvvvvvvvvvvvvvvvv // Loader { id: _instructionLoader - readonly property int outerHMargin : 30 readonly property int outerVMargin : 15 active : _root.instructionBased anchors { top : title.visible ? title.bottom : title.top bottom : footer.top left : parent.left right : parent.right - leftMargin : outerHMargin - rightMargin : outerHMargin + leftMargin : _root.sideMargins + rightMargin : _root.sideMargins topMargin : outerVMargin bottomMargin : outerVMargin } sourceComponent : InstructionView { id: _instructionView - label : title.visible ? "" : _root.title.text - location : _root.instructionlocation + title : _root.instructionTitle stepNames : _root.instructionStepNames stepImages : _root.instructionStepImages } } Loader { id : _timeCircleLoader active : _root.hasTimeCircle - anchors.top : _root.hasCheckList ? title.bottom : undefined anchors.topMargin : _root.hasCheckList ? 25 : 0 anchors.horizontalCenter: _root.horizontalCenter @@ -187,7 +185,7 @@ if ( instructionsGroup !== undefined ) { // DEBUG : // console.debug(" 00000 ", group, settingsGroup, settingsCategory.groups) - _root.instructionlocation = instructionsGroup.location + _root.instructionTitle = instructionsGroup.title _root.instructionStepNames = instructionsGroup.keys _root.instructionStepImages = instructionsGroup.values } Index: sources/gui/qml/pages/endtreatment/EndTreatmentEndStack.qml =================================================================== diff -u -r43ae56f762e6f3e1416d39e3d16f9103fc597e41 -rb59827b661a423b2b1ad2ca7b8611c2c0be7bd6a --- sources/gui/qml/pages/endtreatment/EndTreatmentEndStack.qml (.../EndTreatmentEndStack.qml) (revision 43ae56f762e6f3e1416d39e3d16f9103fc597e41) +++ sources/gui/qml/pages/endtreatment/EndTreatmentEndStack.qml (.../EndTreatmentEndStack.qml) (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) @@ -41,7 +41,6 @@ footer { childrenWidth : 300 children: TouchRect { - enabled : _endTreatmentEnd.instructionIsLast text.text : qsTr("START RINSEBACK") isDefault : true onClicked : rinsebackClicked() Index: sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackComplete.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -rb59827b661a423b2b1ad2ca7b8611c2c0be7bd6a --- sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackComplete.qml (.../EndTreatmentRinsebackComplete.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackComplete.qml (.../EndTreatmentRinsebackComplete.qml) (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) @@ -61,7 +61,7 @@ TouchRect { id : _recirculateTouchRect visible : vTreatmentTime .time_IsLeft - enabled : vTreatmentRinseback .isCompleted && _root.instructionIsLast + enabled : vTreatmentRinseback .isCompleted text.text : qsTr("RECIRCULATE") onClicked : confirmClicked() }, Index: sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackInit.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -rb59827b661a423b2b1ad2ca7b8611c2c0be7bd6a --- sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackInit.qml (.../EndTreatmentRinsebackInit.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackInit.qml (.../EndTreatmentRinsebackInit.qml) (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) @@ -50,14 +50,12 @@ anchors.fill : footer children : [ TouchRect { id : _endTreatmentTouchRect - enabled : _root.instructionIsLast visible : true //DEN-15722: SRSHD 1231: REmoved => vTreatmentTime .time_IsLeft text.text : qsTr("END TREATMENT") onClicked : treatmentEndClicked() }, TouchRect { id : _beginRinsebackTouchRect - enabled : _root.instructionIsLast visible : true isDefault : true text.text : qsTr("START RINSEBACK") Index: sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -rb59827b661a423b2b1ad2ca7b8611c2c0be7bd6a --- sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml (.../PreTreatmentBase.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/pretreatment/PreTreatmentBase.qml (.../PreTreatmentBase.qml) (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) @@ -28,14 +28,35 @@ TreatmentFlowBase { id: _root objectName: "_PreTreatmentBase" header.stepNames: [ - qsTr("Create" ), - qsTr("Sample" ), - qsTr("Consumables" ), - qsTr("Disposables" ), - qsTr("Prime" ), - qsTr("BP/HR" ), - qsTr("Ultrafiltration" ), - qsTr("Connection" ), - qsTr("Start" ), + qsTr("Installation" ), + qsTr("Self-Tests" ), + qsTr("Saline" ), + qsTr("Prime" ), + qsTr("Rx" ), + qsTr("UF" ), + qsTr("Connect" ), ] + header.stepLineLength : 100 + + onVisibleChanged: { + if (visible) { + _root.updateModel(stackStepIndex) + } + } + + function updateModel (index) { + let group = _root.header.stepNames[index] + if ( group === undefined ) group = "" + let instructionsGroup = vSettings.instructions[group] + + if ( instructionsGroup !== undefined ) { + instructionTitle = instructionsGroup.title + instructionStepNames = instructionsGroup.keys + instructionStepImages = instructionsGroup.values + + print("instructionTitle " + instructionTitle) + print("instructionStepNames " + instructionStepNames) + print("instructionStepImages " + instructionStepImages) + } + } } Fisheye: Tag b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a refers to a dead (removed) revision in file `sources/gui/qml/pages/pretreatment/PreTreatmentDisposablesStack.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/pages/pretreatment/PreTreatmentInstallation.qml =================================================================== diff -u --- sources/gui/qml/pages/pretreatment/PreTreatmentInstallation.qml (revision 0) +++ sources/gui/qml/pages/pretreatment/PreTreatmentInstallation.qml (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) @@ -0,0 +1,22 @@ +import QtQuick 2.15 + +PreTreatmentBase { id: _root + property int stackStepIndex : PreTreatmentStack.Installation + header.confirmVisible : true + header.backVisible : true + instructionBased: true + + header.confirmText.text : qsTr("Auto-Load") + onConfirmClicked : page ( _pretreatmentCreate ) // TODO REQUEST FW + onBackClicked : vPreTreatmentAdjustmentInitTreatment.doCancel() // request standby + + Connections { target: vPreTreatmentAdjustmentDisposablesConfirm + function onAdjustmentTriggered ( vValue ) { + if ( vPreTreatmentAdjustmentDisposablesConfirm.adjustment_Accepted ) { + informationText = "" + } else { + informationText = vPreTreatmentAdjustmentDisposablesConfirm.text() + } + } + } +} Index: sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -rb59827b661a423b2b1ad2ca7b8611c2c0be7bd6a --- sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml (.../PreTreatmentStack.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/pretreatment/PreTreatmentStack.qml (.../PreTreatmentStack.qml) (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) @@ -22,39 +22,55 @@ import "qrc:/components" import "qrc:/pages/pretreatment" import "qrc:/pages/pretreatment/connection" +import "qrc:/pages/pretreatment/create" + /*! * \brief the pre treatment prime stack screen */ StackItem { id: _root objectName: "_PreTreatmentStack" - stackView.initialItem : null + stackView.initialItem : _pretreatmentInstallation + enum StackStepIndex { + Installation , + SelfTests , + Saline , + Prime , + CreateRx , + UF , + Connect + } - property int stackStepIndex : 0 +// PreTreatmentWaterSampleStack{ id: _preTreatmentWaterSampleStack ;objectName: "_preTreatmentWaterSampleStack" } +// PreTreatmentConsumablesStack{ id: _preTreatmentConsumablesStack ;objectName: "_preTreatmentConsumablesStack" } +// PreTreatmentPrimeStack { id: _pretreatmentPrimeStack ;objectName: "_pretreatmentPrimeStack" } +// PreTreatmentConnectionStack { id: _pretreatmentConnectionStack ;objectName: "_pretreatmentConnectionStack " } + PreTreatmentInstallation { id: _pretreatmentInstallation } - PreTreatmentWaterSampleStack{ id: _preTreatmentWaterSampleStack ;objectName: "_preTreatmentWaterSampleStack" } - PreTreatmentConsumablesStack{ id: _preTreatmentConsumablesStack ;objectName: "_preTreatmentConsumablesStack" } - PreTreatmentDisposablesStack{ id: _preTreatmentDisposablesStack ;objectName: "_preTreatmentDisposablesStack" } - PreTreatmentPrimeStack { id: _pretreatmentPrimeStack ;objectName: "_pretreatmentPrimeStack" } - PreTreatmentConnectionStack { id: _pretreatmentConnectionStack ;objectName: "_pretreatmentConnectionStack " } + PreTreatmentCreate { id: _pretreatmentCreate ; } - Connections { target: vPreTreatmentStates - function onWaterSampleChanged ( vValue ) { page( _preTreatmentWaterSampleStack , vValue )} - function onSelfTestConsumablesChanged ( vValue ) { page( _preTreatmentConsumablesStack , vValue )} - function onSelfTestNoCartridgeChanged ( vValue ) { page( _preTreatmentDisposablesStack , vValue )} - function onInstallationChanged ( vValue ) { page( _preTreatmentDisposablesStack , vValue )} // DEBUG: Experimental : console.debug("vinstallation " - function onSelfTestDryChanged ( vValue ) { page( _pretreatmentPrimeStack , vValue )} - function onPrimeChanged ( vValue ) { page( _pretreatmentPrimeStack , vValue )} // DEBUG: Experimental : console.debug("vprime " - function onRecirculateChanged ( vValue ) { page( _pretreatmentPrimeStack , vValue )} // DEBUG: Experimental : console.debug("vrecirculate " - function onPatientConnectionChanged ( vValue ) { page( _pretreatmentConnectionStack , vValue )} - } + function clear(vValue) { if ( ! vValue ) return; _pretreatmentCreate.clear(vValue) } + +// Connections { target: vPreTreatmentStates +// function onWaterSampleChanged ( vValue ) { page( _preTreatmentWaterSampleStack , vValue )} +// function onSelfTestConsumablesChanged ( vValue ) { page( _preTreatmentConsumablesStack , vValue )} +// function onSelfTestNoCartridgeChanged ( vValue ) { page( _preTreatmentDisposablesStack , vValue )} +// function onInstallationChanged ( vValue ) { page( _preTreatmentDisposablesStack , vValue )} // DEBUG: Experimental : console.debug("vinstallation " +// function onSelfTestDryChanged ( vValue ) { page( _pretreatmentPrimeStack , vValue )} +// function onPrimeChanged ( vValue ) { page( _pretreatmentPrimeStack , vValue )} // DEBUG: Experimental : console.debug("vprime " +// function onRecirculateChanged ( vValue ) { page( _pretreatmentPrimeStack , vValue )} // DEBUG: Experimental : console.debug("vrecirculate " +// function onPatientConnectionChanged ( vValue ) { page( _pretreatmentConnectionStack , vValue )} +// } + onVisibleChanged: { if (visible) { _mainMenu.hidden = true + _headerBar.titleText = qsTr("Setup Treatment") } else { stackView.initialItem = null + _headerBar.titleText = "" } } } Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -rcc7aae88f15228ff37b840946818692e444718bf -rb59827b661a423b2b1ad2ca7b8611c2c0be7bd6a --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision cc7aae88f15228ff37b840946818692e444718bf) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) @@ -28,17 +28,16 @@ */ PreTreatmentBase { id: _root objectName: "_PreTreatmentCreate" // SquishQt testability + property int stackStepIndex : PreTreatmentStack.CreateRx header.confirmVisible : true - title.visible : false header.backVisible : ! vTreatmentCreate.parametersValidated header.confirmEnabled : _preTreatmentCreateContent.confirmReady() header.confirmText.text : vTreatmentCreate.parametersValidated ? qsTr("CONFIRM") : qsTr("VALIDATE") onConfirmClicked : vTreatmentCreate.parametersValidated ? _preTreatmentCreateContent.confirm() : _preTreatmentCreateContent.validate() - onBackClicked : vPreTreatmentAdjustmentInitTreatment.doCancel() - + onBackClicked : page ( _pretreatmentInstallation )// TODO FIX ME IN PRE TREATMENT function clear( vValue ) { if ( ! vValue ) return; _preTreatmentCreateContent.clear() } PreTreatmentCreateContent { id: _preTreatmentCreateContent Fisheye: Tag b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a refers to a dead (removed) revision in file `sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/view/settings/VSettings.cpp =================================================================== diff -u -redb8ee3edc41b1d324cd8a53e8e27a2a58289563 -rb59827b661a423b2b1ad2ca7b8611c2c0be7bd6a --- sources/view/settings/VSettings.cpp (.../VSettings.cpp) (revision edb8ee3edc41b1d324cd8a53e8e27a2a58289563) +++ sources/view/settings/VSettings.cpp (.../VSettings.cpp) (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) @@ -82,12 +82,27 @@ for (const auto &category : mCategorys) { QStringList groups = _Settings.groups(category); for (const auto &group : groups) { - QStringList keys = _Settings.keys (category, group); - QVariantList values = _Settings.values (category, group); + QStringList keys ; + QVariantList values ; + QString title = ""; + for (const QString &key : _Settings.keys(category, group)) { + if (Storage::Settings::isKeyTitle ( key ) ) { + title = _Settings.value(category, group, key).toString(); + } else { + const QString imagePath = QStringLiteral("%1%2").arg(_location) + .arg(_Settings.value(category, group, key).toString()); + QFileInfo fileInfo(imagePath); + values.append(fileInfo.exists() && fileInfo.isFile() ? "file:" + imagePath : ""); + keys.append(key); + } + } + if ( Storage::Settings::isCategoryInstructions( category ) ) { - TKeysList keysList = updateReplacements(group, keys ); - updateInstructions(group, keysList, values ); - updateInstructions(group ); + TKeysList keysList = updateReplacements(group, keys ); + updateInstructions(group, keysList, values, title ); + updateInstructions(group ); + + } else { //TODO: Since it is global system settings, move this to the settings controller so the C++ backend can also use it. like Date/Time formats. for (const auto &key : qAsConst(keys)) { @@ -177,10 +192,10 @@ return keysList; } -void VSettings::updateInstructions(const QString &vGroup, const TKeysList &vKeysList, const QVariantList &vValues) +void VSettings::updateInstructions(const QString &vGroup, const TKeysList &vKeysList, const QVariantList &vValues, const QString &vTitle) { TInstruction mInstruction; - mInstruction.location = _location; + mInstruction.title = vTitle; mInstruction.keys = vKeysList; mInstruction.values = vValues ; _instructionMap[vGroup] = mInstruction; @@ -191,12 +206,13 @@ //TODO: this function or even the structure may need to update to send less data to qml and only the updated part. TKeysList keysList = _instructionMap[vGroup].keys ; QVariantList values = _instructionMap[vGroup].values; + QString title = _instructionMap[vGroup].title; QStringList keyList; for ( const auto &keys : keysList) { keyList += keys.join(""); } QVariantMap details; - details["location"] = _location ; + details["title"] = title ; details["keys" ] = keyList ; details["values" ] = values ; _instructions[vGroup] = details ; Index: sources/view/settings/VSettings.h =================================================================== diff -u -redb8ee3edc41b1d324cd8a53e8e27a2a58289563 -rb59827b661a423b2b1ad2ca7b8611c2c0be7bd6a --- sources/view/settings/VSettings.h (.../VSettings.h) (revision edb8ee3edc41b1d324cd8a53e8e27a2a58289563) +++ sources/view/settings/VSettings.h (.../VSettings.h) (revision b59827b661a423b2b1ad2ca7b8611c2c0be7bd6a) @@ -34,7 +34,7 @@ QString _location = QString(Storage::Settings_Category_InstructionsImagesLoc).arg(Storage::Settings_Path()); typedef QList TKeysList; typedef struct { - QString location; + QString title ; TKeysList keys ; QVariantList values ; } TInstruction ; @@ -77,8 +77,8 @@ private: void initConnectionsSettings(); - TKeysList updateReplacements ( const QString &vGroup, const QStringList &vKeys ); - void updateInstructions ( const QString &vGroup, const TKeysList &vKeysList, const QVariantList &vValues ); + TKeysList updateReplacements ( const QString &vGroup, const QStringList &vKeys ); + void updateInstructions ( const QString &vGroup, const TKeysList &vKeysList, const QVariantList &vValues, const QString &vTitle ); void updateInstructions ( const QString &vGroup ); QString defaultPassword ();