Index: leahi.qrc =================================================================== diff -u -rf91362971e3b7af39c96e20fd553cdbd49741f85 -r26af78da75502c56dcff8ad402e63d64a496f341 --- leahi.qrc (.../leahi.qrc) (revision f91362971e3b7af39c96e20fd553cdbd49741f85) +++ leahi.qrc (.../leahi.qrc) (revision 26af78da75502c56dcff8ad402e63d64a496f341) @@ -139,6 +139,8 @@ sources/gui/qml/components/EntryDialog.qml sources/gui/qml/components/SliderArrows.qml sources/gui/qml/components/QRCode.qml + sources/gui/qml/components/ContentArea.qml + sources/gui/qml/components/LabelValue.qml sources/gui/qml/compounds/PressureRangeSlider.qml Index: sources/gui/qml/components/ContentArea.qml =================================================================== diff -u --- sources/gui/qml/components/ContentArea.qml (revision 0) +++ sources/gui/qml/components/ContentArea.qml (revision 26af78da75502c56dcff8ad402e63d64a496f341) @@ -0,0 +1,21 @@ +import QtQuick 2.12 + +Item { + id: _contentArea + height: contentItem ? contentItem.height : 0 + + property Item contentItem: Item { + id: defaultContentItem + parent: _contentArea + height: 10 + } + + onContentItemChanged: { + if (contentItem) { + contentItem.parent = _contentArea + contentItem.anchors.top = _contentArea.top + contentItem.anchors.left = _contentArea.left + contentItem.anchors.right = _contentArea.right + } + } +} Index: sources/gui/qml/components/LabelValue.qml =================================================================== diff -u --- sources/gui/qml/components/LabelValue.qml (revision 0) +++ sources/gui/qml/components/LabelValue.qml (revision 26af78da75502c56dcff8ad402e63d64a496f341) @@ -0,0 +1,54 @@ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" + +Item { id : _root + property string topText : "" + property string topTextColor : Colors.textTextRectLabel + property alias topTextFont : _topText.font + + property string centerText : "" + property string centerTextColor : Colors.textTextRectLabel + property bool showCenterText : false + + property string bottomText : "" + property string bottomTextColor : Colors.textTextRectLabel + property alias bottomTextHeight : _bottomText.height + + property int verticalSpacing : 0 + + clip: false + + Column { id: _column + anchors.horizontalCenter: parent.horizontalCenter + + spacing: verticalSpacing + + Text { id: _topText + text: _root.topText + color: topTextColor + font.pixelSize: Fonts.fontPixelTextRectLabel + verticalAlignment: Text.AlignBottom + horizontalAlignment: Text.AlignHCenter + } + + Text { id: _centerText + text: _root.centerText + color: centerTextColor + visible: showCenterText + font.pixelSize: Fonts.fontPixelTextRectExtra + horizontalAlignment: Text.AlignLeft + } + + Text { id: _bottomText + text: _root.bottomText + color: bottomTextColor + font.pixelSize: Fonts.fontPixelTextRectExtra + horizontalAlignment: Text.AlignHCenter + } + } +} Index: sources/gui/qml/pages/treatment/TreatmentHome.qml =================================================================== diff -u -rf91362971e3b7af39c96e20fd553cdbd49741f85 -r26af78da75502c56dcff8ad402e63d64a496f341 --- sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision f91362971e3b7af39c96e20fd553cdbd49741f85) +++ sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision 26af78da75502c56dcff8ad402e63d64a496f341) @@ -15,7 +15,6 @@ // Qt import QtQuick 2.12 -import QtQuick.Layouts 1.12 // Project @@ -42,12 +41,7 @@ readonly property int cellWidth : _root.width / 7 - 10 // = screen width / # columns readonly property int cellHeight: _root.height / 2 - Variables.notificationHeight // = screen height / # rows - header bar - Component.onCompleted: { - print("*******************************cellWidth " + cellWidth) - print("******************************cellHeight " + cellHeight) - } - Column { id: _rowLayout spacing: Variables.defaultMargin @@ -75,19 +69,33 @@ } - TreatmentSaline { id: _salineTreatment + TreatmentSaline { id: _salineTreatmentArea width: cellWidth + Variables.defaultMargin height: cellHeight } - TreatmentSection { id: _vitalsMonitor + TreatmentVitals { id: _vitalsTreatmentArea width: cellWidth + Variables.defaultMargin height: cellHeight + onEditClicked: sectionVitalsClicked() + Text { id: _vitalCountdown + color : "gray" + anchors { + top : parent.top + right : parent.right + rightMargin : 50 + } + horizontalAlignment : Text.AlignHCenter + verticalAlignment : Text.AlignVCenter + height : 15 + width : 100 + text : vTreatmentVitals.interval ? ( vTreatmentVitals.countdown ) : "" + font.pixelSize: 16 + } + } - header.title: qsTr("Vitals" ) - } TreatmentSection { id: _pressureMonitor width: (cellWidth * 3) - (Variables.defaultMargin * 2) // without auto layouts needs to fine tune @@ -144,36 +152,9 @@ // } // } -// TreatmentVitals { id: _vitalsTouchArea -// x : Variables.screenGridLeftColumnX -// y : Variables.screenGridRow2Y + 400 -// width : Variables.screenGridAreaWidth -// height : Variables.screenGridAreaHeightRow2 -// onClicked: { -// sectionVitalsClicked() -// } -// notification.text: qsTr("Interval:" ) -// + " " + (vTreatmentVitals.interval ? (vTreatmentVitals.interval + qsTr("min")) : qsTr("OFF")) -// + " , " -// + qsTr("Last Read:") -// + " " + vTreatmentVitals.lastRead -// Text { id: _vitalCountdown -// color : "gray" -// anchors { -// top : parent.top -// right : parent.right -// rightMargin : 50 -// } -// horizontalAlignment : Text.AlignHCenter -// verticalAlignment : Text.AlignVCenter -// height : 15 -// width : 100 -// text : vTreatmentVitals.interval ? ( vTreatmentVitals.countdown ) : "" -// font.pixelSize: 16 -// } -// } + // TreatmentPressures { id: _pressuresTouchArea // x : Variables.screenGridLeftColumnX // y : Variables.screenGridRow1Y + 400 Index: sources/gui/qml/pages/treatment/TreatmentSection.qml =================================================================== diff -u -rf91362971e3b7af39c96e20fd553cdbd49741f85 -r26af78da75502c56dcff8ad402e63d64a496f341 --- sources/gui/qml/pages/treatment/TreatmentSection.qml (.../TreatmentSection.qml) (revision f91362971e3b7af39c96e20fd553cdbd49741f85) +++ sources/gui/qml/pages/treatment/TreatmentSection.qml (.../TreatmentSection.qml) (revision 26af78da75502c56dcff8ad402e63d64a496f341) @@ -16,17 +16,33 @@ // Qt import QtQuick 2.12 -import "../../globals" -import "../../components" +import "qrc:/globals" +import "qrc:/components" -//import "qrc:/globals" -//import "qrc:/components" - Rectangle { id : _root - property alias header : _header + property Item contentItem : null + property alias header : _header + signal editClicked + color: Colors.treatmentSectionMain radius: 15 - TreatmentSectionHeader { id: _header } + TreatmentSectionHeader { id: _header + onEditClicked : _root.editClicked() + } + + ContentArea { id : _contentArea + anchors { + top: _header.bottom + topMargin: Variables.defaultMargin * 2 + left: _root.left + leftMargin: Variables.defaultMargin + right: _root.right + rightMargin: Variables.defaultMargin + } + + contentItem: _root.contentItem + } + } Index: sources/gui/qml/pages/treatment/TreatmentSectionHeader.qml =================================================================== diff -u -rf91362971e3b7af39c96e20fd553cdbd49741f85 -r26af78da75502c56dcff8ad402e63d64a496f341 --- sources/gui/qml/pages/treatment/TreatmentSectionHeader.qml (.../TreatmentSectionHeader.qml) (revision f91362971e3b7af39c96e20fd553cdbd49741f85) +++ sources/gui/qml/pages/treatment/TreatmentSectionHeader.qml (.../TreatmentSectionHeader.qml) (revision 26af78da75502c56dcff8ad402e63d64a496f341) @@ -16,18 +16,17 @@ // Qt import QtQuick 2.12 -import "../../globals" -import "../../components" +import "qrc:/globals" +import "qrc:/components" -//import "qrc:/globals" -//import "qrc:/components" - Rectangle { id: _root property string title : "" property bool editEnabled : true property bool showLock : false property bool showEdit : true + signal editClicked + color: Colors.treatmentSectionHeader height : Variables.contentHeight + Variables.defaultMargin width : parent.width @@ -69,6 +68,6 @@ visible : showEdit enabled : editEnabled iconImage.source: editEnabled ? "qrc:/images/iEdit" : "qrc:/images/iEditDisabled" - onPressed : print("Edit button pressed!") + onPressed : _root.editClicked() } } Index: sources/gui/qml/pages/treatment/TreatmentSectionIcon.qml =================================================================== diff -u -rf91362971e3b7af39c96e20fd553cdbd49741f85 -r26af78da75502c56dcff8ad402e63d64a496f341 --- sources/gui/qml/pages/treatment/TreatmentSectionIcon.qml (.../TreatmentSectionIcon.qml) (revision f91362971e3b7af39c96e20fd553cdbd49741f85) +++ sources/gui/qml/pages/treatment/TreatmentSectionIcon.qml (.../TreatmentSectionIcon.qml) (revision 26af78da75502c56dcff8ad402e63d64a496f341) @@ -16,12 +16,9 @@ // Qt import QtQuick 2.12 -import "../../globals" -import "../../components" +import "qrc:/globals" +import "qrc:/components" -//import "qrc:/globals" -//import "qrc:/components" - TouchRect { id : _icon property alias iconImage : _iconImage Index: sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml =================================================================== diff -u -rf91362971e3b7af39c96e20fd553cdbd49741f85 -r26af78da75502c56dcff8ad402e63d64a496f341 --- sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml (.../TreatmentSaline.qml) (revision f91362971e3b7af39c96e20fd553cdbd49741f85) +++ sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml (.../TreatmentSaline.qml) (revision 26af78da75502c56dcff8ad402e63d64a496f341) @@ -22,11 +22,8 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/pages/treatment" -import "../../../globals" -import "../../../components" -import "../../treatment" - /*! * \brief Treatment Screen Saline Management section */ @@ -62,17 +59,11 @@ VTreatmentSaline { id: vTreatmentSaline } - Column { id :_column + contentItem: Column { id :_content spacing : Variables.defaultMargin * 4 leftPadding : Variables.defaultMargin rightPadding: Variables.defaultMargin - anchors { - fill : parent - topMargin : header.height + Variables.defaultMargin * 2 - margins : Variables.defaultMargin - } - Text { id: _descriptionText text : qsTr("Total Saline Delivered") font.pixelSize : Fonts.fontPixelFluidText Index: sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r26af78da75502c56dcff8ad402e63d64a496f341 --- sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml (.../TreatmentVitals.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml (.../TreatmentVitals.qml) (revision 26af78da75502c56dcff8ad402e63d64a496f341) @@ -21,35 +21,52 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/pages/treatment" /*! * \brief Treatment Screen Vitals section */ -TouchArea { id: _root +TreatmentSection { id: _root readonly property string bloodSDSeparator: " / " - x: 0 - y: 0 - title: qsTr("VITALS") + header.title: qsTr("Vitals" ) - 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 * 5 + anchors.fill: parent + + LabelValue { id: _bloodPressure + height: 45 + 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 } - 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: 30 + width: contentItem.width + topTextFont.pixelSize: Fonts.fontPixelVitals + topTextFont.weight: Font.Bold + topText: Variables.notSetVariable(vTreatmentVitals.heartRate, 2) + bottomText: Variables.unitTextHeartBeat } + + Label { id: _lastRecorded + height: 30 + width: contentItem.width + text: qsTr("Last Recorded: " ) + font.pixelSize: 18 + font.weight: Font.Light + } + } + + // TODO +// notification.text: qsTr("Interval:" ) +// + " " + (vTreatmentVitals.interval ? (vTreatmentVitals.interval + qsTr("min")) : qsTr("OFF")) +// + " , " +// + qsTr("Last Read:") +// + " " + vTreatmentVitals.lastRead }