Index: sources/gui/qml/pages/ManagerStack.qml =================================================================== diff -u -rc8ca0550f364ddbff8f37a68ce49050dfbc0ec09 -r9782439f3b5c0f06e3eb31bfea9aea877abbdce4 --- sources/gui/qml/pages/ManagerStack.qml (.../ManagerStack.qml) (revision c8ca0550f364ddbff8f37a68ce49050dfbc0ec09) +++ sources/gui/qml/pages/ManagerStack.qml (.../ManagerStack.qml) (revision 9782439f3b5c0f06e3eb31bfea9aea877abbdce4) @@ -31,25 +31,210 @@ StackItem { id : _root stackView.initialItem : _managerHome ScreenItem { id: _managerHome - Column { id: _managerColumn - anchors { - top : parent.top - bottom : parent.bottom - left : parent.left - right : parent.right - topMargin : Variables.defaultMargin * 2 - leftMargin : Variables.defaultMargin * 2 - rightMargin : Variables.defaultMargin * 2 - bottomMargin: Variables.alarmDialogHeaderHeight - } - spacing : Variables.defaultMargin + anchors { + fill : parent + topMargin : Variables.defaultMargin * 2 + leftMargin : Variables.defaultMargin * 3 + rightMargin : Variables.defaultMargin * 3 + bottomMargin: Variables.alarmDialogHeaderHeight + } +// spacing : Variables.defaultMargin +// Column { id: _managerColumn - RxManagerHeader{ + RxManagerHeader{id: _rxHeader height: 100 //TODO Calculate how much to give } - PlaceHolderText {screenName: qsTr("Rx Profiles")} - } + + + 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" } + ], + + ] + RxManagerList{ + anchors.top : _rxHeader.bottom + model: _dummy + } +// 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: _dummy +// delegate: _rxProfile +// } +// } + +// Component { +// id: _rxProfile +// Rectangle { +// id: rxItem +// anchors { +// left : parent.left +// right : parent.right +// } +// 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 + +// anchors { +// left : parent.left +// right : parent.right +// leftMargin: Variables.defaultMargin * 2 +// rightMargin: Variables.defaultMargin * 2 +// } +// Text { +// text: rxItem.name +// 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 / 10 - 5 +// Repeater{ +// model: _managerHome.treatmentFields[rxItem.index] +// delegate: RxProfileComponent{ +//// id: _comp1 +// title : qsTr(modelData.title)//qsTr(rxItem.param1) +// height : 370 - (100 + Variables.defaultMargin * 2) +// width : parent.width / 10 - 5 +// value : modelData.value//rxItem.value1 +// unitText : modelData.units//rxItem.unit1 +// } +// } + +// Repeater { +// model: _managerHome.treatmentFields[rxItem.index] //10 +// delegate: +// Rectangle{ +// width: parent.width / 10 - 5 +// height: 370 - (100 + Variables.defaultMargin * 2) +// color: "green" +// } +// Column { +// anchors.centerIn: parent +// spacing: 2 + +// Text { +// text: modelData.title +// font.bold: true +// visible: modelData.title !== "" +// } + +// Text { +// text: modelData.value +// font.pixelSize: 14 +// color: "white" +// visible: modelData.value !== "" +// } + +// Text { +// text: modelData.units +// font.pixelSize: 12 +// color: "lightgray" +// visible: modelData.units !== "" +// } +// } +// } +// } +// Text { +// text: 'Last Modified: ' + rxItem.number +// width: parent.width // Makes it stretch +// horizontalAlignment: Text.AlignRight +// font.pointSize : Fonts.fontPixelButton +// color : Colors.pressuresText +// } +// } +// } +// } + +// PlaceHolderText {screenName: qsTr("Rx Profiles")} +// } } onVisibleChanged: { Index: sources/gui/qml/pages/rxmanager/RxManagerHeader.qml =================================================================== diff -u -rc8ca0550f364ddbff8f37a68ce49050dfbc0ec09 -r9782439f3b5c0f06e3eb31bfea9aea877abbdce4 --- sources/gui/qml/pages/rxmanager/RxManagerHeader.qml (.../RxManagerHeader.qml) (revision c8ca0550f364ddbff8f37a68ce49050dfbc0ec09) +++ sources/gui/qml/pages/rxmanager/RxManagerHeader.qml (.../RxManagerHeader.qml) (revision 9782439f3b5c0f06e3eb31bfea9aea877abbdce4) @@ -70,7 +70,7 @@ property bool isAscending: true // Add a property connected to this button that will; affect the model that has the list View of Rx profiles Image { id : _orderImage - source : _orderButton.isAscending ? "qrc:/images/iAscendingOrderArrow" : "qrc:/images/iDescendingOrderArrow" + source : _orderButton.isAscending ? "qrc:/images/iArrowLeft" : "qrc:/images/iArrowRight" //"qrc:/images/iAscendingOrderArrow" : "qrc:/images/iDescendingOrderArrow" width : 50 height : 50 fillMode : Image.PreserveAspectFit Index: sources/gui/qml/pages/rxmanager/RxManagerList.qml =================================================================== diff -u -rc8ca0550f364ddbff8f37a68ce49050dfbc0ec09 -r9782439f3b5c0f06e3eb31bfea9aea877abbdce4 --- sources/gui/qml/pages/rxmanager/RxManagerList.qml (.../RxManagerList.qml) (revision c8ca0550f364ddbff8f37a68ce49050dfbc0ec09) +++ sources/gui/qml/pages/rxmanager/RxManagerList.qml (.../RxManagerList.qml) (revision 9782439f3b5c0f06e3eb31bfea9aea877abbdce4) @@ -18,62 +18,23 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/pages/rxmanager" -Item { id: _root +Item{ + id: _root + property var model: null + anchors { left : parent.left right : parent.right } - - ListView { id: _deviceList - ScrollBar { - anchors.fill: _deviceList - flickable : _deviceList - } - clip : true - spacing : 5 - width : 500 - height : 300 -// model : vBluetooth - delegate: TouchRect { id: _deviceTouchrect - readonly property color selectedColor: Colors.borderButtonSelected - readonly property color pairedColor: Colors.borderButton - readonly property color normalColor: Colors.borderButtonUnselected - property bool selectedDevice: addr === vBluetooth.pairedAddr - clip : true - radius : 10 - width : 500 - 10 // give room to scrollbar - height : 70 - color : Colors.transparent - border.color: selectedDevice ? selectedColor : (pair ? pairedColor : normalColor) - text { - text: addr + '\n' + name - anchors.horizontalCenter: undefined - anchors.left: _deviceTouchrect.left - anchors.leftMargin: 5 - } - onClicked: { - vBluetooth.didDeviceSelect(addr, name) - } - ProgressCircle { - minimum : 0 - maximum : 100 - value : vBluetooth.pairedBatt - color : _deviceTouchrect.border.color - visible : selectedDevice - diameter : 25 - anchors.margins: 5 - anchors.top: parent.top - anchors.right: parent.right - Text { - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - color : Colors.white - anchors.fill: parent - font.pixelSize: 10 - text: vBluetooth.pairedBatt - } - } - } + height: parent.height - (Variables.mainMenuHeight + Variables.alarmDialogHeaderHeight) + ListView{ + id: _listView + anchors.fill: parent + clip: true + spacing: Variables.defaultMargin + model: _root.model + delegate: RxProfileContainer } } Index: sources/gui/qml/pages/rxmanager/RxProfileComponent.qml =================================================================== diff -u --- sources/gui/qml/pages/rxmanager/RxProfileComponent.qml (revision 0) +++ sources/gui/qml/pages/rxmanager/RxProfileComponent.qml (revision 9782439f3b5c0f06e3eb31bfea9aea877abbdce4) @@ -0,0 +1,112 @@ + +// Qt +import QtQuick 2.12 +import QtGraphicalEffects 1.12 + +// Project + +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/treatment" + +Item { id: _root + + property string title : "" + property string value : "" + property string unitText : "" + property string extraText : "" + property alias value : _value.topText + + property bool showButtons : true + property bool buttonsEnabled : true + property bool dropShadowEnabled : true + +// color : Colors.mainTreatmentLighterBlue +// radius : 5 + + signal increment() + signal decrement() + + Text { id: _title + objectName: "title" + + anchors { + horizontalCenter : _root.horizontalCenter + horizontalCenterOffset : Variables.defaultMargin * 1.5 + top : parent.top + topMargin : Variables.defaultMargin + } + + font { + pixelSize : 28 + weight : Font.Normal + } + + width : _root.width +// height : Variables.contentHeight + text : _root.title + color : Colors.pressuresText + horizontalAlignment : Text.AlignLeft + wrapMode: Text.Wrap + maximumLineCount: 2 + } + + Row { id: _row + objectName: "row" + + anchors { + top : _title.bottom + bottom : _root.bottom + horizontalCenter : _root.horizontalCenter + } + + LabelValue { id: _value + objectName: "value" + anchors { + top : parent.top + topMargin : Variables.defaultMargin + } + height : Variables.contentHeight + width : Variables.treatmentFlowsComponentWidth + topText : value + topTextFont.pixelSize : 60 + topTextFont.weight : Font.Medium + 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 + } + } + } + + layer.enabled : _root.dropShadowEnabled && _root.showButtons + layer.effect : DropShadow { id: _dropShadow + horizontalOffset: 3 + verticalOffset : 3 + radius : 3.0 + samples : 7 + color : "#50000000" + source : _root + anchors.fill : _root + } +} Index: sources/gui/qml/pages/rxmanager/RxProfileContainer.qml =================================================================== diff -u --- sources/gui/qml/pages/rxmanager/RxProfileContainer.qml (revision 0) +++ sources/gui/qml/pages/rxmanager/RxProfileContainer.qml (revision 9782439f3b5c0f06e3eb31bfea9aea877abbdce4) @@ -0,0 +1,85 @@ +/*! + * + * Copyright (c) 2019-2024 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 RxProfileContainer.qml + * \author (last) Behrouz NematiPour + * \date (last) 11-May-2021 + * \author (original) Behrouz NematiPour + * \date (original) 21-Oct-2019 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/rxmanager" + +Item { + id: _root + Rectangle { + id: rxItem + anchors { + left : parent.left + right : parent.right + } + 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 + + anchors { + left : parent.left + right : parent.right + leftMargin: Variables.defaultMargin * 2 + rightMargin: Variables.defaultMargin * 2 + } + Text { + text: rxItem.name + 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 / 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 + } + } + } + Text { + text: 'Last Modified: ' + rxItem.number + width: parent.width // Makes it stretch + horizontalAlignment: Text.AlignRight + font.pointSize : Fonts.fontPixelButton + color : Colors.pressuresText + } + } + } +}