Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r7710fea4486a639caaa3c510add0eac0bcd4ddcc -rdcb88e63735118d1f11b2234752485b7cd71fd57 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 7710fea4486a639caaa3c510add0eac0bcd4ddcc) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision dcb88e63735118d1f11b2234752485b7cd71fd57) @@ -1,16 +1,16 @@ /*! - * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * + * Copyright (c) 2019-2023 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 Variables.qml - * \author (last) Peter Lucia - * \date (last) 06-Oct-2020 - * \author (original) Behrouz NematiPour - * \date (original) 09-Oct-2019 - * + * + * \file Variables.qml + * \author (last) Behrouz NematiPour + * \date (last) 14-Mar-2023 + * \author (original) Behrouz NematiPour + * \date (original) 09-Oct-2019 + * */ // Qt @@ -23,25 +23,34 @@ * which is going to be used in the project. */ QtObject { + readonly property int keybardAnimationDuration : 200 + readonly property int applicationWidth : 1280 readonly property int applicationHeight : 800 readonly property int buttonSpacing : 150 readonly property int dialogIconHeight : 50 readonly property int dialogIconWidth : 50 readonly property int dialogIconHorizontalOffset : 25 readonly property int headerHeight : 100 + readonly property int headerButtonsMargin : 35 readonly property int mainMenuHeight : 70 - readonly property int logoWidth : 50 - readonly property int logoHeight : 50 + readonly property int minVGap : 15 + readonly property int minVGap2 : 30 + readonly property int logoDiameter : 50 + + readonly property int iconsDiameter : 25 + readonly property int largeArrowWidth : 24 readonly property int largeArrowHeight : 32 readonly property int arrowWidth : 12 readonly property int arrowHeight : 16 + readonly property int alarmListIconDiameter : 45 + readonly property int borderWidth : 2 readonly property int touchRectWidth : 512 //K:D //425 @@ -55,37 +64,47 @@ readonly property int dialogMargin : mainMenuHeight * 2 readonly property int dialogWidth : applicationWidth - dialogMargin readonly property int dialogHeight : applicationHeight - dialogMargin - readonly property int dialogRadius : 10 - readonly property int dialogRadiusHalf : 5 + readonly property int dialogRadius : 5 + readonly property real sliderDefaultRoundTickMarkDiameter : 5 + readonly property real sliderCreateTreatmentHeight : 15 + readonly property int rangeRectMargin : 1 readonly property int rangeRectRadius : 2 readonly property int rangeRectTextMargin : 7 + readonly property int rangeRectBorderWidth : 2 readonly property int rangeMarkerHeight : 60 readonly property int rangeMarkerHeightMidle : 40 readonly property int rangeMarkerHeightShort : 20 readonly property int rangeMarkerWidth : 2 readonly property int progressbarHeight : 30 readonly property int progressbarHandler : 35 + readonly property int progressbarHandlerBorderWidth : 4 readonly property int progressbarFluidHeight : 5 readonly property int progressbarSmall : 5 readonly property int progressbarSmallWidth : 600 readonly property int progressbarRectHeight : 50 readonly property int progressbarRectWidth : 620 + readonly property int circleNormalDiameter : 350 + readonly property int progressCircleDiameterNormal : circleNormalDiameter + readonly property int progressCircleDiameterSmall : 150 + readonly property int opacityAnimationDuration : 1200 + readonly property int sliderTextMargin : 20 - readonly property int treatmentSpacing : 60 + readonly property int treatmentSpacing : 80 // 60 readonly property int notificationHeight : 60 - readonly property int notificationIconSize : 36 + readonly property int notificationIconDiameter : 36 - readonly property int backIconDiameter : 17 + readonly property int checkListViewItemWidth : 350 + readonly property int checkListViewItemHeight : 60 readonly property int pauseIconDiameter : 60 readonly property int topBarMenuHeight : 100 - readonly property int sliderCircleDiameter : 25 + readonly property int sliderCircleDiameter : 30 readonly property int pressuresProgressbarWidth : 725 @@ -101,7 +120,7 @@ readonly property int createTreatmentSubTableHeight : 50 readonly property int createTreatmentSubTableWidth : 500 readonly property int createTreatmentSliderMargin : 40 - readonly property int createTreatmentSliderHeight : 50 + readonly property int createTreatmentSliderHeight : 65 readonly property int createTreatmentSliderWidth : 750 readonly property int ultrafiltrationProgressbarWidth : 880 @@ -113,74 +132,128 @@ readonly property int notificationBarIconHeight : 30 readonly property int notificationBarIconWidth : 30 + readonly property int rinsebackIconDiameterDefault : 85 + readonly property int rinsebackIconDiameterResumePause : 110 + + readonly property int settingsArrowHeight : 30 + readonly property int settingsArrowWidth : 24 + readonly property int settingsButtonWidth : 300 + readonly property int settingsButtonHeight : 85 + readonly property int settingsMargin : 75 + readonly property int settingsSpacing : 20 + readonly property int settingsInputWidth : 225 + + readonly property int settingsNotificationMargin : 10 + readonly property int settingsContentSidesMargin : headerButtonsMargin + readonly property int settingsContentBottomMargin : mainMenuHeight + // Alarm Bar height + notificationHeight + // notification Bar height + minVGap // Min Gap to give content the min border + readonly property int settingsOptionWidth : 550 readonly property int settingsOptionHeight : 50 + readonly property int screenGridAreaWidth : 400 + readonly property int screenGridAreaHeightRow1 : 170 + readonly property int screenGridAreaHeightRow2 : 225 + readonly property int screenGridAreaHeightRow3 : 200 + + readonly property int screenGridLeftColumnX : 40 + readonly property int screenGridRightColumnX : applicationWidth - screenGridLeftColumnX - screenGridAreaWidth + + readonly property int screenGridRow1Y : 100 + readonly property int screenGridRow2Y : 290 // 320 + readonly property int screenGridRow3Y : 540 // 570 + + readonly property int screenGridLineLength : 450 + readonly property int screenGridLeftLinesX : 0 + readonly property int screenGridRightLinesX : applicationWidth - screenGridLineLength + readonly property int screenGridRow1LineY : 275 + readonly property int screenGridRow2LineY : 525 + + readonly property int sliderAdjustButtonBorderWidth : 2 + readonly property int sliderAdjustButtonSpacing : 20 + readonly property int sliderAdjustButtonDiameter : 50 + readonly property int sliderAdjustButtonLeftMargin : 30 + + readonly property int circleButtonDefaultDiameter : 45 + + // ---------- < PRS > Related Section ---------- - // Min/Max - readonly property int bloodFlowMin : 100 - readonly property int bloodFlowMax : 500 - // Resolutions - readonly property int bloodFlowResolution : 25 - readonly property int dialysateFlowResolution : 50 - readonly property int durationResolution : 15 // PRS346 - // Precision - readonly property int ultrafiltrationPrecision : 3 + // blood flow rate + readonly property int bloodFlowMin : 100 // PRS 30 + readonly property int bloodFlowMax : 500 // PRS 30 + readonly property int bloodFlowResolution : 25 // PRS 30 - // Inline Blood Pressures - // - Artrial - // - Artrial - Entire pressure value range - readonly property int arterialValueMin : -400; ///< PRS362 const - readonly property int arterialValueMax : +600; ///< PRS362 const - // - Artrial - Adjust pressure limit range and manufacturing default - Low - readonly property int arterialLimitLowMin : -300; ///< PRS354 const - // ref to Model // arterialLimitLowMin : -300; ///< PRS354 default \ref MAdjustPressuresLimitsReq - readonly property int arterialLimitLowMax : +200; ///< PRS354 const - // - Artrial - Adjust pressure limit range and manufacturing default - High - readonly property int arterialLimitHighMin : -300; ///< PRS355 const - // ref to Model // arterialLimitHighMin : +100; ///< PRS355 default \ref MAdjustPressuresLimitsReq - readonly property int arterialLimitHighMax : +200; ///< PRS355 const - // - Artrial - Adjust pressure limit resolution - readonly property int arterialLimitStep : +10; ///< PRS354,PRS355 // has to be the same since it's on the same line scale - readonly property int arterialLimitGap : +30; + // Dialysate flow rate + readonly property int dialysateFlowResolution : 50 // PRS 345 - // - Venous - // - Venous - Entire pressure value range - readonly property int venousValueMin : -100; ///< PRS361 const - readonly property int venousValueMax : +700; ///< PRS361 const - // - Venous - Adjust pressure limit range and manufacturing default - Low - readonly property int venousLimitLowMin : -100; ///< PRS356 const - // ref to Model // venousLimitLowDef : -100; ///< PRS356 default \ref MAdjustPressuresLimitsReq - readonly property int venousLimitLowMax : +600; ///< PRS356 const - // - Venous - Adjust pressure limit range and manufacturing default - High - readonly property int venousLimitHighMin : +100; ///< PRS357 const - // ref to Model // venousLimitHighDef : +400; ///< PRS357 default \ref MAdjustPressuresLimitsReq - readonly property int venousLimitHighMax : +600; ///< PRS357 const - // - Venous - Adjust pressure limit resolution - readonly property int venousLimitStep : +10; ///< PRS356,PRS357 // has to be the same since it's on the same line scale - readonly property int venousLimitGap : +30; + // duration + readonly property int durationResolution : 15 // PRS346 - readonly property string notSetVariableText : "__" + // Ultrafiltration + readonly property real ultrafiltrationMinDef : 0.000 + readonly property real ultrafiltrationMaxDef : 8.000 + readonly property int ultrafiltrationPrecision : 3 + // Heparin + readonly property int heparinPrecision : 1 + + // Saline + readonly property int salinePrecision : 1 + + // Dialysate Temperature + readonly property int dialysateTempPrecision : 1 + + function sizeConverted(vSize, vSizePowers, vRound = 2) { + return ( vSize + / vSizePowers // convert from byte to Giga byte + / 1000) // round to 1000 + .toFixed(vRound) // round to 1 floating point + } + + function notSetVariable(vVariable, vLength, vChar) { + let notSetVariableText = "_" //"‑" //"-" + if (vLength === 0 ) notSetVariableText = "" + if (vVariable) + return vVariable + else + if (vLength) + return notSetVariableText.repeat(vLength) + else + return notSetVariableText + } + + // it is prefered to use the regExp instead of the RegExpValidator + // otherwise an extra RegExpValidator object will always created here. + readonly property var regExp_PatientID: /[A-Za-z0-9]{1,20}/ + + readonly property string preTreatmentStepLabelCreate : qsTr("CREATE" ) readonly property string preTreatmentStepLabelConfirm : qsTr("CONFIRM" ) readonly property string preTreatmentStepLabelPriming : qsTr("PRIME" ) readonly property string preTreatmentStepLabelUltrafiltration : qsTr("BEGIN" ) // Units // - Ultrafiltration - readonly property string unitTextUltrafiltrationRate : qsTr("mL/min") - readonly property string unitTextUltrafiltrationVolume : qsTr("(L)") - readonly property string unitTextTreatmentDuration : qsTr("min") + readonly property string unitTextUltrafiltrationRate : unitTextFlowRate + readonly property string unitTextUltrafiltrationVolume : unitTextVolume + // - Duration/Interval + readonly property string unitTextDuration : qsTr("min") // - Flows readonly property string unitTextFlowRate : qsTr("mL/min") + readonly property string unitTextDispensingRate : qsTr("mL/hr") // - Vitals readonly property string unitTextBloodPressure : qsTr("mmHg") readonly property string unitTextHeartBeat : qsTr("BPM" ) // - Fluid - readonly property string unitTextFluid : qsTr("mL") - readonly property string unitTextSaline : unitTextFluid - readonly property string unitTextHeparin : unitTextFluid - // - Create Treatment - readonly property string unitTextBPMeasurementInterval : qsTr("min") + readonly property string unitTextVolume : qsTr("(L)") + readonly property string unitTextFluid : qsTr("mL") + readonly property string unitTextSaline : unitTextFluid + readonly property string unitTextHeparin : unitTextFluid + // - Temperature + readonly property string unitTextTemperature : qsTr("°C") + // Concentration + readonly property string unitTextConcentration : qsTr("mEg/L") + readonly property string unitTextHeparinConcentration : qsTr("IU/mL") + }