Index: sources/gui/qml/pages/pretreatment/PreTreatmentPrime.qml =================================================================== diff -u -ra7aab61ca63538c37b6931c60252680fc2ec2416 -r5a0639ee020873025a536140b8c6b5507d173412 --- sources/gui/qml/pages/pretreatment/PreTreatmentPrime.qml (.../PreTreatmentPrime.qml) (revision a7aab61ca63538c37b6931c60252680fc2ec2416) +++ sources/gui/qml/pages/pretreatment/PreTreatmentPrime.qml (.../PreTreatmentPrime.qml) (revision 5a0639ee020873025a536140b8c6b5507d173412) @@ -20,88 +20,68 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/compounds" import "qrc:/pages/pretreatment" /*! * \brief The Pre Tretreatment Prime Screen */ PreTreatmentBase { id: _root objectName: "_PreTreatmentPrime" - isComplete : timeCircleProgressValue >= timeCircleMaximum // TODO Update later + + enum Prime { + BloodTubeCircuit = 0, + DialysateCircuit = 1, + DialysatePurge = 2, + PrimingFluidDiscard = 3, + Complete = 4 + } + + isComplete : vPreTreatmentDisposablesPrime.primeComplete // PRIME_COMPLETE_STATE completeText : qsTr("Priming Complete!") // time circle hasTimeCircle : true timeCircleMinimum : 0 - timeCircleMaximum : 3 * 60 // vPreTreatmentDisposablesPrime.total // TODO implement in later story - timeCircleProgressValue : 0 // vPreTreatmentDisposablesPrime.elapsed - timeCircleTimeTextValue : timeCircleProgressValue * 60 // vPreTreatmentDisposablesPrime.remaining * 60 + timeCircleMaximum : vPreTreatmentDisposablesPrime.total + timeCircleProgressValue : vPreTreatmentDisposablesPrime.elapsed + timeCircleTimeTextValue : vPreTreatmentDisposablesPrime.countDown * 60 // chcek list hasCheckList : true checkListStepNames : [ qsTr("Blood Tubing Circuit Priming" ), qsTr("Dialysate Circuit Priming" ), + qsTr("Dialysate Purge" ), + qsTr("Priming Fluid Discard" ), ] - // TODO implement in later story -// Connections { target: vPreTreatmentStates -// function onSelfTestDryChanged ( vValue ) { page( _preTreatmentDrySelfTest , vValue )} -// function onSelfTestDry_startChanged ( vValue ) { _preTreatmentDrySelfTest .checkList.setItemExt(0, true )} -// function onSelfTestDry_waitDoorCloseChanged ( vValue ) { _preTreatmentDrySelfTest .checkList.setItemExt(0, vValue )} -// function onSelfTestDry_usedCartridgeEntered ( vValue ) { _preTreatmentDrySelfTest .checkList.setItemExt(1, true )} -// function onSelfTestDry_cartridgeLoadedEntered ( vValue ) { _preTreatmentDrySelfTest .checkList.setItemExt(1, vValue )} -// function onSelfTestDry_pressureSensorsNormalSetupEntered ( vValue ) { _preTreatmentDrySelfTest .checkList.setItemExt(2, true )} -// function onSelfTestDry_pressureSensorsVenousSetupEntered ( vValue ) {} -// function onSelfTestDry_pressureSensorsVenousEntered ( vValue ) {} -// function onSelfTestDry_pressureSensorsArterialSetupEntered ( vValue ) {} -// function onSelfTestDry_pressureSensorsArterialEntered ( vValue ) {} -// function onSelfTestDry_pressureSensorsDecayEntered ( vValue ) {} -// function onSelfTestDry_pressureSensorsStabilityEntered ( vValue ) {} -// function onSelfTestDry_pressureSensorsNormalEntered ( vValue ) { _preTreatmentDrySelfTest .checkList.setItemExt(2, vValue )} -// function onSelfTestDry_syringePumpEntered ( vValue ) { _preTreatmentDrySelfTest .checkList.setItemExt(3, vValue )} -// function onSelfTestDry_syringePumpOcclusionDetectionEntered ( vValue ) { _preTreatmentDrySelfTest .checkList.setItemExt(4, vValue )} -// function onSelfTestDry_stoppedEntered ( vValue ) {} -// function onSelfTestDry_completeEntered ( vValue ) {} -// } + onVisibleChanged: if (visible) checkList.resetItems() -// Connections { target: vPreTreatmentStates -// function onPrimeChanged ( vValue ) { page( _preTreatmentDisposablesPrime , vValue )} -// function onPrime_waitUserStartEntered ( vValue ) {} -// function onPrime_salineSetupEntered ( vValue ) {} -// function onPrime_salinePurgeAirEntered ( vValue ) {} -// function onPrime_salineCirculateBloodCircuitEntered ( vValue ) {} -// function onPrime_reservoirOneFillCompleteEntered ( vValue ) {} -// function onPrime_dialysateDialyzerEntered ( vValue ) {} -// function onPrime_salineDialyzerSetupEntered ( vValue ) {} -// function onPrime_salineDialyzerEntered ( vValue ) {} -// function onPrime_reservoirTwoFillCompleteEntered ( vValue ) {} -// function onPrime_dialysateBypassEntered ( vValue ) {} -// function onPrime_wetSelfTestsEntered ( vValue ) {} -// function onPrime_pauseEntered ( vValue ) {} -// function onPrime_completeEntered ( vValue ) {} + Item { + anchors.top: parent.top + anchors.left: parent.left + width: 40 + height: 40 + Text { + color: Colors.offWhite + text: vPreTreatmentDisposablesPrime.state + anchors.centerIn: parent + } + } -// //TODO this way of handling the states are new for states which can reset to the previous states -// // if it is successfull I may use everywhere. -// // 1 - it uses new setItemExt -// // 2 - bundles the states of FW in UI states -// // setitem differences. -// // old: -// // 1 - the start FW state of the UI state set to true -// // 2 - the end FW state fo the UI state set with vValue -// // 3 - nothing for the FW in-states of the UI states -// // new: -// // - all set with vValue and use the setItemExt -// // Unkown missbehavior: -// // - the only misbehavior is if the FW changes the FW state in the middle (in one of in-states), -// // since UI budles the FW states, it assumes it is done and checks the state which may not be ideal. -// // as an example if during the Dyalysate FW changes th state to the pause, UI may not show the Dialysaate done (probably!). -// function onPrime__BloodCircuitEntered ( vValue ) { _preTreatmentDisposablesPrime .checkList.setItemExt(0, vValue )} -// function onPrime__DialysateCircuitEntered ( vValue ) { _preTreatmentDisposablesPrime .checkList.setItemExt(1, vValue )} -// function onPrime__WetSelfTestsEntered ( vValue ) { _preTreatmentDisposablesPrime .checkList.setItemExt(2, vValue )} -// } + Connections { target: vPreTreatmentDisposablesPrime + function onPrimeBloodCircuitChanged ( vValue ) { print("onPrimeBloodCircuitChanged " + vValue) + checkList.setItemExt(PreTreatmentPrime.BloodTubeCircuit , vValue ) + } - - - + function onPrimeBloodCircuitStartChanged ( vValue ) { checkList.setItemExt(PreTreatmentPrime.BloodTubeCircuit , true )} + function onPrimeBloodCircuitEndChanged ( vValue ) { checkList.setItemExt(PreTreatmentPrime.BloodTubeCircuit , vValue )} + function onPrimeDialysateCircuitStartChanged ( vValue ) { checkList.setItemExt(PreTreatmentPrime.DialysateCircuit , true )} + function onPrimeDialysateCircuitEndChanged ( vValue ) { checkList.setItemExt(PreTreatmentPrime.DialysateCircuit , vValue )} + function onPrimeDialysatePurgeStartChanged ( vValue ) { checkList.setItemExt(PreTreatmentPrime.DialysatePurge , true )} + function onPrimeDialysatePurgeEndChanged ( vValue ) { checkList.setItemExt(PreTreatmentPrime.DialysatePurge , vValue )} + function onPrimePrimingFluidDiscardStartChanged ( vValue ) { checkList.setItemExt(PreTreatmentPrime.PrimingFluidDiscard , vValue )} + function onPrimePrimingFluidDiscardEndChanged ( vValue ) { checkList.setItemExt(PreTreatmentPrime.Complete , vValue )} + } }