Index: denali.pro =================================================================== diff -u -rb798668f16ad0967ab97e96f5f9a2cdd821e899f -r7045fd6002bdeb28e23a7af6a708a852d522ad12 --- denali.pro (.../denali.pro) (revision b798668f16ad0967ab97e96f5f9a2cdd821e899f) +++ denali.pro (.../denali.pro) (revision 7045fd6002bdeb28e23a7af6a708a852d522ad12) @@ -135,9 +135,11 @@ DEFINES += \ VER_MAJOR="\\\"${majorVersion}\\\"" \ VER_MINOR="\\\"${minorVersion}\\\"" \ + VER_MICRO="\\\"${microVersion}\\\"" \ VER_REVIS="\\\"${buildNumber}\\\"" \ VER_MAJOR_DEV=\\\"0\\\" \ VER_MINOR_DEV=\\\"0\\\" \ + VER_MICRO_DEV=\\\"0\\\" \ VER_REVIS_DEV=\\\"$$system( date "+%m%d%H%M" )\\\" \ VER_APPLY=\\\"$$system( touch -m main.cpp)\\\" Index: denali.qrc =================================================================== diff -u -r34471900489397f483e052870ddc46059cef49fb -r7045fd6002bdeb28e23a7af6a708a852d522ad12 --- denali.qrc (.../denali.qrc) (revision 34471900489397f483e052870ddc46059cef49fb) +++ denali.qrc (.../denali.qrc) (revision 7045fd6002bdeb28e23a7af6a708a852d522ad12) @@ -18,6 +18,8 @@ resources/images/ArrowRight.png resources/images/logo d Dark Transparent.png resources/images/Close.png + resources/images/Back.png + resources/images/Pause.png sources/gui/qml/components/MainMenu.qml @@ -79,5 +81,6 @@ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentFlow.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentDuration.qml + sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml Index: main.cpp =================================================================== diff -u -r95c671ab7037af055db551456a719ff67bf10262 -r7045fd6002bdeb28e23a7af6a708a852d522ad12 --- main.cpp (.../main.cpp) (revision 95c671ab7037af055db551456a719ff67bf10262) +++ main.cpp (.../main.cpp) (revision 7045fd6002bdeb28e23a7af6a708a852d522ad12) @@ -171,6 +171,35 @@ } } } +/*! + * \brief setApplicationVersion + * \details sets up the application version regarding the environment valiables + * which are set by bamboo and if those are not set value of 0 will be used + * and revision(build) version will be set to current date/time. + */ +void setApplicationVersion() { + QString ver_major = QString("%1").arg(VER_MAJOR); + if (ver_major.isEmpty()) { + ver_major = VER_MAJOR_DEV; + } + QString ver_minor = QString("%1").arg(VER_MINOR); + if (ver_minor.isEmpty()) { + ver_minor = VER_MINOR_DEV; + } + QString ver_micro = QString("%1").arg(VER_MICRO); + if (ver_micro.isEmpty()) { + ver_micro = VER_MICRO_DEV; + } + QString ver_revis = QString("%1").arg(VER_REVIS); + if (ver_revis.isEmpty()) { + ver_revis = VER_REVIS_DEV; + } + QCoreApplication::setApplicationVersion(QString("%1.%2.%3.%4") + .arg(ver_major) + .arg(ver_minor) + .arg(ver_micro) + .arg(ver_revis)); +} #ifdef UNIT_TEST #include TEST_CLASS_INCLUDE @@ -202,22 +231,7 @@ app.thread()->setObjectName("Main Thread"); //! - Setting the application version regarding the Bamboo build number. - QString ver_major = QString("%1").arg(VER_MAJOR); - if (ver_major.isEmpty()) { - ver_major = VER_MAJOR_DEV; - } - QString ver_minor = QString("%1").arg(VER_MINOR); - if (ver_minor.isEmpty()) { - ver_minor = VER_MINOR_DEV; - } - QString ver_revis = QString("%1").arg(VER_REVIS); - if (ver_revis.isEmpty()) { - ver_revis = VER_REVIS_DEV; - } - QCoreApplication::setApplicationVersion(QString("%1.%2.%3") - .arg(ver_major) - .arg(ver_minor) - .arg(ver_revis)); + setApplicationVersion(); //! - Parse the command line arguments commandlineParse(); Index: resources/images/Back.png =================================================================== diff -u Binary files differ Index: resources/images/Pause.png =================================================================== diff -u Binary files differ Index: sources/gui/qml/components/BackButton.qml =================================================================== diff -u -rcd7de5f6d239a11615ba8c6c03339a10996486ca -r7045fd6002bdeb28e23a7af6a708a852d522ad12 --- sources/gui/qml/components/BackButton.qml (.../BackButton.qml) (revision cd7de5f6d239a11615ba8c6c03339a10996486ca) +++ sources/gui/qml/components/BackButton.qml (.../BackButton.qml) (revision 7045fd6002bdeb28e23a7af6a708a852d522ad12) @@ -22,15 +22,39 @@ /*! * \brief Denali project Back Button */ -TouchRect { id : backRect - signal pressed() +TouchRect { id : _root + readonly property int margin: (_root.height - Variables.backIconDiameter) / 2 + backgroundColor: "Transparent" + animated : true + width : 115 + height : 45 + anchors { + top : parent.top + left : parent.left + margins : 35 + } - width : 115 - height: 45 - x : 25 - y : 25 - text.text: qsTr("Back") - button.onClicked: { - pressed() + Image { id: _image + anchors { + left : _root.left + leftMargin : _root.margin + verticalCenter: parent.verticalCenter + } + + width : Variables.backIconDiameter + height: Variables.backIconDiameter + source: "qrc:/images/iBack" } + + text { + text: qsTr("BACK") + font.bold : true + font.pixelSize: Fonts.fontPixelBack + anchors { + centerIn: null // disable the parent anchor + verticalCenter: _root.verticalCenter + left: _image.right + leftMargin: _root.margin + } + } } Index: sources/gui/qml/globals/Fonts.qml =================================================================== diff -u -r5c5fa01738826261e0b3647db6b7b3fc26b04251 -r7045fd6002bdeb28e23a7af6a708a852d522ad12 --- sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 5c5fa01738826261e0b3647db6b7b3fc26b04251) +++ sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 7045fd6002bdeb28e23a7af6a708a852d522ad12) @@ -44,6 +44,7 @@ readonly property int fontPixelFluidVolume : 16 readonly property int fontPixelConfirm : 19 + readonly property int fontPixelBack : 17 readonly property int fontPixelSliderMarker : 17 Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r9ec7a27375189ad75f0bef142cd6beb386db0955 -r7045fd6002bdeb28e23a7af6a708a852d522ad12 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 9ec7a27375189ad75f0bef142cd6beb386db0955) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 7045fd6002bdeb28e23a7af6a708a852d522ad12) @@ -67,6 +67,10 @@ readonly property int notificationHeight : 60 + readonly property int backIconDiameter : 17 + + readonly property int pauseIconDiameter : 60 + // --- PRS --- readonly property int bloodFlowResolution : 25 readonly property int dialysateFlowResolution : 50 Index: sources/gui/qml/pages/treatment/TreatmentCreate.qml =================================================================== diff -u -rcd7de5f6d239a11615ba8c6c03339a10996486ca -r7045fd6002bdeb28e23a7af6a708a852d522ad12 --- sources/gui/qml/pages/treatment/TreatmentCreate.qml (.../TreatmentCreate.qml) (revision cd7de5f6d239a11615ba8c6c03339a10996486ca) +++ sources/gui/qml/pages/treatment/TreatmentCreate.qml (.../TreatmentCreate.qml) (revision 7045fd6002bdeb28e23a7af6a708a852d522ad12) @@ -25,9 +25,9 @@ * which is the default screen in the "Manager" stack */ ScreenItem { id: _root - signal backPressed() + signal backClicked() BackButton { id : _backButton - onPressed: backPressed() + onClicked: backClicked() } Column { Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r34471900489397f483e052870ddc46059cef49fb -r7045fd6002bdeb28e23a7af6a708a852d522ad12 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 34471900489397f483e052870ddc46059cef49fb) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 7045fd6002bdeb28e23a7af6a708a852d522ad12) @@ -51,15 +51,23 @@ } TreatmentStart { id: _treatmentStart - onBackPressed : pop () + onBackClicked : pop () onSectionFlowClicked : { _treatmentAdjustmentFlow.open() } onSectionTimeClicked : { _treatmentAdjustmentDuration.open() } + onSectionUltrafiltrationClicked: { + _treatmentAdjustmentUltrafiltrationStart.open() + } } + TreatmentCreate { id: _treatmentCreate + onBackClicked : pop() + } + + //// Treatment Adjustment Dialogs TreatmentAdjustmentFlow { id: _treatmentAdjustmentFlow dialysateFlowRateMinimum: vTreatmentRanges.treatmentRanges_Dialysate_Flow_Min dialysateFlowRateMaximum: vTreatmentRanges.treatmentRanges_Dialysate_Flow_Max @@ -75,8 +83,7 @@ onConfirmClicked : _GuiView.doAdjustDuration(durationValue) } - TreatmentCreate { id: _treatmentCreate - onBackPressed : pop() + TreatmentAdjustmentUltrafiltrationStart { id: _treatmentAdjustmentUltrafiltrationStart + onCloseClicked : close() } - } Index: sources/gui/qml/pages/treatment/TreatmentStart.qml =================================================================== diff -u -r95c671ab7037af055db551456a719ff67bf10262 -r7045fd6002bdeb28e23a7af6a708a852d522ad12 --- sources/gui/qml/pages/treatment/TreatmentStart.qml (.../TreatmentStart.qml) (revision 95c671ab7037af055db551456a719ff67bf10262) +++ sources/gui/qml/pages/treatment/TreatmentStart.qml (.../TreatmentStart.qml) (revision 7045fd6002bdeb28e23a7af6a708a852d522ad12) @@ -43,10 +43,11 @@ property int row1LineY : 275 property int row2LineY : 525 - signal backPressed() + signal backClicked() signal sectionFlowClicked() signal sectionTimeClicked() + signal sectionUltrafiltrationClicked() // ---------- COLUMN LEFT TreatmentFlows { id: _flowsTouchArea @@ -80,13 +81,12 @@ // ---------- COLUMN RIGHT TreatmentUltrafiltration { id: _ultrafiltrationTouchArea; - x : rightColumnX - y : row1Y - width : _flowsTouchArea.width - minimum : vTreatmentRanges.treatmentRanges_Ultrafiltration_Volume_Min.toFixed(2) - maximum : vTreatmentRanges.treatmentRanges_Ultrafiltration_Volume_Max.toFixed(2) - value : vTreatmentUltrafiltration.ultrafiltration_MeasUFVol.toFixed(2); - valueEx : 0 + x : rightColumnX + y : row1Y + width : _flowsTouchArea.width + onClicked : { + sectionUltrafiltrationClicked() + } } Line { x: rightLinesX; y: row1LineY; length: lineLength } TreatmentFluid { id: _SalineTouchArea @@ -130,7 +130,7 @@ // and also we don't have Treatment complete yet. if (vIndex == 0) { _treatmentMenu.hidden = true - backPressed() + backClicked() } } } Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml =================================================================== diff -u -r34471900489397f483e052870ddc46059cef49fb -r7045fd6002bdeb28e23a7af6a708a852d522ad12 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml (.../TreatmentAdjustmentBase.qml) (revision 34471900489397f483e052870ddc46059cef49fb) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml (.../TreatmentAdjustmentBase.qml) (revision 7045fd6002bdeb28e23a7af6a708a852d522ad12) @@ -29,21 +29,32 @@ property string titleText: "" + property bool closeVisible: true + property bool confirmVisible: true + property bool backVisible: false + signal closeClicked() signal confirmClicked() + signal backClicked() onVisibleChanged: { notificationText = ""; } header: Rectangle { id : _headerRect - ConfirmButton { + ConfirmButton { id : _confirmButton + visible: _root.confirmVisible anchors.left: parent.left onClicked : confirmClicked() } + BackButton { id : _backButton + visible: _root.backVisible + anchors.left: parent.left + onClicked : backClicked() + } - TitleText { + TitleText { id : _titleText text: titleText font.pixelSize: Fonts.fontPixelButton color: Colors.textMain @@ -55,7 +66,8 @@ } } - CloseButton { + CloseButton { id : _closeButton + visible: _root.closeVisible anchors.right: parent.right onClicked : closeClicked() } Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml =================================================================== diff -u --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml (revision 0) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml (revision 7045fd6002bdeb28e23a7af6a708a852d522ad12) @@ -0,0 +1,98 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright \n + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, \n + * IN PART OR IN WHOLE, \n + * WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. \n + * + * \file TreatmentAdjustmentUltrafiltrationStart.qml + * \date 2020/05/11 + * \author Behrouz NematiPour + * + */ + +// Qt +import QtQuick 2.12 + +// Project + +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief TreatmentAdjustmentUltrafiltrationStart.qml is the screen + * To adjust the treatment duration + */ +TreatmentAdjustmentBase { id: _root + confirmVisible: false + titleText : qsTr("ULTRAFILTRATION VOLUME") + " " + qsTr("(mL)") + + ProgressBarEx { id: _progressbarex + width : 880 + height : Variables.progressbarHeight + anchors { + top: parent.top + topMargin: 250 + horizontalCenter: parent.horizontalCenter + } + minimum : vTreatmentRanges.treatmentRanges_Ultrafiltration_Volume_Min.toFixed(2) + maximum : vTreatmentRanges.treatmentRanges_Ultrafiltration_Volume_Max.toFixed(2) + // TEST : it has to be bound to MeasUFVol to get the actual values from pumps + // but since we have none in testing code bound to the refUFVal which + // is the calculated/expected volume. + //// value : vTreatmentUltrafiltration.ultrafiltration_MeasUFVol.toFixed(2); + value : vTreatmentUltrafiltration.ultrafiltration_RefUFVol.toFixed(2); + valueEx : 0 + } + + TouchRect { id: _pauseButton + width: 530 + height: 95 + anchors { + top: parent.top + topMargin: 400 + horizontalCenter: parent.horizontalCenter + } + + backgroundColor: Colors.backgroundButtonSelect + + Image { id: _image + anchors { + left : _pauseButton.left + leftMargin : 65 + verticalCenter: _pauseButton.verticalCenter + } + + width : Variables.pauseIconDiameter + height: Variables.pauseIconDiameter + source: "qrc:/images/iPause" + } + + text { + text: qsTr("PAUSE ULTRAFILTRATION") + font.weight: Font.DemiBold + font.pixelSize: 26 //Fonts.fontPixelBack + anchors { + centerIn: null // disable the parent anchor + verticalCenter: _pauseButton.verticalCenter + left: _image.right + leftMargin: 15 + } + } + } + Text { id: _informationText + text: qsTr("Note: Ultrafiltration needs to be paused to edit the volume.") + color: "#a3b7c9" + font { + pixelSize: 25 + } + + anchors { + top: _pauseButton.bottom + topMargin: 35 + horizontalCenter: parent.horizontalCenter + } + } +} Index: sources/gui/qml/pages/treatment/sections/TreatmentFluid.qml =================================================================== diff -u -r95c671ab7037af055db551456a719ff67bf10262 -r7045fd6002bdeb28e23a7af6a708a852d522ad12 --- sources/gui/qml/pages/treatment/sections/TreatmentFluid.qml (.../TreatmentFluid.qml) (revision 95c671ab7037af055db551456a719ff67bf10262) +++ sources/gui/qml/pages/treatment/sections/TreatmentFluid.qml (.../TreatmentFluid.qml) (revision 7045fd6002bdeb28e23a7af6a708a852d522ad12) @@ -69,21 +69,21 @@ value : 0 // TEST begin : simulation code - minimum : 0 // TEST : only test values - maximum : 100 // TEST : only test values - NumberAnimation on value { - duration: 10000 - from : _fluidProgressBar.minimum - to : _fluidProgressBar.maximum - //loops: Animation.Infinite - onFinished: { - _cumulativeValue.valueLast += _fluidProgressBar.value - restart() - } - } - onValueChanged: { - _cumulativeValue.value = _cumulativeValue.valueLast + _fluidProgressBar.value - } + // minimum : 0 // TEST : only test values + // maximum : 100 // TEST : only test values + // NumberAnimation on value { + // duration: 10000 + // from : _fluidProgressBar.minimum + // to : _fluidProgressBar.maximum + // //loops: Animation.Infinite + // onFinished: { + // _cumulativeValue.valueLast += _fluidProgressBar.value + // restart() + // } + // } + // onValueChanged: { + // _cumulativeValue.value = _cumulativeValue.valueLast + _fluidProgressBar.value + // } // TEST end Text { id: _fluidText Index: sources/gui/qml/pages/treatment/sections/TreatmentUltrafiltration.qml =================================================================== diff -u -r634824d6fce314971aa236e508024bd154562c9d -r7045fd6002bdeb28e23a7af6a708a852d522ad12 --- sources/gui/qml/pages/treatment/sections/TreatmentUltrafiltration.qml (.../TreatmentUltrafiltration.qml) (revision 634824d6fce314971aa236e508024bd154562c9d) +++ sources/gui/qml/pages/treatment/sections/TreatmentUltrafiltration.qml (.../TreatmentUltrafiltration.qml) (revision 7045fd6002bdeb28e23a7af6a708a852d522ad12) @@ -25,11 +25,6 @@ * \brief Treatment Screen Ultrafiltration section */ TouchArea { id: _root - property alias minimum : _progressbarex.minimum - property alias maximum : _progressbarex.maximum - property alias value : _progressbarex.value - property alias valueEx : _progressbarex.valueEx - clip: false x : 0 y : 0 @@ -40,18 +35,28 @@ title : qsTr("ULTRAFILTRATION VOLUME") + " " + qsTr("(mL)") Connections { target: vTreatmentAdjustmentsResponse - onAdjustmentDurationTriggered: { } - onUltrafiltrationChanged: { - // As a reminder for later use - console.debug("@",vTreatmentAdjustmentsResponse.ultrafiltration) + onAdjustmentDurationTriggered: { + // FIXME : HD units should be consistent(mL or L) but here is Litre + _progressbarex.maximum = vTreatmentAdjustmentsResponse.ultrafiltration * 1000 } } ProgressBarEx { id: _progressbarex y : 75 width : parent.width height : Variables.progressbarHeight - value : 0 + minimum : 0 // seems should always be 0 valueEx : 0 + onClicked: { + _root.clicked() + } + + // TEST : it has to be bound to MeasUFVol to get the actual values from pumps + // but since we have none in testing code bound to the refUFVal which + // is the calculated/expected volume. + //// value : vTreatmentUltrafiltration.ultrafiltration_MeasUFVol.toFixed(2); + value : vTreatmentUltrafiltration.ultrafiltration_RefUFVol.toFixed(2); + // TEST : min/max should come from pre-treatment prescription parameters which we don't have now (2020/05/12) + maximum : 600 // a constant Volume value for 1h treatment } }