Index: sources/gui/qml/pages/treatment/TreatmentHome.qml =================================================================== diff -u -r3aee99e86a02eee80e15a157399a5b9968958ec1 -rf91362971e3b7af39c96e20fd553cdbd49741f85 --- sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision 3aee99e86a02eee80e15a157399a5b9968958ec1) +++ sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision f91362971e3b7af39c96e20fd553cdbd49741f85) @@ -20,9 +20,9 @@ // Project // Qml imports -import "qrc:/globals" -import "qrc:/components" -import "qrc:/pages/treatment/sections" +import "../../globals" +import "../../components" +import "sections" /*! * \brief ManagerHome is the screen @@ -40,29 +40,33 @@ signal sectionTimeClicked() signal sectionUltrafiltrationClicked() - readonly property int cellWidth: _root.width / 7 // screen width / grid columns - Component.onCompleted: print("*******************************cellWidth " + cellWidth) + 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) + } - ColumnLayout { id: _rowLayout + Column { id: _rowLayout spacing: Variables.defaultMargin anchors { fill: parent margins: Variables.defaultMargin - topMargin : Variables.notificationHeight + Variables.defaultMargin // 120 + topMargin : Variables.notificationHeight + Variables.defaultMargin // FIXME: 120 - to adjust from current headerbar implementation } - RowLayout { id: _topRowLayout + Row { id: _topRowLayout spacing: Variables.defaultMargin + height: cellHeight Rectangle { // TIMER GOES HERE color: "cyan" - Layout.preferredWidth: cellWidth * 2 + width: (cellWidth * 2) - (Variables.defaultMargin * 2) + height: cellHeight - Layout.fillHeight : true - Layout.fillWidth : true TreatmentTime { id: _treatmentTime onClicked: { sectionTimeClicked() @@ -71,64 +75,50 @@ } - MonitorItem { id: _salineMonitor - Layout.preferredWidth: cellWidth - - Layout.fillHeight : true - Layout.fillWidth : true - - title: qsTr("Saline" ) - showEdit: false - + TreatmentSaline { id: _salineTreatment + width: cellWidth + Variables.defaultMargin + height: cellHeight } - MonitorItem { id: _vitalsMonitor - Layout.preferredWidth: cellWidth + TreatmentSection { id: _vitalsMonitor + width: cellWidth + Variables.defaultMargin + height: cellHeight - Layout.fillHeight : true - Layout.fillWidth : true + header.title: qsTr("Vitals" ) - title: qsTr("Vitals" ) - } - MonitorItem { id: _pressureMonitor - Layout.preferredWidth: cellWidth * 3 + TreatmentSection { id: _pressureMonitor + width: (cellWidth * 3) - (Variables.defaultMargin * 2) // without auto layouts needs to fine tune + height: cellHeight + header.title: qsTr("Pressures") + " (" + qsTr("mmHg") + ")" - Layout.fillHeight : true - Layout.fillWidth : true - - title: qsTr("Pressures") + " (" + qsTr("mmHg") + ")" - } - } - RowLayout { id: _bottomRowLayout + Row { id: _bottomRowLayout spacing: Variables.defaultMargin - MonitorItem { id: _ultrafiltrationMonitor - Layout.preferredWidth: cellWidth * 3 + height: cellHeight - Layout.fillHeight : true - Layout.fillWidth : true + TreatmentSection { id: _ultrafiltrationMonitor + width: cellWidth * 3 + height: cellHeight - title: qsTr("Ultrafiltration") + " (" + qsTr("UF") + ")" + header.title: qsTr("Ultrafiltration") + " (" + qsTr("UF") + ")" } - MonitorItem { id: _treatmentParametersMonitor - Layout.preferredWidth: cellWidth * 4 + TreatmentSection { id: _treatmentParametersMonitor + width: cellWidth * 4 + height: cellHeight - Layout.fillHeight : true - Layout.fillWidth : true + header.title: qsTr("Treatment Parameters") + header.showLock: true - title: qsTr("Treatment Parameters") - showLock: true - } } @@ -138,112 +128,12 @@ -// 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