Index: sources/gui/qml/pages/treatment/sections/TreatmentFluid.qml =================================================================== diff -u -r9e57e4c990afab0996def98521d4f9fee83f96d8 -r02e5bb5f938d2be1c5c25f823810aabfb2a52b82 --- sources/gui/qml/pages/treatment/sections/TreatmentFluid.qml (.../TreatmentFluid.qml) (revision 9e57e4c990afab0996def98521d4f9fee83f96d8) +++ sources/gui/qml/pages/treatment/sections/TreatmentFluid.qml (.../TreatmentFluid.qml) (revision 02e5bb5f938d2be1c5c25f823810aabfb2a52b82) @@ -14,10 +14,8 @@ // Qt import QtQuick 2.12 -import QtQuick.Controls 2.12 // Project -import Gui.Actions 0.1; // Qml imports import "qrc:/globals" @@ -26,19 +24,26 @@ /*! * \brief Treatment Screen Fluid Management section */ -TouchArea { id: _fluidManagementTouchArea - x: rightColumnX - y: row2Y - width: _flowsTouchArea.width - height: 200 +TouchArea { id: _root + x : 0 + y : 0 + width : 200 + height : 200 isTouchable: false title: qsTr("FLUID MANAGEMENT") titleVSpacing: 40 - TouchRect { - y : 60 + + property int rowTextSpacing : 10 + property int volumeTextWidth: 60 + + // may need to be removed later when created separate Saline/Heparin object + property string buttonText: "" + + TouchRect { id: _startButton + y : 45 width : 340 height : 55 - text.text: qsTr("START BOLUS (100 mL)") + text.text: buttonText text.font { weight: Font.DemiBold pixelSize : 20 @@ -47,4 +52,115 @@ animated: true duration: 100 } + + ProgressBar { id: _fluidProgressBar + anchors { + top: _startButton.bottom + topMargin: 50 + } + width : parent.width + height : Variables.progressbarFluidHeight + minText.visible : false + maxText.visible : false + marker.visible : false + + value : 0 + + // // TEST begin : simulation code + // minimum : 0 // TEST : only test values + // maximum : 100 // TEST : only test values + // NumberAnimation on value { + // duration: 10000 + // from : _fluidProgressBar.minimum + // to : _fluidProgressBar.maximum + // //loops: Animation.Infinite + // onFinished: { + // _cumulativeValue.valueLast += _fluidProgressBar.value + // restart() + // } + // } + // onValueChanged: { + // _cumulativeValue.value = _cumulativeValue.valueLast + _fluidProgressBar.value + // } + // // TEST end + + Text { id: _fluidText + anchors { + left : parent.left + bottom : parent.bottom + bottomMargin: 15 + } + width: parent.width + text: qsTr("Volume Delivered") + font.pixelSize: Fonts.fontPixelFluidText + color: Colors.fluidText + Text { id: _fluidVolume + width: volumeTextWidth + anchors { + right: parent.right + baseline: parent.baseline + } + text: qsTr("(100 mL)") + font.pixelSize: Fonts.fontPixelFluidVolume + color: Colors.fluidUnit + } + Text { id: _fluidUnit + anchors { + right: parent.right + rightMargin: volumeTextWidth + rowTextSpacing + baseline: parent.baseline + } + text: qsTr("mL") + font.pixelSize: Fonts.fontPixelFluidUnit + color: Colors.fluidUnit + } + Text { id: _fluidValue + anchors { + right: _fluidUnit.left + rightMargin: rowTextSpacing + baseline: parent.baseline + } + horizontalAlignment: Text.AlignRight + text: _fluidProgressBar.value + width: 60 + font.pixelSize: Fonts.fontPixelFluidValue + color: Colors.fluidText + } + } + } + Text { id: _cumulativeText + anchors { + left : parent.left + top : _fluidProgressBar.bottom + topMargin : 15 + } + width: parent.width + text: qsTr("Cumulative Delivery") + font.pixelSize: Fonts.fontPixelFluidText + color: Colors.fluidText + Text { id: _cumulativeUnit + anchors { + right: parent.right + rightMargin: volumeTextWidth + rowTextSpacing + baseline: parent.baseline + } + text: qsTr("mL") + font.pixelSize: Fonts.fontPixelFluidUnit + color: Colors.fluidUnit + } + Text { id: _cumulativeValue + property int valueLast : 0 // needs to be bound to a model to keep cumulative value + property int value : 0 // needs to be bound to a model to keep cumulative value + anchors { + right: _cumulativeUnit.left + rightMargin: rowTextSpacing + baseline: parent.baseline + } + horizontalAlignment: Text.AlignRight + text: value + width: 60 + font.pixelSize: Fonts.fontPixelFluidValue + color: Colors.fluidText + } + } }