Index: leahi.qrc
===================================================================
diff -u -r138a4ca83232b7746e4d1c2d70b2b5a8db0a04b3 -rf91362971e3b7af39c96e20fd553cdbd49741f85
--- leahi.qrc (.../leahi.qrc) (revision 138a4ca83232b7746e4d1c2d70b2b5a8db0a04b3)
+++ leahi.qrc (.../leahi.qrc) (revision f91362971e3b7af39c96e20fd553cdbd49741f85)
@@ -139,7 +139,6 @@
sources/gui/qml/components/EntryDialog.qml
sources/gui/qml/components/SliderArrows.qml
sources/gui/qml/components/QRCode.qml
- sources/gui/qml/components/MonitorItem.qml
sources/gui/qml/compounds/PressureRangeSlider.qml
@@ -223,6 +222,9 @@
sources/gui/qml/pages/treatment/TreatmentHome.qml
sources/gui/qml/pages/treatment/TreatmentBloodPrime.qml
sources/gui/qml/pages/treatment/TreatmentUltrafiltrationItem.qml
+ sources/gui/qml/pages/treatment/TreatmentSection.qml
+ sources/gui/qml/pages/treatment/TreatmentSectionHeader.qml
+ sources/gui/qml/pages/treatment/TreatmentSectionIcon.qml
sources/gui/qml/pages/treatment/sections/TreatmentFlows.qml
Fisheye: Tag f91362971e3b7af39c96e20fd553cdbd49741f85 refers to a dead (removed) revision in file `sources/gui/qml/components/MonitorItem.qml'.
Fisheye: No comparison available. Pass `N' to diff?
Index: sources/gui/qml/components/ProgressBar.qml
===================================================================
diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -rf91362971e3b7af39c96e20fd553cdbd49741f85
--- sources/gui/qml/components/ProgressBar.qml (.../ProgressBar.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1)
+++ sources/gui/qml/components/ProgressBar.qml (.../ProgressBar.qml) (revision f91362971e3b7af39c96e20fd553cdbd49741f85)
@@ -28,6 +28,7 @@
property alias progress : _progressRect
property int progressWidth : _progressRect.width
property alias value : _progressRect.value
+ property alias progressRadius : _progressRect.radius
property alias color : _progressRect.color
property alias bgColor : _root.color
Index: sources/gui/qml/globals/Colors.qml
===================================================================
diff -u -r138a4ca83232b7746e4d1c2d70b2b5a8db0a04b3 -rf91362971e3b7af39c96e20fd553cdbd49741f85
--- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 138a4ca83232b7746e4d1c2d70b2b5a8db0a04b3)
+++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision f91362971e3b7af39c96e20fd553cdbd49741f85)
@@ -41,7 +41,8 @@
readonly property color backgroundMainMenu : "#0F2841" //// ----- @LEAHIZED
readonly property color backgroundDottedMenu : "#64809D"
readonly property color backgroundSlider : "#195187"
- readonly property color backgroundMainDarker : Qt.darker (backgroundMain, 1.2)
+ readonly property color treatmentSectionHeader : Qt.darker (backgroundMain, 1.2)
+ readonly property color treatmentSectionMain : Qt.darker (backgroundMain, 1.1)
readonly property color sliderHighlightColor : "orange"
readonly property color sliderProgressBorderActive : white
Index: sources/gui/qml/globals/Variables.qml
===================================================================
diff -u -r138a4ca83232b7746e4d1c2d70b2b5a8db0a04b3 -rf91362971e3b7af39c96e20fd553cdbd49741f85
--- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 138a4ca83232b7746e4d1c2d70b2b5a8db0a04b3)
+++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision f91362971e3b7af39c96e20fd553cdbd49741f85)
@@ -55,6 +55,7 @@
readonly property int arrowHeight : 16
readonly property int alarmListIconDiameter : 45
+ readonly property int treatmentSectionIconSize : 40
readonly property int borderWidth : 2
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
Index: sources/gui/qml/pages/treatment/TreatmentSection.qml
===================================================================
diff -u
--- sources/gui/qml/pages/treatment/TreatmentSection.qml (revision 0)
+++ sources/gui/qml/pages/treatment/TreatmentSection.qml (revision f91362971e3b7af39c96e20fd553cdbd49741f85)
@@ -0,0 +1,32 @@
+/*!
+ *
+ * Copyright (c) 2019-2025 Diality Inc. - All Rights Reserved.
+ * \copyright
+ * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN
+ * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER.
+ *
+ * \file MonitorItem.qml
+ * \author (last) Nico Ramirez
+ * \date (last) 25-Jun-2025
+ * \author (original) Nico Ramirez
+ * \date (original) 25-Jun-2025
+ *
+ */
+
+// Qt
+import QtQuick 2.12
+
+import "../../globals"
+import "../../components"
+
+//import "qrc:/globals"
+//import "qrc:/components"
+
+Rectangle { id : _root
+ property alias header : _header
+
+ color: Colors.treatmentSectionMain
+ radius: 15
+
+ TreatmentSectionHeader { id: _header }
+}
Index: sources/gui/qml/pages/treatment/TreatmentSectionHeader.qml
===================================================================
diff -u
--- sources/gui/qml/pages/treatment/TreatmentSectionHeader.qml (revision 0)
+++ sources/gui/qml/pages/treatment/TreatmentSectionHeader.qml (revision f91362971e3b7af39c96e20fd553cdbd49741f85)
@@ -0,0 +1,74 @@
+/*!
+ *
+ * Copyright (c) 2019-2025 Diality Inc. - All Rights Reserved.
+ * \copyright
+ * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN
+ * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER.
+ *
+ * \file MonitorItem.qml
+ * \author (last) Nico Ramirez
+ * \date (last) 27-Jun-2025
+ * \author (original) Nico Ramirez
+ * \date (original) 27-Jun-2025
+ *
+ */
+
+// Qt
+import QtQuick 2.12
+
+import "../../globals"
+import "../../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
+
+ color: Colors.treatmentSectionHeader
+ height : Variables.contentHeight + Variables.defaultMargin
+ width : parent.width
+ radius: 15
+
+ anchors.top: parent.top
+
+ Label { id: _title
+ anchors {
+ top : parent.top
+ topMargin : Variables.defaultMargin
+ left : parent.left
+ leftMargin : Variables.defaultMargin * 2
+ }
+
+ text: title
+ font.pixelSize: 30
+ }
+
+ TreatmentSectionIcon { id : _lockButton
+ anchors {
+ verticalCenter : _title.verticalCenter
+ right : _editButton.left
+ rightMargin : Variables.defaultMargin * 2
+ }
+
+ visible : showLock
+ iconImage.source : editEnabled ? "qrc:/images/iUnlock" : "qrc:/images/iLock"
+ onPressed : editEnabled = !editEnabled
+ }
+
+ TreatmentSectionIcon { id : _editButton
+ anchors {
+ verticalCenter : _title.verticalCenter
+ right : parent.right
+ rightMargin : Variables.defaultMargin * 2
+ }
+
+ visible : showEdit
+ enabled : editEnabled
+ iconImage.source: editEnabled ? "qrc:/images/iEdit" : "qrc:/images/iEditDisabled"
+ onPressed : print("Edit button pressed!")
+ }
+}
Index: sources/gui/qml/pages/treatment/TreatmentSectionIcon.qml
===================================================================
diff -u
--- sources/gui/qml/pages/treatment/TreatmentSectionIcon.qml (revision 0)
+++ sources/gui/qml/pages/treatment/TreatmentSectionIcon.qml (revision f91362971e3b7af39c96e20fd553cdbd49741f85)
@@ -0,0 +1,38 @@
+/*!
+ *
+ * Copyright (c) 2019-2025 Diality Inc. - All Rights Reserved.
+ * \copyright
+ * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN
+ * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER.
+ *
+ * \file MonitorItem.qml
+ * \author (last) Nico Ramirez
+ * \date (last) 27-Jun-2025
+ * \author (original) Nico Ramirez
+ * \date (original) 27-Jun-2025
+ *
+ */
+
+// Qt
+import QtQuick 2.12
+
+import "../../globals"
+import "../../components"
+
+//import "qrc:/globals"
+//import "qrc:/components"
+
+TouchRect { id : _icon
+ property alias iconImage : _iconImage
+
+ width : Variables.treatmentSectionIconSize
+ height : Variables.treatmentSectionIconSize
+ border.color: "transparent"
+
+ Image { id : _iconImage
+ height : Variables.treatmentSectionIconSize
+ width : Variables.treatmentSectionIconSize
+ fillMode: Image.PreserveAspectFit
+ source : ""
+ }
+}
Index: sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml
===================================================================
diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -rf91362971e3b7af39c96e20fd553cdbd49741f85
--- sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml (.../TreatmentSaline.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1)
+++ sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml (.../TreatmentSaline.qml) (revision f91362971e3b7af39c96e20fd553cdbd49741f85)
@@ -23,54 +23,134 @@
import "qrc:/globals"
import "qrc:/components"
+import "../../../globals"
+import "../../../components"
+import "../../treatment"
+
/*!
* \brief Treatment Screen Saline Management section
*/
-TreatmentFluid { id: _root
+TreatmentSection { id: _root
readonly property bool isStarted : vHDTreatmentStates.sbRunning
readonly property bool isIdle : vHDTreatmentStates.sbIdle
// other that max saline bolus delivered,
// if saline started but still is waiting for pump the button is disabled so user won't tap multiple times.
readonly property bool isDisabled : vHDTreatmentStates.sbMaxReached
readonly property bool isWaitPump : vHDTreatmentStates.sbWaitPump
+ readonly property string unit : Variables.unitTextFluid
+ property int valueDecimal : Variables.salinePrecision
+ property int valueTarget : vTreatmentSaline.target || vTreatmentAdjustmentSaline.target
+ property int valueCumulative: vTreatmentSaline.cumulative
+ property int valueDelivered : vTreatmentSaline.delivered
+ property string buttonText : ( isDisabled || isWaitPump ) ? _private.textStart :
+ isStarted ? _private.textStop :
+ _private.textStart
+
+
+ header.title: qsTr("Saline" )
+ header.showEdit: false
+
QtObject { id: _private
- readonly property string textStart : qsTr("START BOLUS")
- readonly property string textStop : qsTr("STOP BOLUS" )
- readonly property string textVolumeTarget : "(" + valueTarget + unit + ")"
+ readonly property string textStart : qsTr("START BOLUS") + textVolumeTarget
+ readonly property string textStop : qsTr("STOP BOLUS" ) + textVolumeTarget
+ readonly property string textVolumeTarget : " (" + valueTarget + unit + ")"
readonly property string mesgDisabled : qsTr("Maximum cumulative saline bolus volume delivered")
readonly property string mesgWaitForPump : "" // qsTr("Saline Bolus is starting") // Not sure if we shouls show any message at this point
readonly property string mesgRejectReason : vTreatmentAdjustmentSaline.adjustment_ReasonText
}
- hasArrow : false
- isTouchable : false
- buttonEnabled : ! ( _root.isDisabled || _root.isWaitPump )
- buttonText : ( _root.isDisabled || _root.isWaitPump ) ? _private.textStart :
- _root.isStarted ? _private.textStop :
- _private.textStart
+ VTreatmentSaline { id: vTreatmentSaline }
- fluidProgressBarColor: _root.isStarted ? Colors.sliderHighlightColor : Colors.highlightProgressBar
+ Column { id :_column
+ spacing : Variables.defaultMargin * 4
+ leftPadding : Variables.defaultMargin
+ rightPadding: Variables.defaultMargin
- title : qsTr("SALINE BOLUS")
- unit : Variables.unitTextSaline
+ anchors {
+ fill : parent
+ topMargin : header.height + Variables.defaultMargin * 2
+ margins : Variables.defaultMargin
+ }
- valueDecimal : Variables.salinePrecision
- valueTarget : vTreatmentSaline.target || vTreatmentAdjustmentSaline.target
- valueCumulative : vTreatmentSaline.cumulative
- valueDelivered : vTreatmentSaline.delivered
+ Text { id: _descriptionText
+ text : qsTr("Total Saline Delivered")
+ font.pixelSize : Fonts.fontPixelFluidText
+ color : Colors.fluidText
+ horizontalAlignment: Text.AlignHCenter
+ }
- VTreatmentSaline { id: vTreatmentSaline }
+ Item { id: progressBarArea
+ height: Variables.contentHeight
+ width: parent.width - Variables.defaultMargin
- onClicked: {
- if ( isIdle ) vTreatmentAdjustmentSaline.doStart() // IDLE
- if ( isStarted ) vTreatmentAdjustmentSaline.doStop () // IN_PROGRESS
- }
+ ProgressBar { id: _fluidProgressBar
+ width: progressBarArea.width - Variables.defaultMargin
- notification {
- visible : true
- text : isDisabled ? _private.mesgDisabled :
- isWaitPump ? _private.mesgWaitForPump :
- _private.mesgRejectReason
+ height : Variables.progressbarFluidHeight * 4
+ minText.visible : false
+ maxText.visible : false
+ marker.visible : false
+ color: "cyan"// update later
+
+ maximum : _fluidTarget.value
+ value : valueDelivered
+ decimal : _root.valueDecimal
+ radius: 9
+ progressRadius: radius
+ }
+
+ Label { id: _fluidTarget
+ property real value: valueCumulative
+ anchors {
+ verticalCenter: _fluidTargetUnit.verticalCenter
+ right: _fluidTargetUnit.left
+ }
+ font.pixelSize : Fonts.fontPixelFluidText
+ font.weight : Font.DemiBold
+ text: value
+ width: contentWidth
+
+ }
+
+ Label { id: _fluidTargetUnit
+ property real value: 0
+ anchors {
+ bottom: _fluidProgressBar.top
+ right: _fluidProgressBar.right
+ }
+ font.pixelSize : Fonts.fontPixelFluidText
+ text: _root.unit
+ width: contentWidth
+ }
+ }
+
+ TouchRect { id: _startFluidButton
+ width : progressBarArea.width - Variables.defaultMargin
+ height: Variables.contentHeight
+
+ text.text: buttonText
+ backgroundColor: borderColor
+ textColor: isDisabled || isWaitPump ? Colors.textButton : Colors.textDisableButton
+ text.font {
+ weight: Font.DemiBold
+ pixelSize : 16
+ }
+ onPressed : {
+ if ( isIdle ) vTreatmentAdjustmentSaline.doStart() // IDLE
+ if ( isStarted ) vTreatmentAdjustmentSaline.doStop () // IN_PROGRESS
+ }
+
+ }
+
}
+
+ // TODO:
+// notification {
+// visible : true
+// text : isDisabled ? _private.mesgDisabled :
+// isWaitPump ? _private.mesgWaitForPump :
+// _private.mesgRejectReason
+// }
+// }
}