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