Index: sources/gui/qml/pages/treatment/TreatmentCreate.qml =================================================================== diff -u -r6e4cc1f67e9290035b4e3a5be2eac04a85ae0c9a -rf8321d4b6a5489f797122321a4821b4eeaaa50cb --- sources/gui/qml/pages/treatment/TreatmentCreate.qml (.../TreatmentCreate.qml) (revision 6e4cc1f67e9290035b4e3a5be2eac04a85ae0c9a) +++ sources/gui/qml/pages/treatment/TreatmentCreate.qml (.../TreatmentCreate.qml) (revision f8321d4b6a5489f797122321a4821b4eeaaa50cb) @@ -43,8 +43,7 @@ } - Flickable { - id: _flickable + Flickable { id: _flickable anchors.top: _topMenuBar.bottom anchors.left: parent.left anchors.bottom: parent.bottom @@ -53,9 +52,19 @@ contentHeight: _column.implicitHeight clip: true - Column { - id: _column - spacing: Variables.cTreatmentSpacing + ScrollBar.vertical: ScrollBar { id: _scrollBar + anchors.right: _flickable.right + anchors.rightMargin: 3 + contentItem: Rectangle { + color: Colors.backgroundRangeRect + implicitWidth: 6 + radius: width / 2 + width: 3 + } + } + + Column { id: _column + spacing: Variables.treatmentSpacing anchors.horizontalCenter: parent.horizontalCenter; anchors.fill: parent; @@ -75,92 +84,86 @@ } - SliderCreateTreatment { - id: _bloodFlowRate + SliderCreateTreatment { id: _bloodFlowRate objectName: "_bloodFlowRate" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Blood Flow Rate" - units: qsTr(" mL/min") min: vTreatmentCreate.bloodFlowRateMin max: vTreatmentCreate.bloodFlowRateMax step: vTreatmentCreate.bloodFlowRateRes + text: qsTr("Blood Flow Rate") + units: qsTr("mL/min") onSliderChanged: { vTreatmentCreate.bloodFlowRate = value; } } - SliderCreateTreatment { - id: _dialysateFlowRate + SliderCreateTreatment { id: _dialysateFlowRate objectName: "_dialysateFlowRate" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Dialysate Flow Rate" - units: qsTr(" mL/min") min: vTreatmentCreate.dialysateFlowRateMin max: vTreatmentCreate.dialysateFlowRateMax step: vTreatmentCreate.dialysateFlowRateRes + text: qsTr("Dialysate Flow Rate") + units: qsTr("mL/min") onSliderChanged: { vTreatmentCreate.dialysateFlowRate = value; } } - SliderCreateTreatment { - id: _duration + SliderCreateTreatment { id: _duration objectName: "_duration" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Duration" - units: qsTr(" min") min: vTreatmentCreate.durationMin max: vTreatmentCreate.durationMax step: vTreatmentCreate.durationRes + text: qsTr("Duration") + units: qsTr("min") onSliderChanged: { vTreatmentCreate.duration = value; } } - SliderCreateTreatment { - id: _heparinDispensingRate + SliderCreateTreatment { id: _heparinDispensingRate objectName: "_heparinDispensingRate" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Heparin Dispensing Rate" - units: qsTr(" mL/hr") min: vTreatmentCreate.heparinDispensingRateMin max: vTreatmentCreate.heparinDispensingRateMax step: vTreatmentCreate.heparinDispensingRateRes - + text: qsTr("Heparin Dispensing Rate") + units: qsTr("mL/hr") onSliderChanged: { vTreatmentCreate.heparinDispensingRate = value; } } - SliderCreateTreatment { - id: _heparinBolusVolume + SliderCreateTreatment { id: _heparinBolusVolume objectName: "_heparinBolusVolume" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Heparin Bolus Volume" - units: qsTr(" mL") min: vTreatmentCreate.heparinBolusVolumeMin max: vTreatmentCreate.heparinBolusVolumeMax step: vTreatmentCreate.heparinBolusVolumeRes + + text: qsTr("Heparin Bolus Volume") + units: qsTr("mL") onSliderChanged: { vTreatmentCreate.heparinBolusVolume = value; } } - SliderCreateTreatment { - id: _heparinStopTime + SliderCreateTreatment { id: _heparinStopTime objectName: "_heparinStopTime" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Heparin Stop Time" - units: qsTr(" min") min: vTreatmentCreate.heparinStopTimeMin max: vTreatmentCreate.heparinStopTimeMax step: vTreatmentCreate.heparinStopTimeRes + text: qsTr("Heparin Stop Time") + units: qsTr("min") onSliderChanged: { vTreatmentCreate.heparinStopTime = value; } @@ -182,17 +185,16 @@ GridSelection { id: _acidConcentrate objectName: "_acidConcentrateRect" - name: "Acid Concentrate" + name: qsTr("Acid Concentrate") buttonNames: vTreatmentCreate.acidConcentrateOptions; onButtonClicked: { vTreatmentCreate.acidConcentrate = selectedIndex; } } - GridSelection { - id: _bicarbonateConcentrate + GridSelection { id: _bicarbonateConcentrate objectName: "_bicarbonateConcentrateRect" - name: "Bicarbonate Concentrate" + name: qsTr("Bicarbonate Concentrate") numRows: 1 numCols: 2 buttonNames: vTreatmentCreate.bicarbonateConcentrateOptions; @@ -201,10 +203,9 @@ } } - GridSelection { - id: _dialyzerType + GridSelection { id: _dialyzerType objectName: "_dialyzerTypeRect" - name: "Dialyzer Type" + name: qsTr("Dialyzer Type") numRows: 3 numCols: 2 buttonNames: vTreatmentCreate.dialyzerTypeOptions; @@ -213,41 +214,38 @@ } } - SliderCreateTreatment { - id: _dialysateTemperature + SliderCreateTreatment { id: _dialysateTemperature objectName: "_dialysateTemperature" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Dialysate Temperature" - units: qsTr(" C") min: vTreatmentCreate.dialysateTempMin max: vTreatmentCreate.dialysateTempMax step: vTreatmentCreate.dialysateTempRes + text: qsTr("Dialysate Temperature") + units: qsTr("C") onSliderChanged: { vTreatmentCreate.dialysateTemp = value; } } - Text { - id: _arterialPressureLimitsTitle - text: "Arterial Pressure Limits" + Text { id: _arterialPressureLimitsTitle + text: qsTr("Arterial Pressure Limits") anchors.left: _arterialPressureLimits.left font.pixelSize: Fonts.fontPixelFluidText color: Colors.textMain; } - SliderDoubleCreateTreatment { - id: _arterialPressureLimits + SliderDoubleCreateTreatment { id: _arterialPressureLimits objectName: "_arterialPressureLimits" lowSliderObjectName: objectName + "LowSlider" lowSelectedValueObjectName: objectName + "LowValue" highSliderObjectName: objectName + "HighSlider" highSelectedValueObjectName: objectName + "HighValue" - lowTitle: "Low" - lowUnits: " mmHg" - highTitle: "High" - highUnits: " mmHg" + lowTitle: qsTr("Low") + lowUnits: qsTr("mmHg") + highTitle: qsTr("High") + highUnits: qsTr("mmHg") lowMin: vTreatmentCreate.arterialPressureLimitLowMin lowMax: vTreatmentCreate.arterialPressureLimitLowMax highMin: vTreatmentCreate.arterialPressureLimitHighMin @@ -265,26 +263,24 @@ } - Text { - id: _venousPressureLimitsTitle - text: "Venous Pressure Limits" + Text { id: _venousPressureLimitsTitle + text: qsTr("Venous Pressure Limits") anchors.left: _venousPressureLimits.left font.pixelSize: Fonts.fontPixelFluidText color: Colors.textMain; } - SliderDoubleCreateTreatment { - id: _venousPressureLimits + SliderDoubleCreateTreatment { id: _venousPressureLimits objectName: "_venousPressureLimits" lowSliderObjectName: objectName + "LowSlider" lowSelectedValueObjectName: objectName + "LowValue" highSliderObjectName: objectName + "HighSlider" highSelectedValueObjectName: objectName + "HighValue" - lowTitle: "Low" - lowUnits: " mmHg" - highTitle: "High" - highUnits: " mmHg" + lowTitle: qsTr("Low") + lowUnits: Variables.unitTextBloodPressure + highTitle: qsTr("High") + highUnits: Variables.unitTextBloodPressure lowMin: vTreatmentCreate.venousPressureLimitLowMin lowMax: vTreatmentCreate.venousPressureLimitLowMax highMin: vTreatmentCreate.venousPressureLimitHighMin @@ -301,13 +297,12 @@ } } - SliderCreateTreatment { - id: _bloodPressureMeasurementInterval + SliderCreateTreatment { id: _bloodPressureMeasurementInterval objectName: "_bloodPressureMeasurementInterval" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Blood Pressure Measurement Interval" - units: qsTr(" min") + text: qsTr("Blood Pressure Measurement Interval") + units: Variables.unitTextBPMeasurementInterval min: vTreatmentCreate.bloodPressureMeasureIntervalMin max: vTreatmentCreate.bloodPressureMeasureIntervalMax step: vTreatmentCreate.bloodPressureMeasureIntervalRes @@ -317,13 +312,12 @@ } } - SliderCreateTreatment { - id: _rinsebackFlowRate + SliderCreateTreatment { id: _rinsebackFlowRate objectName: "_rinsebackFlowRate" sliderObjectName: objectName + "Slider" selectedValueObjectName: objectName + "Value" - text: "Rinseback Flow Rate" - units: qsTr(" mL/min") + text: qsTr("Rinseback Flow Rate") + units: Variables.unitTextFlowRate min: vTreatmentCreate.rinsebackFlowRateMin max: vTreatmentCreate.rinsebackFlowRateMax step: vTreatmentCreate.rinsebackFlowRateRes @@ -339,7 +333,7 @@ text.text: qsTr("CONTINUE") backgroundColor: Colors.createTreatmentNotReady borderColor: Colors.createTreatmentNotReady - textColor: Colors.createTrTextNotReady + textColor: Colors.createTreatmentTextNotReady button.onClicked: { vTreatmentCreate.saveTreatmentProfile = false; if (vTreatmentCreate.continueEnabled) { @@ -351,11 +345,11 @@ if (enabled) { backgroundColor = Colors.createTreatmentActive borderColor = Colors.createTreatmentActive - textColor = Colors.createTrTextReady + textColor = Colors.createTreatmentTextReady } else { backgroundColor = Colors.createTreatmentNotReady borderColor = Colors.createTreatmentNotReady - textColor = Colors.createTrTextNotReady + textColor = Colors.createTreatmentTextNotReady } } } @@ -369,37 +363,6 @@ } } - states: [ - State { - when: _flickable.movingVertically - PropertyChanges { - target: _verticalScrollBar - opacity: 0.8 - } - } - ] - - ScrollBar { - anchors.top: _flickable.top - anchors.bottom: _flickable.bottom - id: _verticalScrollBar - size: _flickable.height / _column.implicitHeight - active: true - anchors.right: _flickable.right - anchors.rightMargin: 5 - opacity: 0 - orientation: Qt.Vertical - position: _flickable.visibleArea.yPosition - - contentItem: Rectangle { - color: Colors.backgroundRangeRect - implicitWidth: 6 - radius: width / 2 - width: 3 - } - - } - onVisibleChanged: { if (visible) { _mainMenu.hidden = true @@ -417,7 +380,6 @@ } onResetCreateTreatment: { - console.log("resetting create treatment"); _bloodFlowRate.isActive = false; _dialysateFlowRate.isActive = false; _duration.isActive = false; @@ -442,92 +404,74 @@ } onFwValidationFailed: { - console.debug("Fw validation failed: " + reason) } onBloodFlowRate_ValidationFailed: { - console.debug("Blood flow validation failed: " + reason) _bloodFlowRate.setValid(false) } onDialysateFlowRate_ValidationFailed: { - console.debug("Dialysate flow rate validation failed: " + reason) _dialysateFlowRate.setValid(false) } onDuration_ValidationFailed: { - console.debug("Duration validation failed: " + reason) _duration.setValid(false) } onHeparinDispensingRate_ValidationFailed: { - console.debug("Heparin dispensing rate validation failed: " + reason) _heparinDispensingRate.setValid(false) } onHeparinBolusVolume_ValidationFailed: { - console.debug("Heparin bolus volume validation failed: " + reason) _heparinBolusVolume.setValid(false) } onHeparinStopTime_ValidationFailed: { - console.debug("Heparin stop time validation failed: " + reason) _heparinStopTime.setValid(false) } onSalineBolusVolume_ValidationFailed: { - console.debug("Saline bolus volume validation failed: " + reason) _salineBolus.setValid(false) } onAcidConcentrate_ValidationFailed: { - console.debug("Acid concentrate validation failed: " + reason) _acidConcentrate.setValid(false) } onBicarbonateConcentrate_ValidationFailed: { - console.debug("Bicarbonate concentrate validation failed: " + reason) _bicarbonateConcentrate.setValid(false) } onDialyzerType_ValidationFailed: { - console.debug("Dialyzer type validation failed: " + reason) _dialyzerType.setValid(false) } onDialysateTemp_ValidationFailed: { - console.debug("Dialysate temp validation failed: " + reason) _dialysateTemperature.setValid(false) } onArterialPressureLimitLow_ValidationFailed: { - console.debug("Arterial pressure limit low validation failed: " + reason) _arterialPressureLimits.setLowValid(false) } onArterialPressureLimitHigh_ValidationFailed: { - console.debug("Arterial pressure limit high validation failed: " + reason) _arterialPressureLimits.setHighValid(false) } onVenousPressureLimitLow_ValidationFailed: { - console.debug("Venous pressure limit low validation failed: " + reason) _venousPressureLimits.setLowValid(false) } onVenousPressureLimitHigh_ValidationFailed: { - console.debug("Venous pressure limit high validation failed: " + reason) _venousPressureLimits.setHighValid(false) } onBloodPressureMeasureInterval_ValidationFailed: { - console.debug("Blood pressure measure interval validation failed: " + reason) _bloodPressureMeasurementInterval.setValid(false) } onRinsebackFlowRate_ValidationFailed: { - console.debug("Rinseback flow rate validation failed: " + reason) _rinsebackFlowRate.setValid(false) }