Index: sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml =================================================================== diff -u -r04fd28f30e37a09450ff5877ae2f805a92898b44 -re8d73dd5ebca400248f59bf4c3940ff50dee696a --- sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision 04fd28f30e37a09450ff5877ae2f805a92898b44) +++ sources/gui/qml/pages/posttreatment/PostTreatmentReview.qml (.../PostTreatmentReview.qml) (revision e8d73dd5ebca400248f59bf4c3940ff50dee696a) @@ -16,7 +16,6 @@ // Qt import QtQuick 2.12 - // Project // Qml imports import "qrc:/globals" @@ -28,98 +27,94 @@ * \brief the post treatment Treatment Log review screen */ PostTreatmentBase { id: _root - signal itemClicked(int vIndex) + property int colSpacing: Variables.defaultMargin - readonly property alias itemsText : _parametersGrid.itemsText - readonly property alias itemsValue: _parametersGrid.itemsValue - readonly property alias itemsUnit : _parametersGrid.itemsUnit - - ScrollBar { - anchors.fill: _flickable - 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 { - top : _root.title.bottom - topMargin : Variables.minVGap * 2 // * 2 : it was too close to title and also better with rows not half cut. + top : header.bottom + topMargin : Variables.defaultMargin * 2 bottom : _root.bottom bottomMargin : Variables.notificationHeight + Variables.minVGap - horizontalCenter: parent.horizontalCenter + left : parent.left + leftMargin : Variables.defaultMargin * 4 + right : parent.right + rightMargin : Variables.defaultMargin * 4 + } - width : parent.width - Variables.minVGap2 * 2 // * 2 : for each side - contentWidth : width - contentHeight: _parametersGrid.height - TouchGrid { id: _parametersGrid - // 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 ) + contentWidth : width + contentHeight : _row.height + clip : true - height : _rowCount * ( rowSpacing + itemHeight ) + itemHeight - width : parent.width - colCount : _colCount - rowCount : _rowCount - itemWidth : 575 - rowSpacing : 0 - colSpacing : 50 - lineColor : Colors.backgroundMain - itemsText : vPostTreatmentAdjustmentTreatmentLog.parametersTitle - itemsValue : vPostTreatmentAdjustmentTreatmentLog.parametersText - 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) + Row { id: _row + width : _flickable.width + spacing : Variables.defaultMargin + + Column { id: _leftColumn + width : _flickable.width / 2 + spacing : _root.colSpacing + + ReviewContainer { id: _patientInfo + title : qsTr("Patient Information") + width : parent.width + + label : [ qsTr("Patient ID") , + qsTr("Secondary Patient ID")] + + initial : [ vPostTreatmentAdjustmentTreatmentLog.patientID , + vPostTreatmentAdjustmentTreatmentLog.secondaryPatientID ] + + actual : [ "" , "" ] + units : [ "" , "" ] + } + + ReviewContainer { id: _bloodFlowDiaysate + title : qsTr("Blood Flow Rate and Dialysate Settings") + width : parent.width + label : [ qsTr("Blood Flow Rate") , + qsTr("Dialysis Flow Rate") , + qsTr("Dialyzer Type") , + qsTr("Dialysate Temperature") , + qsTr("Dialysate Volume Used") ] + + initial : [ vPostTreatmentAdjustmentTreatmentLog.bloodFlowRate , + vPostTreatmentAdjustmentTreatmentLog.dialysateFlowRate , + vPostTreatmentAdjustmentTreatmentLog.dialyzerType , + vPostTreatmentAdjustmentTreatmentLog.dialysateTemp , + vPostTreatmentAdjustmentTreatmentLog.dialysateVolumeUsed ] + + actual : [ vPostTreatmentAdjustmentTreatmentLog.bloodFlowRateActual , + vPostTreatmentAdjustmentTreatmentLog.dialysateFlowRateActual , + "" , // leave empty + vPostTreatmentAdjustmentTreatmentLog.dialysateTemperatureActual , + "" ] // leave empty + + precision : [ 0, + 0, + 0, + Variables.dialysateTempPrecision, + Variables.ultrafiltrationPrecision ] + + units : [ Variables.unitTextFlowRate , + Variables.unitTextFlowRate , + "" , + Variables.unitTextTemperature , + Variables.unitVolume ] + } + + + } + + Column { id: _rightColumn + width : _flickable.width / 2 + spacing : _root.colSpacing + + } } } + + ScrollBar { flickable: _flickable } + reasonText : vPostTreatmentAdjustmentTreatmentLog.text() informationText : vPostTreatmentAdjustmentTreatmentLog.notification } -