Index: sources/gui/qml/pages/endtreatment/EndTreatmentBase.qml =================================================================== diff -u -r07fa2cd47bf538e89c48fc7d425674f20afc9f2a -rcba8451ac737fb0b618173a4bea37411fdaaf824 --- sources/gui/qml/pages/endtreatment/EndTreatmentBase.qml (.../EndTreatmentBase.qml) (revision 07fa2cd47bf538e89c48fc7d425674f20afc9f2a) +++ sources/gui/qml/pages/endtreatment/EndTreatmentBase.qml (.../EndTreatmentBase.qml) (revision cba8451ac737fb0b618173a4bea37411fdaaf824) @@ -33,18 +33,50 @@ property int timeoutValue : 0 property string headerTitle : "" + onVisibleChanged: if ( visible ) { _root.updateModel() } + + // update model for instruction based steps + function updateModel () { + let group = vSettings.groupModalityFormat(_root.headerTitle, vTreatmentCreate.treatmentModality) + + let instructionsGroup = vSettings.instructions[group] + + if ( instructionsGroup !== undefined ) { + instructionTitle = instructionsGroup.title + instructionStepNames = instructionsGroup.keys + instructionStepImages = instructionsGroup.values + } + } + Loader { id: _timeoutLoader active : _root.hasTimeout anchors { horizontalCenter: parent.horizontalCenter - bottom : title.top - bottomMargin : Variables.minVGap + top : parent.top + topMargin : Variables.defaultMargin * 3 } - sourceComponent : TimeText { id: _timeout - textPixelSize : 30 - textWeight : Font.Normal - secondsVisible : false - seconds : _root.timeoutValue + sourceComponent : Item { id: _timeoutItem + Text { id: _description + objectName : "_description" + anchors.centerIn: parent + width : implicitWidth + height : implicitHeight + text : qsTr("Blood return will %1 be allowed in:").arg("NOT") + color : Colors.offWhite + font.pixelSize : Fonts.fontPixelContainerTitle + } + + TimeText { id: _timeout + anchors { + left : _description.right + bottom : _description.bottom + } + textPixelSize : 30 + textWeight : Font.DemiBold + secondsVisible : false + seconds : _root.timeoutValue + textColor : Colors.ufVolumeGoalText + } } } }