Index: sources/gui/qml/components/LabelValue.qml =================================================================== diff -u -r7caa737179a8c31825ae6445f593ac7ff5f95080 -r9f2f52d19e8cf2a2e93b521439ae4b9c0dc1ba56 --- sources/gui/qml/components/LabelValue.qml (.../LabelValue.qml) (revision 7caa737179a8c31825ae6445f593ac7ff5f95080) +++ sources/gui/qml/components/LabelValue.qml (.../LabelValue.qml) (revision 9f2f52d19e8cf2a2e93b521439ae4b9c0dc1ba56) @@ -10,6 +10,7 @@ property string topText : "" property string topTextColor : Colors.textTextRectLabel property alias topTextFont : _topText.font + property alias topTextAlignment : _topText.horizontalAlignment property string centerText : "" property bool showCenterText : false Index: sources/gui/qml/globals/Fonts.qml =================================================================== diff -u -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 -r9f2f52d19e8cf2a2e93b521439ae4b9c0dc1ba56 --- sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) +++ sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 9f2f52d19e8cf2a2e93b521439ae4b9c0dc1ba56) @@ -86,6 +86,9 @@ readonly property int fontPixelCircleButtonLabel: 50 + readonly property int fontPixelRxProfileComponentLarge : 60 + readonly property int fontPixelRxProfileComponentSmall : 40 + readonly property int fontPixelDebugTitle : 25 readonly property int fontPixelDebugText : 32 readonly property int fontPixelDebugLabel : 20 Index: sources/gui/qml/pages/ManagerStack.qml =================================================================== diff -u -r1f927e37764a81fb6538b5cf7a74d8beacf56aac -r9f2f52d19e8cf2a2e93b521439ae4b9c0dc1ba56 --- sources/gui/qml/pages/ManagerStack.qml (.../ManagerStack.qml) (revision 1f927e37764a81fb6538b5cf7a74d8beacf56aac) +++ sources/gui/qml/pages/ManagerStack.qml (.../ManagerStack.qml) (revision 9f2f52d19e8cf2a2e93b521439ae4b9c0dc1ba56) @@ -32,249 +32,31 @@ stackView.initialItem : _managerHome ScreenItem { id: _managerHome anchors { - fill : parent - topMargin : Variables.defaultMargin * 2 - leftMargin : Variables.defaultMargin * 3 - rightMargin : Variables.defaultMargin * 3 - bottomMargin: Variables.alarmDialogHeaderHeight + fill : parent + topMargin : Variables.defaultMargin * 2 + leftMargin : Variables.defaultMargin * 3 + rightMargin : Variables.defaultMargin * 3 + bottomMargin: Variables.alarmDialogHeaderHeight } -// spacing : Variables.defaultMargin -// Column { id: _managerColumn - RxManagerHeader{id: _rxHeader - height: 100 //TODO Calculate how much to give + RxManagerHeader{id: _rxHeader + height: 100 //TODO: Calculate how much to give + } + RxManagerList{ + id: _rxManagerListView + anchors { + left : parent.left + right : parent.right + top : _rxHeader.bottom } - - - - ListModel { - id: _dummy - ListElement { - name: "Morning Treatment" - number: "4-3-2025" - index : 0 - param1 : "Blood Flow" - value1: "320" - unit1: "mL/min" - } - ListElement { - name: "Afternoon Treatment" - number: "3-21-2025" - index : 1 - param1 : "Blood Flow" - value1: "320" - unit1: "mL/min" - } - ListElement { - name: "Evening Treatment" - number: "10-10-2025" - index : 2 - param1 : "Blood Flow" - value1: "320" - unit1: "mL/min" - } - } - property var treatmentFields: [ - [ - { title: "Blood Flow", value: "320", units: "mL/min" }, - { title: "Dialysate Flow", value: "45", units: "mL/min" }, - { title: "Duration", value: "12.3", units: "min" }, - { title: "Heparin", value: "120", units: "mL" }, - { title: "Acid", value: "1.01", units: "" }, - { title: "Bicarbonate", value: "2.0K 2.5Ca", units: "" }, - { title: "Dialyzer", value: "1150", units: "" }, - { title: "Dialysate Temp", value: "10.2", units: "°C" }, - { title: "Treatment Type", value: "39", units: "" }, - { title: "Vitals Interval", value: "230", units: "V" } - ], - [ - { title: "Blood Flow", value: "23.5", units: "°C" }, - { title: "Dialysate Flow", value: "45", units: "%" }, - { title: "Duration", value: "12.3", units: "L/min" }, - { title: "Heparin", value: "120", units: "rpm" }, - { title: "Acid", value: "1.01", units: "bar" }, - { title: "Bicarbonate", value: "5", units: "A" }, - { title: "Dialyzer", value: "1150", units: "W" }, - { title: "Dialysate Temp", value: "10.2", units: "°C" }, - { title: "Treatment Type", value: "39", units: "" }, - { title: "Vitals Interval", value: "230", units: "V" } - ], - [ - { title: "Blood Flow", value: "23.5", units: "°C" }, - { title: "Dialysate Flow", value: "45", units: "%" }, - { title: "Duration", value: "12.3", units: "L/min" }, - { title: "Heparin", value: "120", units: "rpm" }, - { title: "Acid", value: "1.01", units: "bar" }, - { title: "Bicarbonate", value: "5", units: "A" }, - { title: "Dialyzer", value: "1150", units: "W" }, - { title: "Dialysate Temp", value: "10.2", units: "°C" }, - { title: "Treatment Type", value: "39", units: "" }, - { title: "Vitals Interval", value: "230", units: "V" } - ], - - ] - Item{ - id: _listViewitem - anchors { - left : parent.left - right : parent.right - top : _rxHeader.bottom - } - height: parent.height - (Variables.mainMenuHeight + Variables.alarmDialogHeaderHeight) -// color: "green" - ListView{ - anchors.fill: _listViewitem - clip: true - spacing: Variables.defaultMargin - id: _listView -// model: vRxProfiles.rxProfilesList - model: vRxProfiles.rxProfiles - delegate: _rxProfile - - } - } - - Component { - id: _rxProfile - Rectangle { - id: rxItem - anchors { - left : parent.left - right : parent.right - } - height: 370 - color: Colors.mainTreatmentLighterBlue - radius: 5 - property string name - property string number - property int index - property string param1 - property string value1 - property string unit1 - Column { - id: _componentColumn - - anchors { - left : parent.left - right : parent.right - leftMargin: Variables.defaultMargin * 2 - rightMargin: Variables.defaultMargin * 2 - } - Text { - text: profileName - font.pointSize : Fonts.fontPixelButton * 1.4 - width: parent.width - horizontalAlignment: Text.AlignLeft - color : Colors.pressuresText - } - Row { - spacing: 5 - width: parent.width - anchors { - left : _componentColumn.left - } - property int componentWidth: parent.width / 9 - 5 - RxProfileComponent{ - id: _bloodflowComp - title : "Blood Flow" - height : 370 - (100 + Variables.defaultMargin * 2) - width : parent.width / 9 - 5 - value : bloodFlow - unitText : "mL/min" - } - RxProfileComponent{ - id: _diaflowComp - title : "Dialysate Flow" - height : 370 - (100 + Variables.defaultMargin * 2) - width : parent.width / 9 - 5 - value : dialysateFlow - unitText : "mL/min" - } - RxProfileComponent{ - id: _txDurComp - title : "Duration" - height : 370 - (100 + Variables.defaultMargin * 2) - width : parent.width / 9 - 5 - value : treatmentDuration - unitText : "min" - } - RxProfileComponent{ - id: _HeparinComp - title : "Heparin" - height : 370 - (100 + Variables.defaultMargin * 2) - width : parent.width / 9 - 5 - value : heparinVolume - unitText : "mL" - } - RxProfileComponent{ - id: _ACComp - title : "Acid" - height : 370 - (100 + Variables.defaultMargin * 2) - width : parent.width / 9 - 5 - value : acidConcentrate - unitText : "" - } - RxProfileComponent{ - id: _BcComp - title : "Bicarbonate" - height : 370 - (100 + Variables.defaultMargin * 2) - width : parent.width / 9 - 5 - value : bicarbConcentrate - unitText : "" - } - RxProfileComponent{ - id: _DialyzerComp - title : "Dialyzer" - height : 370 - (100 + Variables.defaultMargin * 2) - width : parent.width / 9 - 5 - value : dialyzertype - unitText : "" - } - RxProfileComponent{ - id: _TempComp - title : "Dialysate Temp" - height : 370 - (100 + Variables.defaultMargin * 2) - width : parent.width / 9 - 5 - value : dialysateTemperature - unitText : "C" - } - RxProfileComponent{ - id: _VitalsComp - title : "Vitals Interval" - height : 370 - (100 + Variables.defaultMargin * 2) - width : parent.width / 9 - 5 - value : vitalSigns - unitText : "min" - } -// Repeater{ -// model: _managerHome.treatmentFields[rxItem.index] -// delegate: RxProfileComponent{ -//// id: _comp1 -// title : qsTr(modelData.title) -// height : 370 - (100 + Variables.defaultMargin * 2) -// width : parent.width / 10 - 5 -// value : modelData.value -// unitText : modelData.units -// } -// } - } - Text { - text: 'Last Modified: ' + lastModifiedDate - width: parent.width // Makes it stretch - horizontalAlignment: Text.AlignRight - font.pointSize : Fonts.fontPixelButton - color : Colors.pressuresText - } - } - } - } + model: vRxProfiles.rxProfiles } + } onVisibleChanged: { if (visible) { _mainMenu.hidden = false vRxProfiles.doInitRxProfilesList() -// console.log("MEOWW", Object.keys(vRxProfiles.rxProfiles.get(0))) } else { stackView.initialItem = null Index: sources/gui/qml/pages/rxmanager/RxManagerList.qml =================================================================== diff -u -r9782439f3b5c0f06e3eb31bfea9aea877abbdce4 -r9f2f52d19e8cf2a2e93b521439ae4b9c0dc1ba56 --- sources/gui/qml/pages/rxmanager/RxManagerList.qml (.../RxManagerList.qml) (revision 9782439f3b5c0f06e3eb31bfea9aea877abbdce4) +++ sources/gui/qml/pages/rxmanager/RxManagerList.qml (.../RxManagerList.qml) (revision 9f2f52d19e8cf2a2e93b521439ae4b9c0dc1ba56) @@ -22,19 +22,14 @@ Item{ id: _root - property var model: null + property alias model: _listView.model - anchors { - left : parent.left - right : parent.right - } height: parent.height - (Variables.mainMenuHeight + Variables.alarmDialogHeaderHeight) ListView{ - id: _listView - anchors.fill: parent + anchors.fill: _root clip: true spacing: Variables.defaultMargin - model: _root.model - delegate: RxProfileContainer + id: _listView + delegate: RxProfileContainer { } } } Index: sources/gui/qml/pages/rxmanager/RxProfileComponent.qml =================================================================== diff -u -r9782439f3b5c0f06e3eb31bfea9aea877abbdce4 -r9f2f52d19e8cf2a2e93b521439ae4b9c0dc1ba56 --- sources/gui/qml/pages/rxmanager/RxProfileComponent.qml (.../RxProfileComponent.qml) (revision 9782439f3b5c0f06e3eb31bfea9aea877abbdce4) +++ sources/gui/qml/pages/rxmanager/RxProfileComponent.qml (.../RxProfileComponent.qml) (revision 9f2f52d19e8cf2a2e93b521439ae4b9c0dc1ba56) @@ -17,14 +17,12 @@ property string unitText : "" property string extraText : "" property alias value : _value.topText + property int topTextFont : Fonts.fontPixelRxProfileComponentLarge property bool showButtons : true property bool buttonsEnabled : true property bool dropShadowEnabled : true -// color : Colors.mainTreatmentLighterBlue -// radius : 5 - signal increment() signal decrement() @@ -33,7 +31,6 @@ anchors { horizontalCenter : _root.horizontalCenter - horizontalCenterOffset : Variables.defaultMargin * 1.5 top : parent.top topMargin : Variables.defaultMargin } @@ -44,11 +41,10 @@ } width : _root.width -// height : Variables.contentHeight + height : Variables.contentHeight text : _root.title color : Colors.pressuresText - horizontalAlignment : Text.AlignLeft - wrapMode: Text.Wrap + horizontalAlignment : Text.AlignHCenter maximumLineCount: 2 } @@ -67,35 +63,15 @@ top : parent.top topMargin : Variables.defaultMargin } - height : Variables.contentHeight + height : Variables.contentHeight * 3 width : Variables.treatmentFlowsComponentWidth topText : value - topTextFont.pixelSize : 60 topTextFont.weight : Font.Medium + topTextFont.pixelSize : _root.topTextFont + topTextAlignment : Text.AlignHCenter bottomText : _root.unitText bottomTextFont.pixelSize: 22 bottomTextTopMargin : Variables.defaultMargin - - Text { id: _extraText - objectName: "extraText" - - anchors { - horizontalCenter: _value.horizontalCenter - top : parent.bottom - topMargin : Variables.defaultMargin * 4.5 - } - - font { - pixelSize : 28 - weight : Font.Bold - } - - text : _root.extraText - width : 40 - height : Variables.contentHeight - color : Colors.mainTreatmentOrange - horizontalAlignment : Text.AlignHCenter - } } } Index: sources/gui/qml/pages/rxmanager/RxProfileContainer.qml =================================================================== diff -u -r9782439f3b5c0f06e3eb31bfea9aea877abbdce4 -r9f2f52d19e8cf2a2e93b521439ae4b9c0dc1ba56 --- sources/gui/qml/pages/rxmanager/RxProfileContainer.qml (.../RxProfileContainer.qml) (revision 9782439f3b5c0f06e3eb31bfea9aea877abbdce4) +++ sources/gui/qml/pages/rxmanager/RxProfileContainer.qml (.../RxProfileContainer.qml) (revision 9f2f52d19e8cf2a2e93b521439ae4b9c0dc1ba56) @@ -22,23 +22,14 @@ import "qrc:/components" import "qrc:/pages/rxmanager" -Item { +Component { id: _root Rectangle { - id: rxItem - anchors { - left : parent.left - right : parent.right - } + id: _rxItem + width: ListView.view.width height: 370 color: Colors.mainTreatmentLighterBlue radius: 5 - required property string name - required property string number - required property int index - required property string param1 - required property string value1 - required property string unit1 Column { id: _componentColumn @@ -47,34 +38,94 @@ right : parent.right leftMargin: Variables.defaultMargin * 2 rightMargin: Variables.defaultMargin * 2 + topMargin : Variables.defaultMargin } Text { - text: rxItem.name + id: _profileName + text: profileName font.pointSize : Fonts.fontPixelButton * 1.4 width: parent.width horizontalAlignment: Text.AlignLeft color : Colors.pressuresText } Row { + id: _componentRow spacing: 5 width: parent.width anchors { left : _componentColumn.left } - property int componentWidth: parent.width / 10 - 5 - Repeater{ - model: _managerHome.treatmentFields[rxItem.index] - delegate: RxProfileComponent{ - title : qsTr(modelData.title) - height : 370 - (100 + Variables.defaultMargin * 2) - width : parent.width / 10 - 5 - value : modelData.value - unitText : modelData.units - } + property int componentWidth: parent.width / 8 - 5 + RxProfileComponent{ + id: _bloodflowComp + title : "Blood Flow" + height : 370 - (100 + Variables.defaultMargin * 2) + width : _componentRow.componentWidth + value : bloodFlow + unitText : "mL/min" + } + RxProfileComponent{ + id: _diaflowComp + title : "Dialysate Flow" + height : 370 - (100 + Variables.defaultMargin * 2) + width : _componentRow.componentWidth + value : dialysateFlow + unitText : "mL/min" + } + RxProfileComponent{ + id: _txDurComp + title : "Duration" + height : 370 - (100 + Variables.defaultMargin * 2) + width : _componentRow.componentWidth + value : treatmentDuration + unitText : "min" + } + RxProfileComponent{ + id: _HeparinComp + title : "Heparin" + height : 370 - (100 + Variables.defaultMargin * 2) + width : _componentRow.componentWidth + value : (heparinVolume === "NONE") ? "- -" : heparinVolume + unitText : "mL" + } + RxProfileComponent{ + id: _ACComp + title : "Acid" + height : 370 - (100 + Variables.defaultMargin * 2) + width : _componentRow.componentWidth + value : acidConcentrate.replace(", ", "\n") + topTextFont : Fonts.fontPixelRxProfileComponentSmall + unitText : "" + } + RxProfileComponent{ + id: _BcComp + title : "Bicarbonate" + height : 370 - (100 + Variables.defaultMargin * 2) + width : _componentRow.componentWidth + value : bicarbConcentrate.replace(" ", "\n") + topTextFont : Fonts.fontPixelRxProfileComponentSmall + unitText : "" + } + RxProfileComponent{ + id: _DialyzerComp + title : "Dialyzer" + height : 370 - (100 + Variables.defaultMargin * 2) + width : _componentRow.componentWidth + value : dialyzerType.replace(/((?:[^ ]+ ){1}[^ ]+)\s/, "$1\n") + topTextFont : Fonts.fontPixelRxProfileComponentSmall + unitText : "" + } + RxProfileComponent{ + id: _TempComp + title : "Dialysate Temp" + height : 370 - (100 + Variables.defaultMargin * 2) + width : _componentRow.componentWidth + value : dialysateTemperature + unitText : "C" + } } - } Text { - text: 'Last Modified: ' + rxItem.number + text: 'Last Modified: ' + lastModifiedDate width: parent.width // Makes it stretch horizontalAlignment: Text.AlignRight font.pointSize : Fonts.fontPixelButton Index: sources/view/VRxProfiles.cpp =================================================================== diff -u -r1f927e37764a81fb6538b5cf7a74d8beacf56aac -r9f2f52d19e8cf2a2e93b521439ae4b9c0dc1ba56 --- sources/view/VRxProfiles.cpp (.../VRxProfiles.cpp) (revision 1f927e37764a81fb6538b5cf7a74d8beacf56aac) +++ sources/view/VRxProfiles.cpp (.../VRxProfiles.cpp) (revision 9f2f52d19e8cf2a2e93b521439ae4b9c0dc1ba56) @@ -45,7 +45,7 @@ { eDataRole_AcidConcentrateType , "acidConcentrate" }, { eDataRole_BicarbonateConcentrateType , "bicarbConcentrate" }, { eDataRole_DialysateTemperature , "dialysateTemperature" }, - { eDataRole_DialyzerType , "dialyzertype" }, + { eDataRole_DialyzerType , "dialyzerType" }, { eDataRole_HeparinConcentration , "heparinConcentrate" }, { eDataRole_HeparinBolusVolume , "heparinVolume" }, { eDataRole_HeparinDispenseRate , "heparinDispenseRate" },