Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentDuration.qml =================================================================== diff -u -r34471900489397f483e052870ddc46059cef49fb -r5c5fa01738826261e0b3647db6b7b3fc26b04251 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentDuration.qml (.../TreatmentAdjustmentDuration.qml) (revision 34471900489397f483e052870ddc46059cef49fb) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentDuration.qml (.../TreatmentAdjustmentDuration.qml) (revision 5c5fa01738826261e0b3647db6b7b3fc26b04251) @@ -21,60 +21,55 @@ import "qrc:/globals" import "qrc:/components" -// import VTreatmentAdjustmentsResponse 0.1; - /*! * \brief TreatmentAdjustmentDuration.qml is the screen * To adjust the treatment duration */ TreatmentAdjustmentBase { id: _root + property alias durationValue : _durationSlider.value + property alias durationMinimum : _durationSlider.minimum + property alias durationMaximum : _durationSlider.maximum + property alias durationStep : _durationSlider.step - property int durationValue : 0 - property alias durationMinimum : _durationSlider.minimum - property alias durationMaximum : _durationSlider.maximum - property alias durationStep : _durationSlider.step + property alias currentTime : _currentTimeText.seconds + property alias durationTime : _durationText.seconds - property alias currentTime : _currentTimeText.seconds - property alias durationTime : _durationText.seconds + property int textWidth : 200 - property int textWidth : 200 - - titleText: qsTr("TREATMENT DURATION") - // VTreatmentAdjustmentsResponse { id: vTreatmentAdjustmentsResponse - // onAdjustment_TriggeredChanged: { - // if ( adjustment_Accepted ) { - // accept() - // } else { - // _bloodFlowSlider .value = vTreatmentAdjustmentsResponse. bloodFlow_FlowSetPoint; - // _dialysateFlowSlider.value = vTreatmentAdjustmentsResponse.dialysateFlow_FlowSetPoint; - // notificationText = vTreatmentAdjustmentsResponse.text(); - // } - // } - // } + Connections { target: vTreatmentAdjustmentsResponse + onAdjustment_Duration_TriggeredChanged: { + if ( adjustment_Accepted ) { + accept() + } else { + _durationSlider .value = vTreatmentAdjustmentsResponse.duration; + notificationText = vTreatmentAdjustmentsResponse.text(); + } + } + } Column { id : _column spacing: 65 anchors.centerIn: parent TimeText { id: _currentTimeText seconds: vTreatmentTime.time_Elapsed secondsVisible: false - textPixelSize: 89 // TODO : Variables + textPixelSize: Fonts.fontPixelDurationCurTime anchors.horizontalCenter: parent.horizontalCenter } Slider { id : _durationSlider anchors.horizontalCenter: parent.horizontalCenter width : 880 - height : 5 - minimum : 0 // TODO : From ranges model - maximum : 8 * 60 // TODO : From ranges model + height : 5 + minimum : 60 * vTreatmentRanges.treatmentRanges_Duration_Min // to Minutes + maximum : 60 * vTreatmentRanges.treatmentRanges_Duration_Max // to Minutes step : Variables.durationResolution minText.visible: false maxText.visible: false TimeText { id: _durationText - seconds: _durationSlider.value * 60 + seconds: 60 * _durationSlider.value // to Seconds secondsVisible: false - textPixelSize: 28 // TODO : Variables + textPixelSize: Fonts.fontPixelDurationAdjTime textWeight: Font.Medium anchors { top : _durationSlider.handler.bottom