Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentDurationConfirm.qml =================================================================== diff -u -rd5e9940fa96373f6cc118dfa9761d95f361689a5 -rdd02afaf66a118eb50deb9313e6a809dd17b5864 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentDurationConfirm.qml (.../TreatmentAdjustmentDurationConfirm.qml) (revision d5e9940fa96373f6cc118dfa9761d95f361689a5) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentDurationConfirm.qml (.../TreatmentAdjustmentDurationConfirm.qml) (revision dd02afaf66a118eb50deb9313e6a809dd17b5864) @@ -30,30 +30,70 @@ Item { id: _root objectName: "_TreatmentAdjustmentDurationConfirm" - signal confirmVolumeClicked(int vDuration) + property real ufVolumeGoal : 0 + property real ufRate : 0 + property int newTreatmentDuration : 0 - function reset() { - // _volumeGoalAdjuster.value = _private.setVolume - } + signal confirmClicked(int vNewTreatmentDuration) - component LabelUnitText: LabelUnitContainer { id: _labelUnitText - objectName : "_labelUnitText" - - property alias valueText: _labelUnitContainerText.text - + component LabelUnitValue: Rectangle { id: _labelUnitValue + property alias label : _label.text + property string unit : "" + property alias value : _value.text + property color textColor : Colors.offWhite width : (_infoArea.width - (_infoRow.spacing * 2)) / 3 height : Variables.adjustmentLabelUnitContainerHeight - titleFontPixelSize : Fonts.fontPixelContainerTitleSmall - unitText : Variables.unitTextDialCond - unitFontPixelSize : Fonts.fontPixelContainerUnitSmall + radius : 8.5 + color : Colors.panelBackgroundColor + border { + width : Variables.panelBorderWidth + color : Colors.panelBorderColor + } - contentItem: Text { id: _labelUnitContainerText - objectName : "_labelUnitContainerText" - anchors.centerIn : parent - width : contentWidth - height : contentHeight - color : Colors.ufVolumeGoalText - font.pixelSize : Fonts.fontPixelValueControl + Item { id: _contentItem + anchors.centerIn: parent + width : childrenRect.width + height : parent.height + + Text { id: _label + anchors { + left : parent.left + verticalCenter : parent.verticalCenter + } + width : contentWidth + color : _labelUnitValue.textColor + font.pixelSize : Fonts.fontPixelContainerTitleSmall + } + + Text { id: _unit + anchors { + left : _label.right + leftMargin : 5 + baseline : _label.baseline + } + width : contentWidth + text : _labelUnitValue.unit.length > 0 ? ("(%1)").arg(_labelUnitValue.unit) : "" + color : _labelUnitValue.textColor + font { + pixelSize : Fonts.fontPixelContainerUnitSmall + weight : Font.Thin + } + } + + Text { id: _value + anchors{ + left : _unit.right + leftMargin : Variables.defaultMargin + baseline : _label.baseline + } + width : 60 + horizontalAlignment : Text.AlignLeft + color : Colors.ufVolumeGoalText + font { + pixelSize : Fonts.fontPixelValueControl + weight : Font.DemiBold + } + } } } @@ -73,25 +113,22 @@ anchors.centerIn: parent spacing: Variables.defaultMargin * 2 - LabelUnitText { id: _ufVolumeGoal - objectName : "_ufVolumeGoal" - text : qsTr("UF Volume Goal") - unitText : Variables.unitVolume - valueText : "--" + LabelUnitValue { id: _ufVolumeGoal + label : qsTr("UF Volume Goal") + unit : Variables.unitVolume + value : _root.ufVolumeGoal.toFixed(Variables.ultrafiltrationPrecision) } - LabelUnitText { id: _ufNewRate - objectName : "_ufNewRate" - text : qsTr("New UF Rate") - unitText : Variables.unitTextRate - valueText : "--" + LabelUnitValue { id: _ufRate + label : qsTr("New UF Rate") + unit : Variables.unitTextRate + value : _root.ufRate.toFixed(Variables.ultrafiltrationPrecision) } - LabelUnitText { id: _newTreatmentDuration - objectName : "_newTreatmentDuration" - text : qsTr("New Treatment Duration") - unitText : Variables.unitTextDuration - valueText : "--" + LabelUnitValue { id: _newTreatmentDuration + label : qsTr("New Treatment Duration") + unit : Variables.unitTextDuration + value : _root.newTreatmentDuration } } } @@ -112,7 +149,7 @@ isDefault : true onClicked : { - _root.confirmClicked() + _root.confirmClicked(_root.newTreatmentDuration) } } }