Index: leahi.qrc =================================================================== diff -u -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a -rb395fdadb1ad460eba7e45eaca94c100a5d0c804 --- leahi.qrc (.../leahi.qrc) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) +++ leahi.qrc (.../leahi.qrc) (revision b395fdadb1ad460eba7e45eaca94c100a5d0c804) @@ -171,9 +171,8 @@ sources/gui/qml/compounds/CheckListView.qml sources/gui/qml/compounds/TouchGrid.qml sources/gui/qml/compounds/BPHREntry.qml - sources/gui/qml/compounds/PreTreatmentCreateItem.qml + sources/gui/qml/compounds/LabelUnitContainer.qml sources/gui/qml/compounds/ValueAdjuster.qml - qtquickcontrols2.conf Index: sources/gui/qml/compounds/LabelUnitContainer.qml =================================================================== diff -u --- sources/gui/qml/compounds/LabelUnitContainer.qml (revision 0) +++ sources/gui/qml/compounds/LabelUnitContainer.qml (revision b395fdadb1ad460eba7e45eaca94c100a5d0c804) @@ -0,0 +1,90 @@ +/*! + * + * Copyright (c) 2021-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 LabelUnitContainer.qml + * \author (last) Nico Ramirez + * \date (last) 21-Aug-2025 + * \author (original) Nico Ramirez + * \date (original) 21-Aug-2025 + * + */ + +// Qt +import QtQuick 2.12 + +// Qml +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/pretreatment" + +Rectangle { id: _root + property Item contentItem : null + property alias contentArea : _contentArea + + property alias text : _title.text + property string unitText: "" + property bool valid : true + property bool showUnit : true + property bool showEdit : false + + height : cellHeight + width : cellWidth + radius : 8.5 + color : Colors.panelBackgroundColor + + border { + width: 1 + color: valid ? Colors.panelBorderColor : Colors.panelInvalidBorderColor + } + + signal editClicked() + + Row { id: _titleRow + anchors { + verticalCenter : parent.verticalCenter + left : parent.left + leftMargin : Variables.defaultMargin + } + spacing : 10 + + Text { id: _title + anchors.verticalCenter : _titleRow.verticalCenter + color : Colors.offWhite + font.pixelSize : 28 + } + + Text { id: _unit + anchors.bottom : _title.bottom + text : ("(%1)").arg(_root.unitText) + color : Colors.offWhite + font.pixelSize : 22 + font.weight : Font.Thin + visible : _root.showUnit + } + + IconButton { id : _editButton + anchors.verticalCenter : _title.verticalCenter + anchors.verticalCenterOffset : 5 + visible : _root.showEdit + iconImageSource : "qrc:/images/iEdit" + onPressed : _root.editClicked() + iconSize : Variables.iconsDiameter + } + } + + ContentArea { id : _contentArea + anchors { + top : _root.top + left : _root.left + leftMargin : _root.width / 2 + right : _root.right + bottom : _root.bottom + } + + contentItem: _root.contentItem + } +} Fisheye: Tag b395fdadb1ad460eba7e45eaca94c100a5d0c804 refers to a dead (removed) revision in file `sources/gui/qml/compounds/PreTreatmentCreateItem.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml =================================================================== diff -u -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a -rb395fdadb1ad460eba7e45eaca94c100a5d0c804 --- sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (.../AcidConcentrateAdjustment.qml) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) +++ sources/gui/qml/dialogs/AcidConcentrateAdjustment.qml (.../AcidConcentrateAdjustment.qml) (revision b395fdadb1ad460eba7e45eaca94c100a5d0c804) @@ -64,7 +64,7 @@ } } - PreTreatmentCreateItem { id: _potassium + LabelUnitContainer { id: _potassium anchors { verticalCenter: parent.verticalCenter verticalCenterOffset: -100 @@ -85,7 +85,7 @@ } } - PreTreatmentCreateItem { id: _calcium + LabelUnitContainer { id: _calcium anchors { top : _potassium.bottom topMargin : Variables.defaultMargin Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml =================================================================== diff -u -rda2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a -rb395fdadb1ad460eba7e45eaca94c100a5d0c804 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision da2dbdbd92d099e44d11bbfb2b794d5ee19a0f0a) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision b395fdadb1ad460eba7e45eaca94c100a5d0c804) @@ -185,7 +185,7 @@ height : cellHeight width : cellWidth - PreTreatmentCreateItem { id: _patientID + LabelUnitContainer { id: _patientID anchors.verticalCenter : parent.verticalCenter text : qsTr("Patient ID") showUnit : false @@ -219,7 +219,7 @@ } } - PreTreatmentCreateItem { id: _bloodFlowRate + LabelUnitContainer { id: _bloodFlowRate text : qsTr("Blood Flow Rate") unitText : Variables.unitTextFlowRate valid : ! vTreatmentCreate.bloodFlowRateRejectReason @@ -237,7 +237,7 @@ } } - PreTreatmentCreateItem { id: _dialysateFlowRate + LabelUnitContainer { id: _dialysateFlowRate text : qsTr("Dialysate Flow Rate") unitText : Variables.unitTextFlowRate valid : ! vTreatmentCreate.dialysateFlowRateRejectReason @@ -252,7 +252,7 @@ } } - PreTreatmentCreateItem { id: _duration + LabelUnitContainer { id: _duration text : qsTr("Duration") unitText : Variables.unitTextDuration valid : ! vTreatmentCreate.treatmentDurationRejectReason @@ -275,7 +275,7 @@ } } - PreTreatmentCreateItem { id: _heparinDispensingRate + LabelUnitContainer { id: _heparinDispensingRate text : qsTr("Heparin Dispensing Rate") unitText : Variables.unitTextDispensingRate valid : ! vTreatmentCreate.heparinDispensingRateRejectReason @@ -308,7 +308,7 @@ } } - PreTreatmentCreateItem { id: _heparinBolusVolume + LabelUnitContainer { id: _heparinBolusVolume text : qsTr("Heparin Bolus Volume") unitText : Variables.unitTextFluid valid : ! vTreatmentCreate.heparinBolusVolumeRejectReason @@ -328,7 +328,7 @@ } } - PreTreatmentCreateItem { id: _heparinStopTime + LabelUnitContainer { id: _heparinStopTime text : qsTr("Heparin Stop Time") unitText : Variables.unitTextDuration valid : ! vTreatmentCreate.heparinStopTimeRejectReason @@ -371,7 +371,7 @@ } } - PreTreatmentCreateItem { id: _acidConcentrate + LabelUnitContainer { id: _acidConcentrate text : qsTr("Acid Concentrate") showUnit : false showEdit : _root.editingEnabled @@ -400,7 +400,7 @@ } } - PreTreatmentCreateItem { id: _bicarbonateConcentrate + LabelUnitContainer { id: _bicarbonateConcentrate text : qsTr("Bicarbonate Concentrate") showUnit : false valid : ! vTreatmentCreate.bicarbonateConcentrateRejectReason @@ -423,7 +423,7 @@ } } - PreTreatmentCreateItem { id: _dialyzerType + LabelUnitContainer { id: _dialyzerType text : qsTr("Dialyzer Type") showUnit : false valid : ! vTreatmentCreate.dialyzerTypeRejectReason @@ -446,7 +446,7 @@ } } - PreTreatmentCreateItem { id: _dialysateTemperature + LabelUnitContainer { id: _dialysateTemperature text : qsTr("Dialysate Temperature") unitText : Variables.unitTextTemperature valid : ! vTreatmentCreate.dialysateTempRejectReason @@ -465,7 +465,7 @@ } } - PreTreatmentCreateItem { id: _salineBolusVolume + LabelUnitContainer { id: _salineBolusVolume text : qsTr("Saline Bolus Volume") unitText : Variables.unitTextFluid valid : ! vTreatmentCreate.salineBolusVolumeRejectReason @@ -483,7 +483,7 @@ } } - PreTreatmentCreateItem { id: _bpMeasurementInterval + LabelUnitContainer { id: _bpMeasurementInterval text : qsTr("BP Measurement Interval") unitText : Variables.unitTextDuration valid : ! vTreatmentCreate.bloodPressureMeasureIntervalRejectReason