Index: denali.qrc =================================================================== diff -u -r45617764a63d5573bfb942b039f2854ed25ba15d -r34471900489397f483e052870ddc46059cef49fb --- denali.qrc (.../denali.qrc) (revision 45617764a63d5573bfb942b039f2854ed25ba15d) +++ denali.qrc (.../denali.qrc) (revision 34471900489397f483e052870ddc46059cef49fb) @@ -78,5 +78,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 Index: sources/gui/qml/components/ProgressCircle.qml =================================================================== diff -u -rcd7de5f6d239a11615ba8c6c03339a10996486ca -r34471900489397f483e052870ddc46059cef49fb --- sources/gui/qml/components/ProgressCircle.qml (.../ProgressCircle.qml) (revision cd7de5f6d239a11615ba8c6c03339a10996486ca) +++ sources/gui/qml/components/ProgressCircle.qml (.../ProgressCircle.qml) (revision 34471900489397f483e052870ddc46059cef49fb) @@ -27,8 +27,8 @@ property int maximum : 0 property int value : minimum - width : parent.width - height : parent.height + width : _circle.width + height : _circle.height QtObject { id: _private property int value: ((360 * (_root.value - _root.minimum)) / (_root.maximum - _root.minimum)) Index: sources/gui/qml/components/Slider.qml =================================================================== diff -u -rf148379112a69d1c52027f2667e95f3f96d948ad -r34471900489397f483e052870ddc46059cef49fb --- sources/gui/qml/components/Slider.qml (.../Slider.qml) (revision f148379112a69d1c52027f2667e95f3f96d948ad) +++ sources/gui/qml/components/Slider.qml (.../Slider.qml) (revision 34471900489397f483e052870ddc46059cef49fb) @@ -30,8 +30,9 @@ property alias color : _progressRect.color property alias bgColor : _root.color - property real handlerWidth: 35 + property alias handler : _handler + height : Variables.progressbarHeight touchMargin : 25 @@ -105,7 +106,7 @@ } Rectangle { id: _handler - property real diameter : parent.handlerWidth + property real diameter : Variables.progressbarHandler anchors.verticalCenter : parent.verticalCenter anchors.horizontalCenter: _progressRect.right Index: sources/gui/qml/components/TimeText.qml =================================================================== diff -u -rcd7de5f6d239a11615ba8c6c03339a10996486ca -r34471900489397f483e052870ddc46059cef49fb --- sources/gui/qml/components/TimeText.qml (.../TimeText.qml) (revision cd7de5f6d239a11615ba8c6c03339a10996486ca) +++ sources/gui/qml/components/TimeText.qml (.../TimeText.qml) (revision 34471900489397f483e052870ddc46059cef49fb) @@ -25,8 +25,10 @@ */ Item { id: _root property int seconds : 0 + property bool secondsVisible : true property color color : "white" property int textPixelSize : 90 + property int textWeight : Font.ExtraLight property int secsPixelSize : 16 width : _timeHour.contentWidth + _timeSeparator.contentWidth + _timeMinute.contentWidth @@ -42,15 +44,15 @@ text: ":" font.pixelSize: _root.textPixelSize - font.weight: Font.ExtraLight + font.weight: _root.textWeight color: _root.color anchors.centerIn: _root } Text { id: _timeHour property alias hour: _private.hour font.pixelSize: _root.textPixelSize - font.weight: Font.ExtraLight + font.weight: _root.textWeight color: _root.color horizontalAlignment: Text.AlignRight @@ -63,14 +65,15 @@ property alias minute: _private.minute text: (minute < 10 ? "0" + minute : minute) font.pixelSize: _root.textPixelSize - font.weight: Font.ExtraLight + font.weight: _root.textWeight color: _root.color horizontalAlignment: Text.AlignLeft anchors.left: _timeSeparator.right anchors.baseline: _timeSeparator.baseline } Text { id: _timeSecond property alias second: _private.second + visible: _root.secondsVisible text: (second < 10 ? "0" + second : second) font.pixelSize: _root.secsPixelSize color: _root.color Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r45617764a63d5573bfb942b039f2854ed25ba15d -r34471900489397f483e052870ddc46059cef49fb --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 45617764a63d5573bfb942b039f2854ed25ba15d) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 34471900489397f483e052870ddc46059cef49fb) @@ -59,6 +59,7 @@ readonly property int rangeMarkerWidth : 2 readonly property int progressbarHeight : 30 + readonly property int progressbarHandler : 35 readonly property int progressbarFluidHeight: 5 @@ -70,4 +71,6 @@ readonly property int bloodFlowResolution : 25 readonly property int dialysateFlowResolution : 50 + readonly property int durationResolution : 1 // ? + } Index: sources/gui/qml/main.qml =================================================================== diff -u -r45617764a63d5573bfb942b039f2854ed25ba15d -r34471900489397f483e052870ddc46059cef49fb --- sources/gui/qml/main.qml (.../main.qml) (revision 45617764a63d5573bfb942b039f2854ed25ba15d) +++ sources/gui/qml/main.qml (.../main.qml) (revision 34471900489397f483e052870ddc46059cef49fb) @@ -64,6 +64,7 @@ import VTreatmentBloodFlow 0.1; import VTreatmentDialysateFlow 0.1; import VTreatmentUltrafiltration 0.1; +import VTreatmentTime 0.1; import VAlarmStatus 0.1; import VPowerOff 0.1; @@ -103,6 +104,7 @@ VTreatmentBloodFlow { id: vTreatmentBloodFlow } VTreatmentDialysateFlow { id: vTreatmentDialysateFlow } VTreatmentUltrafiltration { id: vTreatmentUltrafiltration } + VTreatmentTime { id: vTreatmentTime } VAlarmStatus { id: vAlarmStatus } VPowerOff { id: vPowerOff onPoweroff_statusChanged: { Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r8f6f7c11390e3ed6d918f1717d8e8b7ae5b7e5c6 -r34471900489397f483e052870ddc46059cef49fb --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 8f6f7c11390e3ed6d918f1717d8e8b7ae5b7e5c6) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 34471900489397f483e052870ddc46059cef49fb) @@ -45,27 +45,37 @@ hasLogo : true } - TreatmentHome { id: _treatmentHome + TreatmentHome { id: _treatmentHome onTreatmentStarted : push( _treatmentStart ) onTreatmentCreated : push( _treatmentCreate) } - TreatmentStart { id: _treatmentStart + TreatmentStart { id: _treatmentStart onBackPressed : pop () onSectionFlowClicked : { _treatmentAdjustmentFlow.open() } + onSectionTimeClicked : { + _treatmentAdjustmentDuration.open() + } } - TreatmentAdjustmentFlow { id: _treatmentAdjustmentFlow + TreatmentAdjustmentFlow { id: _treatmentAdjustmentFlow dialysateFlowRateMinimum: vTreatmentRanges.treatmentRanges_Dialysate_Flow_Min dialysateFlowRateMaximum: vTreatmentRanges.treatmentRanges_Dialysate_Flow_Max onCloseClicked : close() onConfirmClicked : _GuiView.doAdjustBloodDialysateFlows(bloodFlowRateValue, dialysateFlowRateValue) } - TreatmentCreate { id: _treatmentCreate + TreatmentAdjustmentDuration { id: _treatmentAdjustmentDuration + // durationMinimum: vTreatmentRanges.treatmentRanges_Duration_Min + // durationMaximum: vTreatmentRanges.treatmentRanges_Duration_Max + onCloseClicked : close() + onConfirmClicked : _GuiView.doAdjustDuration(durationValue) + } + + TreatmentCreate { id: _treatmentCreate onBackPressed : pop() } Index: sources/gui/qml/pages/treatment/TreatmentStart.qml =================================================================== diff -u -r45617764a63d5573bfb942b039f2854ed25ba15d -r34471900489397f483e052870ddc46059cef49fb --- sources/gui/qml/pages/treatment/TreatmentStart.qml (.../TreatmentStart.qml) (revision 45617764a63d5573bfb942b039f2854ed25ba15d) +++ sources/gui/qml/pages/treatment/TreatmentStart.qml (.../TreatmentStart.qml) (revision 34471900489397f483e052870ddc46059cef49fb) @@ -46,6 +46,7 @@ signal backPressed() signal sectionFlowClicked() + signal sectionTimeClicked() // ---------- COLUMN LEFT TreatmentFlows { id: _flowsTouchArea @@ -109,7 +110,11 @@ } // ---------- Center - TreatmentTime { id: _treatmentTime } + TreatmentTime { id: _treatmentTime + onClicked: { + sectionTimeClicked() + } + } onVisibleChanged: { if (visible) { Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml =================================================================== diff -u -rcd7de5f6d239a11615ba8c6c03339a10996486ca -r34471900489397f483e052870ddc46059cef49fb --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml (.../TreatmentAdjustmentBase.qml) (revision cd7de5f6d239a11615ba8c6c03339a10996486ca) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml (.../TreatmentAdjustmentBase.qml) (revision 34471900489397f483e052870ddc46059cef49fb) @@ -32,6 +32,10 @@ signal closeClicked() signal confirmClicked() + onVisibleChanged: { + notificationText = ""; + } + header: Rectangle { id : _headerRect ConfirmButton { @@ -40,7 +44,7 @@ } TitleText { - text: qsTr("FLOWS") + text: titleText font.pixelSize: Fonts.fontPixelButton color: Colors.textMain height: Variables.mainMenuHeight Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentDuration.qml =================================================================== diff -u --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentDuration.qml (revision 0) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentDuration.qml (revision 34471900489397f483e052870ddc46059cef49fb) @@ -0,0 +1,87 @@ +/*! + * + * 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 TreatmentAdjustmentDuration.qml + * \date 2020/04/26 + * \author Behrouz NematiPour + * + */ + +// Qt +import QtQuick 2.12 + +// Project + +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +// import VTreatmentAdjustmentsResponse 0.1; + +/*! + * \brief TreatmentAdjustmentDuration.qml is the screen + * To adjust the treatment duration + */ +TreatmentAdjustmentBase { id: _root + + property int durationValue : 0 + property alias durationMinimum : _durationSlider.minimum + property alias durationMaximum : _durationSlider.maximum + property alias durationStep : _durationSlider.step + + property alias currentTime : _currentTimeText.seconds + property alias durationTime : _durationText.seconds + + property int textWidth : 200 + + + titleText: qsTr("TREATMENT DURATION") + // VTreatmentAdjustmentsResponse { id: vTreatmentAdjustmentsResponse + // onAdjustment_TriggeredChanged: { + // if ( adjustment_Accepted ) { + // accept() + // } else { + // _bloodFlowSlider .value = vTreatmentAdjustmentsResponse. bloodFlow_FlowSetPoint; + // _dialysateFlowSlider.value = vTreatmentAdjustmentsResponse.dialysateFlow_FlowSetPoint; + // notificationText = vTreatmentAdjustmentsResponse.text(); + // } + // } + // } + + Column { id : _column + spacing: 65 + anchors.centerIn: parent + TimeText { id: _currentTimeText + seconds: vTreatmentTime.time_Elapsed + secondsVisible: false + textPixelSize: 89 // TODO : Variables + anchors.horizontalCenter: parent.horizontalCenter + } + Slider { id : _durationSlider + anchors.horizontalCenter: parent.horizontalCenter + width : 880 + height : 5 + minimum : 0 // TODO : From ranges model + maximum : 8 * 60 // TODO : From ranges model + step : Variables.durationResolution + minText.visible: false + maxText.visible: false + TimeText { id: _durationText + seconds: _durationSlider.value * 60 + secondsVisible: false + textPixelSize: 28 // TODO : Variables + textWeight: Font.Medium + anchors { + top : _durationSlider.handler.bottom + topMargin : 10 + horizontalCenter: _durationSlider.handler.horizontalCenter + } + } + } + } +} Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentFlow.qml =================================================================== diff -u -r31b9ae63410e7ca23f0f849e38368880e4c402b4 -r34471900489397f483e052870ddc46059cef49fb --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentFlow.qml (.../TreatmentAdjustmentFlow.qml) (revision 31b9ae63410e7ca23f0f849e38368880e4c402b4) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentFlow.qml (.../TreatmentAdjustmentFlow.qml) (revision 34471900489397f483e052870ddc46059cef49fb) @@ -42,6 +42,8 @@ property string unit : qsTr("mL/min") property int textWidth : 200 + titleText: qsTr("FLOWS") + onAboutToShow: { // TODO : When Testing data on Setting screen is removed // This needs to be moved into the Treatment______.qml @@ -60,9 +62,6 @@ } } } - onVisibleChanged: { - notificationText = ""; - } Column { id : _flowsColumn spacing: 100 Index: sources/gui/qml/pages/treatment/sections/TreatmentTime.qml =================================================================== diff -u -r3afad151e41be500dd32045b7ddce9e10c19dc96 -r34471900489397f483e052870ddc46059cef49fb --- sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision 3afad151e41be500dd32045b7ddce9e10c19dc96) +++ sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision 34471900489397f483e052870ddc46059cef49fb) @@ -16,7 +16,6 @@ import QtQuick 2.12 // Project -import VTreatmentTime 0.1; // Qml imports import "qrc:/globals" @@ -39,8 +38,6 @@ height: _circle.height color: "transparent" - VTreatmentTime { id: vTreatmentTime } - ProgressCircle { id: _circle minimum: _root.minimum maximum: _root.maximum @@ -80,6 +77,7 @@ } } } + MouseArea { id: _mouseArea anchors.fill: parent onClicked: {