Index: leahi.qrc =================================================================== diff -u -rab7efbd73d4a4c0a0a10886629f9a5975ca08315 -r7805806e4370be4d9207872e916f478875bd4ba6 --- leahi.qrc (.../leahi.qrc) (revision ab7efbd73d4a4c0a0a10886629f9a5975ca08315) +++ leahi.qrc (.../leahi.qrc) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -79,6 +79,11 @@ resources/images/Unlock.png resources/images/Wifi.png resources/images/PauseOrange.png + resources/images/arrowDownActive.png + resources/images/arrowDownInactive.png + resources/images/arrowsExpanding.png + resources/images/arrowUpActive.png + resources/images/arrowUpInactive.png sources/gui/qml/components/MainMenu.qml @@ -238,6 +243,7 @@ sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml sources/gui/qml/pages/treatment/sections/TreatmentHeparin.qml sources/gui/qml/pages/treatment/sections/TreatmentPressureComponent.qml + sources/gui/qml/pages/treatment/sections/TreatmentFlowsComponent.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentFlow.qml Index: sources/gui/qml/components/LabelValue.qml =================================================================== diff -u -rab7efbd73d4a4c0a0a10886629f9a5975ca08315 -r7805806e4370be4d9207872e916f478875bd4ba6 --- sources/gui/qml/components/LabelValue.qml (.../LabelValue.qml) (revision ab7efbd73d4a4c0a0a10886629f9a5975ca08315) +++ sources/gui/qml/components/LabelValue.qml (.../LabelValue.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -11,29 +11,58 @@ property string topTextColor : Colors.textTextRectLabel property alias topTextFont : _topText.font + property string centerText : "" + property bool showCenterText : false + property bool leftAlign : false + property string bottomText : "" property string bottomTextColor : Colors.textTextRectLabel + property alias bottomTextFont : _bottomText.font + property string unitText : "" + clip: false Text { id: _topText anchors { top: parent.top - horizontalCenter: parent.horizontalCenter + left: leftAlign ? parent.left: undefined + horizontalCenter: leftAlign ? undefined : parent.horizontalCenter } - text: _root.topText color: topTextColor font.pixelSize: Fonts.fontPixelTextRectLabel } + Text { id: _centerText + anchors { + top : _topText.bottom + left : _topText.left + } + text: _root.centerText + color: topTextColor + font.pixelSize: 20 + } + Text { id: _bottomText anchors { - top: _topText.bottom - horizontalCenter: _topText.horizontalCenter + top: showCenterText ? _centerText.bottom :_topText.bottom + horizontalCenter: leftAlign ? undefined : _topText.horizontalCenter } text: _root.bottomText color: bottomTextColor font.pixelSize: Fonts.fontPixelTextRectExtra } + + Text { id: _unitText + anchors { + left: _bottomText.right + leftMargin: 5 + bottom: _bottomText.bottom + bottomMargin: 10 + } + text: _root.unitText + color: topTextColor + font.pixelSize: 22 + } } Index: sources/gui/qml/components/ProgressBar.qml =================================================================== diff -u -r622129c7f05af77f361d7e055eb7bcccaba1a0f9 -r7805806e4370be4d9207872e916f478875bd4ba6 --- sources/gui/qml/components/ProgressBar.qml (.../ProgressBar.qml) (revision 622129c7f05af77f361d7e055eb7bcccaba1a0f9) +++ sources/gui/qml/components/ProgressBar.qml (.../ProgressBar.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -39,6 +39,8 @@ property alias decimal : _root.decimal property alias minimum : _root.minimum property alias maximum : _root.maximum + property color gradientStart : _root.color + property color gradientEnd : _root.color signal progressClicked() @@ -60,8 +62,8 @@ minimum : _root.minimum maximum : _root.maximum value : _root.value - gradientStart : Colors.progressBarGradientStart - gradientEnd : Colors.progressBarGradientEnd + gradientStart : _root.gradientStart + gradientEnd : _root.gradientEnd onClicked : progressClicked() } Index: sources/gui/qml/components/ProgressBarEx.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r7805806e4370be4d9207872e916f478875bd4ba6 --- sources/gui/qml/components/ProgressBarEx.qml (.../ProgressBarEx.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/components/ProgressBarEx.qml (.../ProgressBarEx.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -34,6 +34,8 @@ minText.visible : true maxText.visible : true + radius : height + progressRadius : radius ProgressRect { id: _progressRectEx z : 0 // ProgressBarEx z order in the gui @@ -44,9 +46,17 @@ maximum : _root.maximum value : _root.valueEx - color : Colors.highlightMedProgressBar maxText.visible: visible margin : 0 onClicked: extraClicked() } + + Rectangle { id: _rightBackground // quick workaround to get the look of the progress bar as design + color: gradientEnd + height: parent.height + width: 20 + anchors.right: progress.right + visible: value > 0 + + } } Index: sources/gui/qml/components/RangeMarker.qml =================================================================== diff -u -r526fb054edbbeebdcce33ca630ae08ba04067fac -r7805806e4370be4d9207872e916f478875bd4ba6 --- sources/gui/qml/components/RangeMarker.qml (.../RangeMarker.qml) (revision 526fb054edbbeebdcce33ca630ae08ba04067fac) +++ sources/gui/qml/components/RangeMarker.qml (.../RangeMarker.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -28,6 +28,7 @@ property int decimal : 0 property alias text : _textValue + property alias font : _textValue.font property color color : Colors.rangeMarker property alias thickness : _root.width property alias hasHandle : _handle.visible Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r526fb054edbbeebdcce33ca630ae08ba04067fac -r7805806e4370be4d9207872e916f478875bd4ba6 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 526fb054edbbeebdcce33ca630ae08ba04067fac) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -210,7 +210,7 @@ // Ultrafiltration readonly property real ultrafiltrationMinDef : 0.000 readonly property real ultrafiltrationMaxDef : 8.000 - readonly property int ultrafiltrationPrecision : 3 + readonly property int ultrafiltrationPrecision : 2 // Heparin readonly property int heparinPrecision : 1 @@ -259,11 +259,13 @@ // - Flows readonly property string unitTextFlowRate : qsTr("mL/min") readonly property string unitTextDispensingRate : qsTr("mL/hr") + readonly property string unitTextRate : qsTr("L/h") // - Vitals readonly property string unitTextBloodPressure : qsTr("mmHg") readonly property string unitTextHeartBeat : qsTr("BPM" ) // - Fluid readonly property string unitTextVolume : qsTr("(L)") + readonly property string unitVolume : qsTr("L") readonly property string unitTextFluid : qsTr("mL") readonly property string unitTextSaline : unitTextFluid readonly property string unitTextHeparin : unitTextFluid Index: sources/gui/qml/pages/treatment/TreatmentHome.qml =================================================================== diff -u -rab7efbd73d4a4c0a0a10886629f9a5975ca08315 -r7805806e4370be4d9207872e916f478875bd4ba6 --- sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision ab7efbd73d4a4c0a0a10886629f9a5975ca08315) +++ sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -45,6 +45,47 @@ onLogVitalTime: _vitalsTreatmentArea.updateVitalTime() + AutoHideInfo { id: _lockDialog + width: 600 + height: 600 + backgroundColor: "#091E31" + + Rectangle { id: _mainCircle + anchors { + top: parent.top + topMargin: Variables.defaultMargin * 3 + horizontalCenter: parent.horizontalCenter + } + height : 200 + width : height + radius : height + color: "transparent" + border.color: _treatmentParametersMonitor.editEnabled ? "#6697D2" : + "#A47E38" + border.width: 3 + + Image { id : _iconImage + anchors.centerIn : parent + height : 80 + width : 80 + fillMode: Image.PreserveAspectFit + source : _treatmentParametersMonitor.editEnabled ? "qrc:/images/iUnlock" : + "qrc:/images/iLock" + } + + Rectangle { id: _innerCircle + anchors.centerIn: parent + color: "transparent" + border.color: _treatmentParametersMonitor.editEnabled ? "#8FC1FE" : + "#CDAF78" + border.width: 2 + height: parent.height - 20 + width: height + radius : height + } + } + } + Column { id: _column spacing: Variables.defaultMargin @@ -108,86 +149,28 @@ spacing: Variables.defaultMargin height: cellHeight - TreatmentSection { id: _ultrafiltrationMonitor + TreatmentUltrafiltration { id: _ultrafiltrationTreatmentArea; width: cellWidth * 3 height: cellHeight - - header.title: qsTr("Ultrafiltration") + " (" + qsTr("UF") + ")" - + onEditClicked : sectionUltrafiltrationClicked() } - TreatmentSection { id: _treatmentParametersMonitor + TreatmentFlows { id: _treatmentParametersMonitor width: cellWidth * 4 height: cellHeight - - header.title: qsTr("Treatment Parameters") - header.showLock: true - + onEditClicked : sectionFlowClicked() + onLockClicked : { + _lockDialog.showDialog ( + editEnabled ? qsTr("Treatment Parameters Unlocked") : + qsTr("Treatment Parameters Locked"), + 3000 + ) + } } } - - - } - - - - - - - - -// TreatmentFlows { id: _flowsTouchArea -// x : Variables.screenGridLeftColumnX -// y : Variables.screenGridRow3Y + 400 -// width : Variables.screenGridAreaWidth -// height : Variables.screenGridAreaHeightRow3 -// onClicked: { -// sectionFlowClicked() -// } -// } - - - - -// TreatmentPressures { id: _pressuresTouchArea -// x : Variables.screenGridLeftColumnX -// y : Variables.screenGridRow1Y + 400 -// width : Variables.screenGridAreaWidth -// height : Variables.screenGridAreaHeightRow1 -// onClicked: { -// sectionPressuresClicked() -// } -// } - -// // ---------- COLUMN RIGHT -// TreatmentUltrafiltration { id: _ultrafiltrationTouchArea; -// x : Variables.screenGridRightColumnX -// y : Variables.screenGridRow1Y + 400 -// width : Variables.screenGridAreaWidth -// height : Variables.screenGridAreaHeightRow1 -// onClicked : { -// sectionUltrafiltrationClicked() -// } -// } - - -// TreatmentSaline { id: _salineTouchArea -// x : Variables.screenGridRightColumnX -// y : Variables.screenGridRow2Y + 400 -// width : Variables.screenGridAreaWidth -// height : Variables.screenGridAreaHeightRow2 -// } -// Line { x: Variables.screenGridRightLinesX; y: Variables.screenGridRow2LineY; length: Variables.screenGridLineLength; } -// TreatmentHeparin { id: _heparinTouchArea -// x : Variables.screenGridRightColumnX -// y : Variables.screenGridRow3Y + 400 -// width : Variables.screenGridAreaWidth -// height : Variables.screenGridAreaHeightRow3 -// } - // // ---------- Center // TreatmentTime { id: _treatmentTime // onClicked: { Index: sources/gui/qml/pages/treatment/TreatmentSection.qml =================================================================== diff -u -r46e41ed9fff827146079e1ed4b03425b310dd0c6 -r7805806e4370be4d9207872e916f478875bd4ba6 --- sources/gui/qml/pages/treatment/TreatmentSection.qml (.../TreatmentSection.qml) (revision 46e41ed9fff827146079e1ed4b03425b310dd0c6) +++ sources/gui/qml/pages/treatment/TreatmentSection.qml (.../TreatmentSection.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -25,12 +25,14 @@ property alias header : _header signal editClicked + signal lockClicked color: Colors.treatmentSectionMain radius: 15 TreatmentSectionHeader { id: _header onEditClicked : _root.editClicked() + onLockClicked : _root.lockClicked() } ContentArea { id : _contentArea @@ -41,6 +43,7 @@ leftMargin: Variables.defaultMargin right: _root.right rightMargin: Variables.defaultMargin + bottom: _root.bottom } contentItem: _root.contentItem Index: sources/gui/qml/pages/treatment/TreatmentSectionHeader.qml =================================================================== diff -u -rab7efbd73d4a4c0a0a10886629f9a5975ca08315 -r7805806e4370be4d9207872e916f478875bd4ba6 --- sources/gui/qml/pages/treatment/TreatmentSectionHeader.qml (.../TreatmentSectionHeader.qml) (revision ab7efbd73d4a4c0a0a10886629f9a5975ca08315) +++ sources/gui/qml/pages/treatment/TreatmentSectionHeader.qml (.../TreatmentSectionHeader.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -26,6 +26,7 @@ property bool showEdit : true signal editClicked + signal lockClicked color: Colors.treatmentSectionHeader height : Variables.contentHeight + (Variables.defaultMargin * 2) @@ -54,7 +55,10 @@ visible : showLock iconImage.source : editEnabled ? "qrc:/images/iUnlock" : "qrc:/images/iLock" - onPressed : editEnabled = !editEnabled + onPressed : { + editEnabled = !editEnabled + _root.lockClicked() + } } TreatmentSectionIcon { id : _editButton Index: sources/gui/qml/pages/treatment/TreatmentSectionIcon.qml =================================================================== diff -u -r26af78da75502c56dcff8ad402e63d64a496f341 -r7805806e4370be4d9207872e916f478875bd4ba6 --- sources/gui/qml/pages/treatment/TreatmentSectionIcon.qml (.../TreatmentSectionIcon.qml) (revision 26af78da75502c56dcff8ad402e63d64a496f341) +++ sources/gui/qml/pages/treatment/TreatmentSectionIcon.qml (.../TreatmentSectionIcon.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -20,15 +20,16 @@ import "qrc:/components" TouchRect { id : _icon - property alias iconImage : _iconImage + property alias iconImage : _iconImage + property int iconSize : Variables.treatmentSectionIconSize - width : Variables.treatmentSectionIconSize - height : Variables.treatmentSectionIconSize + width : iconSize + height : iconSize border.color: "transparent" Image { id : _iconImage - height : Variables.treatmentSectionIconSize - width : Variables.treatmentSectionIconSize + height : iconSize + width : iconSize fillMode: Image.PreserveAspectFit source : "" } Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -rab7efbd73d4a4c0a0a10886629f9a5975ca08315 -r7805806e4370be4d9207872e916f478875bd4ba6 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision ab7efbd73d4a4c0a0a10886629f9a5975ca08315) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -31,11 +31,6 @@ */ StackItem { id : _root objectName: "TreatmentStack" - enum Page { - Treatment, - Trends, - Heparin - } onVisibleChanged : { // this should never happen by design, but in tests it can easily happen and will block the screen touch. _treatmentAdjustmentFlow .close() @@ -76,9 +71,9 @@ console.debug("stackView + " + stackView.index) console.debug("depth + " + stackView.depth) if (stackView.depth > 2) pop() - if (currentIndex === TreatmentStack.Page.Heparin) push(_treatmentHeparin) - if (currentIndex === TreatmentStack.Page.Trends) push(_treatmentTrends) - if (currentIndex === TreatmentStack.Page.Treatment) pop() + if (currentIndex === 2) push(_treatmentHeparin) + if (currentIndex === 1) push(_treatmentTrends) + if (currentIndex === 0) pop() } Row { id: _headerButtonRow Index: sources/gui/qml/pages/treatment/sections/TreatmentFlows.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r7805806e4370be4d9207872e916f478875bd4ba6 --- sources/gui/qml/pages/treatment/sections/TreatmentFlows.qml (.../TreatmentFlows.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/treatment/sections/TreatmentFlows.qml (.../TreatmentFlows.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -25,31 +25,52 @@ /*! * \brief Treatment Screen Flows section */ -TouchArea { id: _root - x : 0 - y : 0 - title : qsTr("FLOWS") - width : 370 +TreatmentSection { id: _root + property bool editEnabled : header.editEnabled - Row { - spacing: 40 - anchors.top: _root.top - anchors.topMargin: 40 - TextRect { id: _bloodFlow - title : qsTr("Blood") - label : Variables.notSetVariable(vTreatmentBloodFlow.bloodFlow_PresFlow) - extra : Variables.unitTextFlowRate - labelFont.weight: Font.ExtraLight - width : 180 - height: 200 + header.title: qsTr("Treatment Parameters") + header.showLock: true + + contentItem: Row { id: _row + property int cellWidth : (contentItem.width / 4) - (Variables.defaultMargin) + 5 + + spacing: Variables.defaultMargin + topPadding: -Variables.defaultMargin + + TreatmentFlowsComponent { id: _bloodFlow + title: qsTr("Blood Flow") + height: contentItem.height // 2 + width: _row.cellWidth + value: "320"//Variables.notSetVariable(vTreatmentBloodFlow.bloodFlow_PresFlow) + unitText: Variables.unitTextFlowRate } - TextRect { id: _dialysateInletFlow - title: qsTr("Dialysate") - label: Variables.notSetVariable(vTreatmentDialysateFlow.dialysateFlow_PresFlow) - extra: Variables.unitTextFlowRate - labelFont.weight: Font.ExtraLight - width: 180 - height: 200 + + TreatmentFlowsComponent { id: _dialysateFlow + title: qsTr("Dialysate Flow") + height: contentItem.height // 2 + width: _row.cellWidth + value: Variables.notSetVariable(vTreatmentBloodFlow.dialysateFlow_PresFlow) + unitText: Variables.unitTextFlowRate } + + + TreatmentFlowsComponent { id: _dialysateTemp + title: qsTr("Dialysat Temp.") + height: contentItem.height // 2 + width: _row.cellWidth + value: Variables.notSetVariable(vTreatmentBloodFlow.bloodFlow_PresFlow) + unitText: Variables.unitTextTemperature + } + + + + TreatmentFlowsComponent { id: _dialysateCond + title: qsTr("Dialysat Cond.") + height: contentItem.height // 2 + width: _row.cellWidth + value: Variables.notSetVariable(vTreatmentBloodFlow.bloodFlow_PresFlow) + unitText: Variables.unitTextDialCond + showButtons: false + } } } Index: sources/gui/qml/pages/treatment/sections/TreatmentFlowsComponent.qml =================================================================== diff -u --- sources/gui/qml/pages/treatment/sections/TreatmentFlowsComponent.qml (revision 0) +++ sources/gui/qml/pages/treatment/sections/TreatmentFlowsComponent.qml (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -0,0 +1,122 @@ + +// Qt +import QtQuick 2.12 + +// Project + +// Qml imports +//import "qrc:/globals" +//import "qrc:/components" +//import "qrc:/pages/treatment" + +import "../../../globals" +import "../../../components" +import "../" + +Rectangle { id: _root + + property string title : "" + property string value : "" + property string unitText : "" + + property bool showButtons : true + property bool buttonsEnabled: true + + color: Colors.treatmentFlowComponent + radius: 5 + + Text { id: _title + anchors { + horizontalCenter : _root.horizontalCenter + top : parent.top + topMargin : Variables.defaultMargin + } + + width : _root.width + height : Variables.contentHeight + text : _root.title + color : Colors.pressuresText + font { + pixelSize : 28 + weight : Font.Medium + } + horizontalAlignment : Text.AlignHCenter + } + + + Row { id: _row + anchors { + top : _title.bottom + topMargin : Variables.defaultMargin + horizontalCenter : _root.horizontalCenter + +// left : _root.left +// leftMargin : Variables.defaultMargin + } + + LabelValue { id: _value +// height: 50 +// width: 100//_root.width + topTextFont.pixelSize: 65 + topTextFont.weight: Font.Medium + topText: value + bottomText: _root.unitText + bottomTextFont.pixelSize: 24 + } + + Column { id: _column + visible: showButtons + spacing: Variables.defaultMargin + + + TreatmentSectionIcon { id : _upArrowIcon +// anchors { +// top : header.bottom +// topMargin : Variables.defaultMargin +// right : parent.right +// rightMargin : Variables.defaultMargin +// } + enabled : buttonsEnabled + iconSize : 70 + iconImage.source : enabled ? "qrc:/images/arrowUpActive" : + "qrc:/images/arrowUpInactive" + + onClicked : { + // TODO + } + } + + + TreatmentSectionIcon { id : _downArrowIcon +// anchors { +// top : header.bottom +// topMargin : Variables.defaultMargin +// right : parent.right +// rightMargin : Variables.defaultMargin +// } + + enabled : buttonsEnabled + iconSize : 70 + iconImage.source : enabled ? "qrc:/images/arrowDownActive" : + "qrc:/images/arrowDownInactive" + + onClicked : { + // TODO + } + } + + + } + +// LabelValue { id: _value1 +// height: 50 +// width: 100//_root.width +// topTextFont.pixelSize: Fonts.fontPixelVitals +// topTextFont.weight: Font.Medium +// topText: value +// bottomText: unitText +// } + + } + +} Index: sources/gui/qml/pages/treatment/sections/TreatmentPressureComponent.qml =================================================================== diff -u -r526fb054edbbeebdcce33ca630ae08ba04067fac -r7805806e4370be4d9207872e916f478875bd4ba6 --- sources/gui/qml/pages/treatment/sections/TreatmentPressureComponent.qml (.../TreatmentPressureComponent.qml) (revision 526fb054edbbeebdcce33ca630ae08ba04067fac) +++ sources/gui/qml/pages/treatment/sections/TreatmentPressureComponent.qml (.../TreatmentPressureComponent.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -21,6 +21,9 @@ property int titleSize : 35 property int valueSize : 60 + property int prevMaximum : _rangeBar.maximum + property int prevMinimum : _rangeBar.minimum + spacing: Variables.defaultMargin * 2 Text { id: _title @@ -55,4 +58,16 @@ color : valueOutRangeNotify ? Colors.backgroundRangeRect : rangebar.color markerBoundColor : Colors.rangeMarker } + + function expandRangeBar() { + prevMinimum = _rangeBar.minimum + prevMaximum = _rangeBar.maximum + _rangeBar.minimum = lowerBound - 20 + _rangeBar.maximum = upperBound + 20 + } + + function resetRangeBar() { + _rangeBar.minimum = prevMinimum + _rangeBar.maximum = prevMaximum + } } Index: sources/gui/qml/pages/treatment/sections/TreatmentPressures.qml =================================================================== diff -u -r46e41ed9fff827146079e1ed4b03425b310dd0c6 -r7805806e4370be4d9207872e916f478875bd4ba6 --- sources/gui/qml/pages/treatment/sections/TreatmentPressures.qml (.../TreatmentPressures.qml) (revision 46e41ed9fff827146079e1ed4b03425b310dd0c6) +++ sources/gui/qml/pages/treatment/sections/TreatmentPressures.qml (.../TreatmentPressures.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -49,7 +49,6 @@ header.title: qsTr("Pressures") + " (" + qsTr("mmHg") + ")" - contentItem: Column { id: _column spacing: Variables.defaultMargin * 4 topPadding : Variables.defaultMargin @@ -100,7 +99,42 @@ valueOutRangeNotify : _root.valueOutRangeNotify } + } + TreatmentSectionIcon { id : _expandingArrows + anchors { + top : header.bottom + topMargin : Variables.defaultMargin + right : parent.right + rightMargin : Variables.defaultMargin + } + iconSize : 70 + iconImage.source : "qrc:/images/arrowsExpanding" + enabled : ! expandingTimer.running + + onClicked : { + expandingTimer.start() + expandAllRangeBars() + } } + + Timer { + id: expandingTimer + interval: 30000 // 30 second expand timer + repeat: false + onTriggered: resetAllRangeBars() + } + + function expandAllRangeBars() { + _arterialRangeBar.expandRangeBar() + _venousRangeBar.expandRangeBar() + _tmpRangeBar.expandRangeBar() + } + + function resetAllRangeBars() { + _arterialRangeBar.resetRangeBar() + _venousRangeBar.resetRangeBar() + _tmpRangeBar.resetRangeBar() + } } Index: sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml =================================================================== diff -u -rab7efbd73d4a4c0a0a10886629f9a5975ca08315 -r7805806e4370be4d9207872e916f478875bd4ba6 --- sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml (.../TreatmentSaline.qml) (revision ab7efbd73d4a4c0a0a10886629f9a5975ca08315) +++ sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml (.../TreatmentSaline.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -81,8 +81,8 @@ minText.visible : false maxText.visible : false marker.visible : false - color: "cyan"// update later - + gradientStart : Colors.progressBarGradientStart + gradientEnd : Colors.progressBarGradientEnd maximum : valueCumulative value : valueDelivered decimal : _root.valueDecimal Index: sources/gui/qml/pages/treatment/sections/TreatmentUltrafiltration.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r7805806e4370be4d9207872e916f478875bd4ba6 --- sources/gui/qml/pages/treatment/sections/TreatmentUltrafiltration.qml (.../TreatmentUltrafiltration.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/treatment/sections/TreatmentUltrafiltration.qml (.../TreatmentUltrafiltration.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) @@ -21,62 +21,148 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/pages/treatment" /*! * \brief Treatment Screen Ultrafiltration section */ -TouchArea { id: _root + +TreatmentSection { id: _root readonly property real minimum : vTreatmentUltrafiltration.minimum readonly property real maximum : vTreatmentUltrafiltration.maximum readonly property real value : vTreatmentUltrafiltration.ultrafiltration_RefUFVol + readonly property int topTextFontSize : 30 + readonly property int bottomTextFontSize : 72 - clip : false + property string ufButtonText : qsTr("Isolated UF in Progress") // TODO + property color ufButtonColor : "#C3F9FF" // TODO - x : 0 - y : 0 - width : 200 - height : 200 + header.title: qsTr("Ultrafiltration") + " (" + qsTr("UF") + ")" - isTouchable : ! isSBInProgress - title : qsTr("ULTRAFILTRATION VOLUME") + " " + Variables.unitTextUltrafiltrationVolume - notification { - visible : true - text : ufInfoText - textColor : ufInfoTextColor - } + contentItem: Row { id: _row + spacing : Variables.defaultMargin * 6 + rightPadding: Variables.defaultMargin + leftPadding : Variables.defaultMargin - Text { id: _ufCurrentRateText - anchors { - right: parent.right - rightMargin: Variables.arrowWidth * 2 // Aligning text to be beyond the arrow - top: parent.top + Column { id: _leftColumn + spacing : Variables.defaultMargin * 6 + width : contentItem.width * 0.2 + height : _root.height + + LabelValue { id: _ufVolume + height: 40 + width: contentItem.width * 0.2 + topTextFont.pixelSize: topTextFontSize + topTextFont.weight: Font.Normal + topText: qsTr("UF Volume") + bottomText: "1.00"// TODO + bottomTextFont.pixelSize: bottomTextFontSize + bottomTextFont.weight: Font.DemiBold + showCenterText: true + leftAlign: true + centerText: "Isolated UF" // TODO + unitText: Variables.unitVolume + } + + LabelValue { id: _ufRate + height: 40 + width: contentItem.width * 0.2 + topTextFont.pixelSize: topTextFontSize + topTextFont.weight: Font.Normal + topText: qsTr("UF Rate") + bottomText: vTreatmentUltrafiltration.ultrafiltration_UfCurrentRate.toFixed(0) + bottomTextFont.pixelSize: bottomTextFontSize + + bottomTextFont.weight: Font.DemiBold + leftAlign: true + unitText: Variables.unitTextRate + } } - horizontalAlignment : Text.AlignRight - verticalAlignment : Text.AlignVCenter - height : Variables.arrowHeight - text: qsTr("(%1 %2)").arg(vTreatmentUltrafiltration.ultrafiltration_UfCurrentRate.toFixed(0)) - .arg(Variables.unitTextUltrafiltrationRate ) - font.pixelSize: Fonts.fontPixelUltrafiltrationRateUnit - color: Colors.touchTextAreaTitle - } + Column { id: _rightColumn + topPadding : Variables.defaultMargin * 7 + width : contentItem.width + height : _root.height - ProgressBarEx { id: _progressbarex - enabled : _root.isTouchable - y : 75 - width : parent.width - height : Variables.ultraFiltrationProgressBarHeight - onClicked : _root.clicked() - onProgressClicked : _root.clicked() - onExtraClicked : _root.clicked() + ProgressBarEx { id: _progressbarex + enabled : ! isSBInProgress + width : contentItem.width * 0.6 + height : Variables.ultraFiltrationProgressBarHeight - decimal : Variables.ultrafiltrationPrecision - minimum : _root.minimum - maximum : _root.maximum - value : _root.value - valueEx : 0 + decimal : Variables.ultrafiltrationPrecision + minimum : _root.minimum + maximum : _root.maximum + value : _root.value + valueEx : 0 - marker.color : isUFPaused ? "dimgray" : Colors.rangeMarker + gradientStart : "#2184FA" + gradientEnd : "#67ACFF" + + marker.color : isUFPaused ? "dimgray" : Colors.rangeMarker + marker.font { + weight : Font.DemiBold + pixelSize : 40 + } + + marker.valueOnTop : true + + minText.color: "#818181" + minText.font { + pixelSize : 18 + weight : Font.Normal + } + + maxText.color: "#818181" + maxText.font { + pixelSize : 18 + weight : Font.Normal + } + + Text { id: _volumeRemovedText + anchors { + top: parent.bottom + topMargin: Variables.defaultMargin * 2 + right: parent.right + } + text: qsTr("Volume Removed") + color: Colors.textTextRectLabel + font.pixelSize: topTextFontSize + font.weight: Font.Medium + } + } + } } + + TouchRect { id: _isolatedUFButton + anchors { + top : header.bottom + topMargin : Variables.defaultMargin + right : parent.right + rightMargin : Variables.defaultMargin * 2 + } + + width : 250 + height : 60 + radius : height + text.text: ufButtonText + backgroundColor: Colors.backgroundMain + borderColor : backgroundColor + textColor: ufButtonColor + text.font { + weight: Font.DemiBold + pixelSize : 20 + } + onPressed : { + // TODO + } + } + + // TODO +// notification { +// visible : true +// text : ufInfoText +// textColor : ufInfoTextColor +// } + }