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