Index: sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml =================================================================== diff -u -re125bd5cf13750eaf241d518b9c846139afaa81c -r5687815256ae070a9a207107088e3f72dd464da0 --- sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision e125bd5cf13750eaf241d518b9c846139afaa81c) +++ sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision 5687815256ae070a9a207107088e3f72dd464da0) @@ -1,15 +1,15 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2021-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 PostTreatmentMainStack.qml + * \file PostTreatmentReview.qml * \author (last) Behrouz NematiPour - * \date (last) 20-Apr-2021 + * \date (last) 31-Jul-2024 * \author (original) Behrouz NematiPour - * \date (original) 20-Apr-2021 + * \date (original) 21-Apr-2021 * */ @@ -30,27 +30,64 @@ PostTreatmentBase { id: _root signal itemClicked(int vIndex) - ExportButton { + readonly property alias itemsText : _parametersGrid.itemsText + readonly property alias itemsValue: _parametersGrid.itemsValue + readonly property alias itemsUnit : _parametersGrid.itemsUnit + + header.confirmText.text: qsTr("NEXT") + + ExportButton { id: _exportButton + isSmall : true anchors.top : parent.top anchors.left : parent.left - exportTreatment : true + enabled : vPostTreatmentAdjustmentTreatmentLog.isIdle && _GuiView.usbIsReady && !_GuiView.exportRunning + onClicked : vPostTreatmentAdjustmentTreatmentLog.doExport() } + USBButton { id: _usbButton + anchors.top : _exportButton.top + anchors.left : _exportButton.right + anchors.leftMargin: Variables.minVGap + enabled : _GuiView.usbIsReady && !_GuiView.exportRunning + } - Rectangle { id: _backgroud - clip: true + ScrollBar { anchors.fill: _flickable - color : Colors.backgroundDialog - radius : 5 - Rectangle { id: _scrollbar - anchors.right: parent.right - width : 5 - radius : width - y : _flickable.height * _flickable.visibleArea.yPosition - height : _flickable.height * _flickable.visibleArea.heightRatio - color : "#80696969" // half transparent dimgray + flickable : _flickable + backColor : Colors.backgroundDialog + } + + Label { id: _txCode + property string empty : "..." + property string txCode : vPostTreatmentAdjustmentTreatmentLog.txCode + Timer { id: _waitTxCodeTimer + property int count: 0 + interval: 1000 + repeat : true + running : _txCode.visible && ! _txCode.txCode + onTriggered: { + _txCode.empty = ".".repeat( count ++ ) + if ( count == 4 ) count = 0 + } } + + anchors.bottom : _flickable.top + anchors.left : _flickable.left + width : _flickable.width + text : qsTr("Code: ") + ( txCode ? txCode : empty ) + font.pixelSize : Fonts.fontPixelButton } + QRCode { id: _qrCode + // removed for the P1 release, since the code had a big change and cannot be removed entirely + // added for the P1B release + visible : true + anchors.bottom : _flickable.top + anchors.right : _flickable.right + anchors.margins : 15 + qrcode : vPostTreatmentAdjustmentTreatmentLog.txCode + clear : ! _root.visible + } + Flickable { id: _flickable clip: true anchors { @@ -60,99 +97,45 @@ bottomMargin : Variables.notificationHeight + Variables.minVGap horizontalCenter: parent.horizontalCenter } - width : parent.width - Variables.minVGap * 2 // * 2 : for each side + width : parent.width - Variables.minVGap2 * 2 // * 2 : for each side contentWidth : width contentHeight: _parametersGrid.height TouchGrid { id: _parametersGrid - height : rowCount * ( rowSpacing + itemHeight ) + itemHeight + // TODO: fixed only for this list since it has been used other places. + // investigate more to move these readonly properties in the TouchGrid component. + readonly property int _itemCount: vPostTreatmentAdjustmentTreatmentLog.parametersTitle.length + readonly property int _colCount : 2 + readonly property int _rowCount : Math.ceil( _itemCount / _colCount ) + + height : _rowCount * ( rowSpacing + itemHeight ) + itemHeight width : parent.width - colCount : 2 - rowCount : 17 + colCount : _colCount + rowCount : _rowCount itemWidth : 575 rowSpacing : 0 - columnSpacing : 50 + colSpacing : 50 lineColor : Colors.backgroundMain + itemsText : vPostTreatmentAdjustmentTreatmentLog.parametersTitle itemsValue : vPostTreatmentAdjustmentTreatmentLog.parametersText - itemsText : [ - qsTr("Blood Flow Rate" ), - qsTr("Dialysate Flow Rate" ), - qsTr("Treatment Duration" ), - qsTr("Actual Treatment Duration" ), - qsTr("Acid ConcentrateType" ), - qsTr("Bicarbonate Concentrate Type" ), - qsTr("Potassium Concentration" ), - qsTr("Calcium Concentration" ), - qsTr("Bicarbonate Concentration" ), - qsTr("Sodium Concentration" ), - qsTr("Dialysate Temperature" ), - qsTr("Dialyzer Type" ), - qsTr("Treatment DateTime" ), - qsTr("Average Blood Flow" ), - qsTr("Average Dialysate Flow" ), - qsTr("Dialysate Volume Used" ), - qsTr("Average Dialysate Temp" ), - qsTr("Target UF Volume" ), - qsTr("Actual UF Volume" ), - qsTr("Target UF Rate" ), - qsTr("Actual UF Rate" ), - qsTr("Saline Bolus Volume" ), - qsTr("Heparin Type" ), - qsTr("Heparin Concentration" ), - qsTr("Heparin Bolus Volume" ), - qsTr("Heparin Dispense Rate" ), - qsTr("Heparin Pre-Stop" ), - qsTr("Heparin Delivered Volume" ), - qsTr("Average Arterial Pressure" ), - qsTr("Average Venous Pressure" ), - qsTr("End Treatment Early Alarm" ), - qsTr("Device ID" ), - qsTr("Water Sample Test Result" ), - ] - itemsUnit : [ - Variables.unitTextFlowRate , - Variables.unitTextFlowRate , - Variables.unitTextDuration , - Variables.unitTextDuration , - "" , - "" , - Variables.unitTextConcentration , - Variables.unitTextConcentration , - Variables.unitTextConcentration , - Variables.unitTextConcentration , - Variables.unitTextTemperature , - "" , - "" , - Variables.unitTextFlowRate , - Variables.unitTextFlowRate , - Variables.unitTextVolume , - Variables.unitTextTemperature , - Variables.unitTextVolume , - Variables.unitTextVolume , - Variables.unitTextFlowRate , - Variables.unitTextFlowRate , - Variables.unitTextFluid , - "" , - Variables.unitTextHeparinConcentration , - Variables.unitTextFluid , - Variables.unitTextDispencingRate , - Variables.unitTextDuration , - Variables.unitTextFluid , - Variables.unitTextBloodPressure , - Variables.unitTextBloodPressure , - "" , - "" , - "" - ] - itemsValueLeftMargin : 350 - itemsUnitLeftMargin : 495 - itemsTouchable : [ - 0,0,0,0,1,0,0,0,0,0, - 1,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0, - ] + itemsUnit : vPostTreatmentAdjustmentTreatmentLog.parametersUnit + itemsValueLeftMargin : 350 // if decreased may be covered by title + itemsUnitLeftMargin : 470 // if increased will be covered by chevron if touchable + // Note: to make the item touchable + // set the touchable: true + // and set the index ot the touchable item in the itemsTouchable: [] list to 1 + // like displayed below. + touchable : false + // itemsTouchable : [ + // 0,0,0,0,0,0,0,0,0,0, + // 0,0,0,0,0,0,0,0,0,0, + // 0,0,0,0,0,0,0,0,0,0, + // 0,0,0,0,0,0,0,0,0,0, + // ] onItemClicked: _root.itemClicked(vIndex) } } + reasonText : vPostTreatmentAdjustmentTreatmentLog.text() + informationText : vPostTreatmentAdjustmentTreatmentLog.notification } +