Index: sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r7caa737179a8c31825ae6445f593ac7ff5f95080 --- sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml (.../TreatmentVitals.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml (.../TreatmentVitals.qml) (revision 7caa737179a8c31825ae6445f593ac7ff5f95080) @@ -21,35 +21,63 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/pages/treatment" /*! * \brief Treatment Screen Vitals section */ -TouchArea { id: _root - readonly property string bloodSDSeparator: " / " +TreatmentSection { id: _root + readonly property string bloodSDSeparator: "/" - x: 0 - y: 0 - title: qsTr("VITALS") + header.title : qsTr("Vitals" ) + contentArea.anchors.topMargin : 0 - Column { - anchors.top: _root.top - anchors.topMargin: 60 - TextRect { id: _bloodPressure - labelHeight: 60 - labelFont.pixelSize: Fonts.fontPixelVitals - labelFont.weight: Font.ExtraLight - labelAutoSize: true - label: Variables.notSetVariable(vTreatmentVitals.systolic, 2) + bloodSDSeparator + Variables.notSetVariable(vTreatmentVitals.diastolic, 2) - extra: Variables.unitTextBloodPressure + contentItem: Column { id: _content + spacing : Variables.defaultMargin * 4.5 + + LabelValue { id: _bloodPressure + height : 40 + width : contentItem.width + topTextFont.pixelSize : Fonts.fontPixelVitals + topTextFont.weight : Font.Bold + topText : Variables.notSetVariable(vTreatmentVitals.systolic, 2) + bloodSDSeparator + Variables.notSetVariable(vTreatmentVitals.diastolic, 2) + bottomText : Variables.unitTextBloodPressure + bottomTextFont.pixelSize: 20 + bottomTextFont.weight : Font.Light + bottomTextTopMargin : 10 } - TextRect { id: _heartBeat - labelHeight: 40 - labelFont.pixelSize: Fonts.fontPixelVitals - labelFont.weight: Font.ExtraLight - labelAutoSize: true - label: Variables.notSetVariable(vTreatmentVitals.heartRate, 2) - extra: Variables.unitTextHeartBeat + + LabelValue { id: _heartBeat + height : 45 + width : contentItem.width + topTextFont.pixelSize : Fonts.fontPixelVitals + topTextFont.weight : Font.Bold + topText : Variables.notSetVariable(vTreatmentVitals.heartRate, 2) + bottomText : Variables.unitTextHeartBeat + bottomTextFont.pixelSize: 20 + bottomTextFont.weight : Font.Light + bottomTextTopMargin : 10 } + + Text { id: _lastRecorded + height : 30 + width : contentItem.width + text : qsTr("Last Recorded: " ) + font.pixelSize : 18 + font.weight : Font.Normal + verticalAlignment : Text.AlignBottom + color : Colors.textMain + } } + + function updateVitalTime() { + _lastRecorded.text = qsTr("Last Recorded: " ) + vDateTime.time + } + + // TODO +// notification.text: qsTr("Interval:" ) +// + " " + (vTreatmentVitals.interval ? (vTreatmentVitals.interval + qsTr("min")) : qsTr("OFF")) +// + " , " +// + qsTr("Last Read:") +// + " " + vTreatmentVitals.lastRead }