Index: sources/gui/qml/pages/treatment/TreatmentHome.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r3aee99e86a02eee80e15a157399a5b9968958ec1 --- sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision 3aee99e86a02eee80e15a157399a5b9968958ec1) @@ -15,6 +15,7 @@ // Qt import QtQuick 2.12 +import QtQuick.Layouts 1.12 // Project @@ -39,90 +40,293 @@ signal sectionTimeClicked() signal sectionUltrafiltrationClicked() - // ---------- COLUMN LEFT - TreatmentFlows { id: _flowsTouchArea - x : Variables.screenGridLeftColumnX - y : Variables.screenGridRow3Y - width : Variables.screenGridAreaWidth - height : Variables.screenGridAreaHeightRow3 - onClicked: { - sectionFlowClicked() + readonly property int cellWidth: _root.width / 7 // screen width / grid columns + Component.onCompleted: print("*******************************cellWidth " + cellWidth) + + + ColumnLayout { id: _rowLayout + spacing: Variables.defaultMargin + + anchors { + fill: parent + margins: Variables.defaultMargin + topMargin : Variables.notificationHeight + Variables.defaultMargin // 120 } - } - Line { x: 0; y: Variables.screenGridRow1LineY; length: Variables.screenGridLineLength } - TreatmentVitals { id: _vitalsTouchArea - x : Variables.screenGridLeftColumnX - y : Variables.screenGridRow2Y - 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 + + + RowLayout { id: _topRowLayout + spacing: Variables.defaultMargin + + Rectangle { // TIMER GOES HERE + color: "cyan" + Layout.preferredWidth: cellWidth * 2 + + Layout.fillHeight : true + Layout.fillWidth : true + TreatmentTime { id: _treatmentTime + onClicked: { + sectionTimeClicked() + } + } + } - horizontalAlignment : Text.AlignHCenter - verticalAlignment : Text.AlignVCenter - height : 15 - width : 100 - text : vTreatmentVitals.interval ? ( vTreatmentVitals.countdown ) : "" - font.pixelSize: 16 - } - } - Line { x: 0; y: Variables.screenGridRow2LineY; length: Variables.screenGridLineLength } + MonitorItem { id: _salineMonitor + Layout.preferredWidth: cellWidth - TreatmentPressures { id: _pressuresTouchArea - x : Variables.screenGridLeftColumnX - y : Variables.screenGridRow1Y - width : Variables.screenGridAreaWidth - height : Variables.screenGridAreaHeightRow1 - onClicked: { - sectionPressuresClicked() - } - } + Layout.fillHeight : true + Layout.fillWidth : true - // ---------- COLUMN RIGHT - TreatmentUltrafiltration { id: _ultrafiltrationTouchArea; - x : Variables.screenGridRightColumnX - y : Variables.screenGridRow1Y - width : Variables.screenGridAreaWidth - height : Variables.screenGridAreaHeightRow1 - onClicked : { - sectionUltrafiltrationClicked() + title: qsTr("Saline" ) + showEdit: false + + } + + MonitorItem { id: _vitalsMonitor + Layout.preferredWidth: cellWidth + + + Layout.fillHeight : true + Layout.fillWidth : true + + title: qsTr("Vitals" ) + + } + + MonitorItem { id: _pressureMonitor + Layout.preferredWidth: cellWidth * 3 + + + Layout.fillHeight : true + Layout.fillWidth : true + + title: qsTr("Pressures") + " (" + qsTr("mmHg") + ")" + + } + + } - } - Line { x: Variables.screenGridRightLinesX; y: Variables.screenGridRow1LineY; length: Variables.screenGridLineLength } - TreatmentSaline { id: _salineTouchArea - x : Variables.screenGridRightColumnX - y : Variables.screenGridRow2Y - 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 - width : Variables.screenGridAreaWidth - height : Variables.screenGridAreaHeightRow3 - } - // ---------- Center - TreatmentTime { id: _treatmentTime - onClicked: { - sectionTimeClicked() + RowLayout { id: _bottomRowLayout + spacing: Variables.defaultMargin + MonitorItem { id: _ultrafiltrationMonitor + Layout.preferredWidth: cellWidth * 3 + + Layout.fillHeight : true + Layout.fillWidth : true + + title: qsTr("Ultrafiltration") + " (" + qsTr("UF") + ")" + + } + + MonitorItem { id: _treatmentParametersMonitor + Layout.preferredWidth: cellWidth * 4 + + + Layout.fillHeight : true + Layout.fillWidth : true + + title: qsTr("Treatment Parameters") + showLock: true + + } } + + + } + + +// GridLayout { id: _gridLayout +// anchors { + +// fill: parent +// margins: Variables.defaultMargin +// topMargin : Variables.notificationHeight + Variables.defaultMargin // 120 +// } + + +//// columns : 90 +// rows : 2 +// columnSpacing : Variables.defaultMargin +// rowSpacing : Variables.defaultMargin + +// Rectangle { // TIMER GOES HERE +// color: "cyan" +// Layout.column: 0 +// Layout.row: 0 +// Layout.columnSpan: 30 + +// Layout.fillHeight : true +// Layout.fillWidth : true +// TreatmentTime { id: _treatmentTime +// onClicked: { +// sectionTimeClicked() +// } +// } + + +// } + +// MonitorItem { id: _salineMonitor +// Layout.column: 30 +// Layout.row: 0 +// Layout.columnSpan: 10 + + +// Layout.fillHeight : true +// Layout.fillWidth : true + +// title: qsTr("Saline" ) +// showEdit: false + +// } + +// MonitorItem { id: _vitalsMonitor +// Layout.column: 40 +// Layout.row: 0 +// Layout.columnSpan: 10 + +// Layout.fillHeight : true +// Layout.fillWidth : true + +// title: qsTr("Vitals" ) + +// } + +// MonitorItem { id: _pressureMonitor +// Layout.column: 50 +// Layout.row: 0 +// Layout.columnSpan: 30 + +// Layout.fillHeight : true +// Layout.fillWidth : true + +// title: qsTr("Pressures") + " (" + qsTr("mmHg") + ")" + +// } + +// MonitorItem { id: _ultrafiltrationMonitor +// Layout.column: 0 +// Layout.row: 1 +// Layout.columnSpan: 30 + +// Layout.fillHeight : true +// Layout.fillWidth : true + +// title: qsTr("Ultrafiltration") + " (" + qsTr("UF") + ")" + +// } + +// MonitorItem { id: _treatmentParametersMonitor +// Layout.column: 30 +// Layout.row: 1 +// Layout.columnSpan: 60 + +// Layout.fillHeight : true +// Layout.fillWidth : true + +// title: qsTr("Treatment Parameters") +// showLock: true + +// } + + + +// } + + + + + + + + + +// TreatmentFlows { id: _flowsTouchArea +// x : Variables.screenGridLeftColumnX +// y : Variables.screenGridRow3Y + 400 +// width : Variables.screenGridAreaWidth +// height : Variables.screenGridAreaHeightRow3 +// onClicked: { +// sectionFlowClicked() +// } +// } + +// 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 +// 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: { +// sectionTimeClicked() +// } +// } + onVisibleChanged: { if (visible) { _mainMenu.hidden = true