Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressures.qml =================================================================== diff -u -r9a0581274e4dc51af6d6f3e4dd932581e8dce445 -r99e12314855a6b8dd46989b9c0e5263b74af5dc4 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressures.qml (.../TreatmentAdjustmentPressures.qml) (revision 9a0581274e4dc51af6d6f3e4dd932581e8dce445) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressures.qml (.../TreatmentAdjustmentPressures.qml) (revision 99e12314855a6b8dd46989b9c0e5263b74af5dc4) @@ -21,6 +21,7 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/compounds" /*! * \brief TreatmentAdjustmentPressures.qml is the screen @@ -29,22 +30,21 @@ TreatmentAdjustmentBase { id: _root contentItem.objectName: "TreatmentAdjustmentPressures" //SquishQt testability - property alias arterialPressureMinimum : _arterialPressureRangeBar.minimum - property alias arterialPressureLowerBound : _arterialPressureRangeBar.lowerBound - property alias arterialPressureUpperBound : _arterialPressureRangeBar.upperBound - property alias arterialPressureMaximum : _arterialPressureRangeBar.maximum - property alias arterialPressureValue : _arterialPressureRangeBar.value + property alias arterialPressureMinimum : _arterialPressure.minimum + property alias arterialPressureLowerBound : _arterialPressure.lowerBound + property alias arterialPressureUpperBound : _arterialPressure.upperBound + property alias arterialPressureMaximum : _arterialPressure.maximum + property alias arterialPressureValue : _arterialPressure.value property real arterialPressureStep : 10 - property alias venousPressureMinimum : _venousPressureRangeBar.minimum - property alias venousPressureLowerBound: _venousPressureRangeBar.lowerBound - property alias venousPressureUpperBound: _venousPressureRangeBar.upperBound - property alias venousPressureMaximum : _venousPressureRangeBar.maximum - property alias venousPressureValue : _venousPressureRangeBar.value - property real venousPressureStep : 10 + property alias venousPressureMinimum : _venousPressure.minimum + property alias venousPressureLowerBound : _venousPressure.lowerBound + property alias venousPressureUpperBound : _venousPressure.upperBound + property alias venousPressureMaximum : _venousPressure.maximum + property alias venousPressureValue : _venousPressure.value + property real venousPressureStep : 10 readonly property int textWidth : 200 - readonly property int slidersTopMargin : 75 titleText: qsTr("PRESSURES") @@ -85,206 +85,38 @@ Column { id : _pressuresColumn spacing: 100 anchors.centerIn: parent - Row { id : _arterialPressureRow - spacing: 25 + PressureRangeSlider { id: _arterialPressure + titleText : qsTr("Arterial") anchors.horizontalCenter: parent.horizontalCenter - TextRect { id: _arterialPressureTextRect - anchors.top: parent.top - width: textWidth - label: qsTr("Arterial") - extra: Variables.unitTextBloodPressure - labelFont.pixelSize: Fonts.fontPixelPresseuresLabel - } - RangeBar { id: _arterialPressureRangeBar - width : Variables.pressuresProgressbarWidth - height : 15 - rangebar.color: Colors.pressuresArterialBar - - value : vTreatmentPressureOcclusion.pressureocclusion_ArterialPressure - - minimum : _root.arterialMinimum - lowerBound : _root.arterialLowerBound - upperBound : _root.arterialUpperBound - maximum : _root.arterialMaximum - - minText.visible : lowerBound !== minimum - maxText.visible : upperBound !== maximum - minText.anchors.topMargin: 25 - maxText.anchors.topMargin: 25 - minTextHorizontalCenter: true - maxTextHorizontalCenter: true - - minText.font.pixelSize : Fonts.fontPixelPresseuresText - maxText.font.pixelSize : Fonts.fontPixelPresseuresText - rangebar.minText.font.pixelSize : Fonts.fontPixelPresseuresText - rangebar.maxText.font.pixelSize : Fonts.fontPixelPresseuresText - markerFontSize : Fonts.fontPixelPresseuresText - - markerOutRangeNotify : true - } + minimum : arterialPressureMinimum + minimumMargin : 100 + lowerBound : arterialPressureLowerBound + upperBound : arterialPressureUpperBound + maximumMargin : 100 + maximum : arterialPressureMaximum + value : arterialPressureValue + step : arterialPressureStep } + Line { anchors.horizontalCenter: parent.horizontalCenter length : _root.width - 100 - color : "#5f809d" + color : Colors.separatorLine } - Row { id : _venousPressureRow - spacing: 25 + PressureRangeSlider { id: _venousPressure + titleText : qsTr("Arterial") anchors.horizontalCenter: parent.horizontalCenter - TextRect { id: _venousPressureTextRect - anchors.top: parent.top - width: textWidth - label: qsTr("Venous") - extra: Variables.unitTextBloodPressure - labelFont.pixelSize: Fonts.fontPixelPresseuresLabel - } - RangeBar { id: _venousPressureRangeBar - width : Variables.pressuresProgressbarWidth - height : 15 - rangebar.color: Colors.pressuresVenousBar - value : vTreatmentPressureOcclusion.pressureocclusion_VenousPressure - - minimum : _root.venousPressureMinimum - lowerBound : _root.venousPressureLowerBound - upperBound : _root.venousPressureUpperBound - maximum : _root.venousPressureMaximum - - minText.visible : lowerBound !== minimum - maxText.visible : upperBound !== maximum - minText.anchors.topMargin: 25 - maxText.anchors.topMargin: 25 - minTextHorizontalCenter: true - maxTextHorizontalCenter: true - - minText.font.pixelSize : Fonts.fontPixelPresseuresText - maxText.font.pixelSize : Fonts.fontPixelPresseuresText - rangebar.minText.font.pixelSize : Fonts.fontPixelPresseuresText - rangebar.maxText.font.pixelSize : Fonts.fontPixelPresseuresText - markerFontSize : Fonts.fontPixelPresseuresText - - markerOutRangeNotify : true - } + minimum : venousPressureMinimum + minimumMargin : 50 + lowerBound : venousPressureLowerBound + upperBound : venousPressureUpperBound + maximumMargin : 50 + maximum : venousPressureMaximum + value : venousPressureValue + step : venousPressureStep } } - RangeSlider { id: _arterialPressureSlider - property int diff: getXOfValue(-300) - // vertical position - y: _arterialPressureRangeBar.height + - _arterialPressureRangeBar.y + - _pressuresColumn .y + - _arterialPressureRow .y + - slidersTopMargin - - // horizontal location - x: _arterialPressureRangeBar.x + - _pressuresColumn .x + - _arterialPressureRow .x + - diff - width : _arterialPressureRangeBar.width - diff - // HERE : 2020/09/29 - // I have an error : - // qrc:/pages/treatment/adjustments/TreatmentAdjustmentPressures.qml:172:5: QML RangeSlider: Binding loop detected for property "diff" - - height : 5 - diameter: 30 - - decimal : 1 - bgColor : Colors.pressuresOutOfRaneBg - - //// //TODO : TEST : these two texts need to be removed - //// lowerText.visible: true - //// upperText.visible: true - - minText { - text : qsTr("LOW") - font.bold: true - font.pixelSize: Fonts.fontPixelPresseuresText - anchors.leftMargin: - minText.width - 20 - anchors.topMargin : - minText.height / 2 - 5 - color: "white" - } - maxText { - text : qsTr("HIGH") - font.bold: true - font.pixelSize: Fonts.fontPixelPresseuresText - anchors.rightMargin: - minText.width - 20 - anchors.topMargin : - minText.height / 2 - 5 - color: "white" - } - minValue: arterialPressureLowerBound - maxValue: arterialPressureUpperBound - minimum : arterialPressureMinimum - maximum : arterialPressureMaximum - unit : Variables.unitTextBloodPressure - step : arterialPressureStep - //ticks : true - - onMinValueChanged: { - arterialPressureLowerBound = minValue - } - onMaxValueChanged: { - arterialPressureUpperBound = maxValue - } - } - - RangeSlider { id: _venousPressureSliders - // vertical position - y: _venousPressureRangeBar .height + - _venousPressureRangeBar .y + - _pressuresColumn .y + - _venousPressureRow .y + - slidersTopMargin - - - // horizontal location - x: _venousPressureRangeBar .x + - _pressuresColumn .x + - _venousPressureRow .x - width : _venousPressureRangeBar.width - - height : 5 - diameter: 30 - - decimal : 1 - bgColor : Colors.pressuresOutOfRaneBg - - //// //TODO : TEST : these two texts need to be removed - //// lowerText.visible: trues - //// upperText.visible: true - - minText { - text : qsTr("LOW") - font.bold: true - font.pixelSize: Fonts.fontPixelPresseuresText - anchors.leftMargin: - minText.width - 20 - anchors.topMargin : - minText.height / 2 - 5 - color: "white" - } - maxText { - text : qsTr("HIGH") - font.bold: true - font.pixelSize: Fonts.fontPixelPresseuresText - anchors.rightMargin: - minText.width - 20 - anchors.topMargin : - minText.height / 2 - 5 - color: "white" - } - minimum : venousPressureMinimum - maximum : venousPressureMaximum - unit : Variables.unitTextBloodPressure - step : venousPressureStep - //ticks : true - - minValue: venousPressureLowerBound - maxValue: venousPressureUpperBound - - onMinValueChanged: { - venousPressureLowerBound = minValue - } - onMaxValueChanged: { - venousPressureUpperBound = maxValue - } - } }