Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml =================================================================== diff -u -r821bf955d0ba7e028bccfee7c04ca77cf80a0bd4 -rc4bd7072571428744e11dd24d5da1d1a3e1d1686 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml (.../PreTreatmentCreateStack.qml) (revision 821bf955d0ba7e028bccfee7c04ca77cf80a0bd4) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateStack.qml (.../PreTreatmentCreateStack.qml) (revision c4bd7072571428744e11dd24d5da1d1a3e1d1686) @@ -20,6 +20,7 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/pages/pretreatment" import "qrc:/pages/pretreatment/create" /*! * \brief the pre treatment parameters create stack screen @@ -31,6 +32,49 @@ property int stackStepIndex : 0 + property alias patientID: _pretreatmentPtientIDEntry.text + + function setPatientID(vPatientID) { + vTreatmentCreate .patientID = vPatientID // in case it needs to be displayed on Pre-Treatment Confirm Screen + vPostTreatmentAdjustmentTreatmentLog.patientID = vPatientID // store for the TreatmentLog + } + + function pagePatientID( vCondition ) { + if ( vCondition !== undefined && vCondition === false ) return + + patientID = "" + page( _pretreatmentPtientID ) + _pretreatmentPtientID.setFocus() + } + + PreTreatmentBase { id: _pretreatmentPtientID + + function setFocus() { + _pretreatmentPtientIDEntry.textInput.forceActiveFocus() + _keyboard.setVisible(true) + } + + title.text : qsTr("Patient ID") + header.backVisible : true + header.confirmVisible : true + header.confirmEnabled : _pretreatmentPtientIDEntry.text + TextEntry { id : _pretreatmentPtientIDEntry + property int topMarginContent : 200 + + clip : true + hasCarret : true + textInput .width : 450 + text : vTreatmentCreate.patientID + anchors { + top : parent.top + topMargin : topMarginContent + 120 // moved a little down to be more on center and close to keyboard top edge. + horizontalCenter: parent.horizontalCenter + } + textInput.inputMethodHints : Qt.ImhPreferLowercase + textInput.echoMode : TextInput.Normal + } + } + PreTreatmentCreate { id: _pretreatmentCreate header.backVisible : true header.confirmVisible : true @@ -45,18 +89,24 @@ } Connections { target: vHDOperationMode - onValidateParametersChanged : { page( _pretreatmentCreate , vvalidateParameters )} + onValidateParametersChanged : { pagePatientID ( vvalidateParameters )} } - Connections { target: vTreatmentCreate - onFwValidationSuccess : { page( _pretreatmentConfirm )} + Connections { target: _pretreatmentPtientID + onBackClicked : { vPreTreatmentAdjustmentInitTreatment.doCancel ()} + onConfirmClicked : { setPatientID ( patientID ) + page( _pretreatmentCreate )} } Connections { target: _pretreatmentCreate - onBackClicked : { vPreTreatmentAdjustmentInitTreatment.doCancel ()} + onBackClicked : { pageoPatientID ()} onConfirmClicked : { vTreatmentCreate.doValidation ()} } + Connections { target: vTreatmentCreate + onFwValidationSuccess : { page( _pretreatmentConfirm )} + } + Connections { target: _pretreatmentConfirm onBackClicked : { vTreatmentCreate.doCancel () page( _pretreatmentCreate )}