Index: leahi.qrc =================================================================== diff -u -r6a1e770e3d7a8729ab7acdb7b2e96a5b72f8bc9f -rc8ca0550f364ddbff8f37a68ce49050dfbc0ec09 --- leahi.qrc (.../leahi.qrc) (revision 6a1e770e3d7a8729ab7acdb7b2e96a5b72f8bc9f) +++ leahi.qrc (.../leahi.qrc) (revision c8ca0550f364ddbff8f37a68ce49050dfbc0ec09) @@ -104,6 +104,9 @@ resources/images/Menu_Dot.png resources/images/ArrowLeftDisabled.png resources/images/ArrowRightDisabled.png + resources/images/ascending-arrow.png + resources/images/descending-arrow.png + resources/images/default-order-arrow.png sources/gui/qml/components/MainMenu.qml @@ -295,4 +298,8 @@ sources/gui/qml/pages/posttreatment/PostTreatmentStack.qml sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml + + sources/gui/qml/pages/rxmanager/RxManagerHeader.qml + sources/gui/qml/pages/rxmanager/RxManagerList.qml + Index: sources/gui/qml/pages/ManagerStack.qml =================================================================== diff -u -ra58f91b077c8131bea3dbde0fc338adb113fc9f3 -rc8ca0550f364ddbff8f37a68ce49050dfbc0ec09 --- sources/gui/qml/pages/ManagerStack.qml (.../ManagerStack.qml) (revision a58f91b077c8131bea3dbde0fc338adb113fc9f3) +++ sources/gui/qml/pages/ManagerStack.qml (.../ManagerStack.qml) (revision c8ca0550f364ddbff8f37a68ce49050dfbc0ec09) @@ -20,6 +20,7 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/pages/rxmanager" /*! * \brief ManagerStack is the screen @@ -29,10 +30,26 @@ */ StackItem { id : _root stackView.initialItem : _managerHome - ScreenItem { id: _managerHome - PlaceHolderText { screenName: qsTr("Prescriptions") } - onVisibleChanged: if (visible) _mainMenu.hidden = true + 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 + + RxManagerHeader{ + height: 100 //TODO Calculate how much to give + } + + PlaceHolderText {screenName: qsTr("Rx Profiles")} + } } onVisibleChanged: { @@ -42,5 +59,6 @@ else { stackView.initialItem = null } + } } Index: sources/gui/qml/pages/rxmanager/RxManagerHeader.qml =================================================================== diff -u --- sources/gui/qml/pages/rxmanager/RxManagerHeader.qml (revision 0) +++ sources/gui/qml/pages/rxmanager/RxManagerHeader.qml (revision c8ca0550f364ddbff8f37a68ce49050dfbc0ec09) @@ -0,0 +1,102 @@ +/*! + * + * 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 RxManagerHeader.qml + * \author (original) Tiffnay Mejia + * \date (original) 10-Oct-2025 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +Item { id: _root + anchors { + left : parent.left + right : parent.right + } + + Row { id: _headerRow + anchors { + left : parent.left + } + spacing: Variables.defaultMargin * 2 + + Text { id : headerText + text : qsTr("Saved Prescriptions (#/10)") + color : Colors.textButton + font.pointSize : Fonts.fontPixelButton * 1.4 + verticalAlignment : Text.AlignVCenter + } + + BaseComboBox { id: _sortdropdown + model : [qsTr("Favorites"), qsTr("Last Modified"), qsTr("Last Used"), qsTr("Name")] + height : 70 + width : 300 + onActivated: { + switch (currentIndex) { + case 0: + print("TODO: Favorites selected " ) + break + case 1: + print("TODO: Last modified selected " ) + break + case 2: + print("TODO: Last used selected" ) + break + case 3: + print("TODO: name selected " ) + break + default: // Unknown state + break + } + } + } + + + TouchRect { id: _orderButton + color : Colors.highlightMedProgressBar + height: 70 + width : 70 + 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" + width : 50 + height : 50 + fillMode : Image.PreserveAspectFit + anchors.centerIn: parent + } + onClicked:{ + isAscending = !isAscending + } + } + } + Row { id: _rxButtons + anchors { + right : parent.right + } + spacing: Variables.defaultMargin * 4 + + TouchRect { id: _rxImportButton + text.text : qsTr("Import") + height: 70 + width: 244 + } + + TouchRect {id: _rxAddButton + text.text : qsTr("Add Prescription") + height: 70 + width: 244 + } + } +} Index: sources/gui/qml/pages/rxmanager/RxManagerList.qml =================================================================== diff -u --- sources/gui/qml/pages/rxmanager/RxManagerList.qml (revision 0) +++ sources/gui/qml/pages/rxmanager/RxManagerList.qml (revision c8ca0550f364ddbff8f37a68ce49050dfbc0ec09) @@ -0,0 +1,79 @@ +/*! + * + * 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 RxManagerHeader.qml + * \author (original) Tiffnay Mejia + * \date (original) 10-Oct-2025 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +Item { id: _root + 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 + } + } + } + } +}