Index: denali.qrc
===================================================================
diff -u -r1b060ccba8bfccf34d6a7a5ddd6d94eb6d149829 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- denali.qrc (.../denali.qrc) (revision 1b060ccba8bfccf34d6a7a5ddd6d94eb6d149829)
+++ denali.qrc (.../denali.qrc) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -17,6 +17,7 @@
resources/images/splash.png
resources/images/ArrowRight.png
resources/images/logo d Dark Transparent.png
+ resources/images/Close.png
sources/gui/qml/components/MainMenu.qml
@@ -42,6 +43,10 @@
sources/gui/qml/components/Circle.qml
sources/gui/qml/components/TimeText.qml
sources/gui/qml/components/ProgressCircle.qml
+ sources/gui/qml/components/Slider.qml
+ sources/gui/qml/components/ProgressBarEx.qml
+ sources/gui/qml/components/CloseButton.qml
+ sources/gui/qml/components/ConfirmButton.qml
qtquickcontrols2.conf
@@ -69,4 +74,7 @@
sources/gui/qml/pages/treatment/sections/TreatmentInfusion.qml
sources/gui/qml/pages/treatment/sections/TreatmentTime.qml
+
+ sources/gui/qml/pages/treatment/adjustments/TreatmentFlowAdjustment.qml
+
Index: resources/images/Close.png
===================================================================
diff -u
Binary files differ
Index: sources/gui/qml/components/CloseButton.qml
===================================================================
diff -u
--- sources/gui/qml/components/CloseButton.qml (revision 0)
+++ sources/gui/qml/components/CloseButton.qml (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -0,0 +1,46 @@
+/*!
+ *
+ * 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 CloseButton.qml
+ * \date 2020/03/15
+ * \author Behrouz NematiPour
+ *
+ */
+
+// Qt
+import QtQuick 2.12
+
+// Project
+import "qrc:/globals"
+
+Rectangle { id : _root
+ signal clicked()
+
+ width : 50
+ height : 50
+ color: "transparent"
+ opacity : 1
+
+ anchors {
+ top : parent.top
+ right : parent.right
+ margins : 35
+ }
+ Image {
+ source: "qrc:/images/iClose"
+ width : 25
+ height : 25
+ anchors.centerIn: parent
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked : {
+ _root.clicked()
+ }
+ }
+}
Index: sources/gui/qml/components/ConfirmButton.qml
===================================================================
diff -u
--- sources/gui/qml/components/ConfirmButton.qml (revision 0)
+++ sources/gui/qml/components/ConfirmButton.qml (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -0,0 +1,38 @@
+/*!
+ *
+ * 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 ConfirmButton.qml
+ * \date 2020/03/15
+ * \author Behrouz NematiPour
+ *
+ */
+
+// Qt
+import QtQuick 2.12
+
+// Project
+import "qrc:/globals"
+
+TouchRect { id : _root
+ width : 155
+ height : 50
+ text {
+ text: qsTr("CONFIRM")
+ font.bold : true
+ font.pixelSize: Fonts.fontPixelConfirm
+ }
+
+ backgroundColor: Colors.backgroundButtonSelect
+
+ anchors {
+ top : parent.top
+ left : parent.left
+ margins : 35
+ }
+ animated : true
+}
Index: sources/gui/qml/components/Line.qml
===================================================================
diff -u -r442d1c4f53c96991d4103485ff5ff683ed00d4f7 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/components/Line.qml (.../Line.qml) (revision 442d1c4f53c96991d4103485ff5ff683ed00d4f7)
+++ sources/gui/qml/components/Line.qml (.../Line.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -13,7 +13,7 @@
*/
// Qt
-import QtQuick 2.0
+import QtQuick 2.12
// Project
import "qrc:/globals"
Index: sources/gui/qml/components/ModalDialog.qml
===================================================================
diff -u -r4a6abe765f03feae8100ec660aa04aa218d4dfa3 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision 4a6abe765f03feae8100ec660aa04aa218d4dfa3)
+++ sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -27,8 +27,9 @@
property bool autoHide : false
property int autoHideDuration : 1000
- width : Variables.poweroffWidth
- height : Variables.poweroffHeight
+ width : Variables.dialogWidth
+ height : Variables.dialogHeight
+
visible : false
anchors.centerIn: parent
Index: sources/gui/qml/components/ModelessDialog.qml.WIP
===================================================================
diff -u
--- sources/gui/qml/components/ModelessDialog.qml.WIP (revision 0)
+++ sources/gui/qml/components/ModelessDialog.qml.WIP (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -0,0 +1,74 @@
+/*!
+ *
+ * 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 ModalDialog.qml
+ * \date 2019/10/21
+ * \author Behrouz NematiPour
+ *
+ */
+
+// Qt
+import QtQuick 2.12
+import QtQuick.Controls 2.12
+
+// Project
+// Qml imports
+import "qrc:/globals"
+
+/*!
+ * \brief The parent item for modal dialogs
+ */
+Dialog { id : _root
+ property bool autoHide : false
+ property int autoHideDuration : 1000
+
+ width : Variables.dialogWidth
+ height : Variables.dialogHeight
+
+ visible : false
+ dim: true
+ anchors.centerIn: parent
+
+ enter: Transition { NumberAnimation { property: "opacity"; from: 0.0; to: 1.0 } }
+ exit : Transition { NumberAnimation { property: "opacity"; from: 1.0; to: 0.0 } }
+
+ closePolicy: Dialog.NoAutoClose
+ Overlay.modeless : Rectangle { id : _borderRect
+ anchors.fill: parent
+ color: "transparent"//"#D00F0F0F"
+ MouseArea { id : _modal
+ anchors.fill: parent
+ propagateComposedEvents: false
+ }
+ }
+
+
+ background: Rectangle { id: _backgroundRect
+ color: Colors.backgroundDialog
+ radius: Variables.dialogRadius
+ }
+
+ onVisibleChanged: {
+ if (autoHide && visible) {
+ _autoHideAnimation.start()
+ console.debug("_autoHideAnimation started")
+ }
+ }
+
+ NumberAnimation { id: _autoHideAnimation
+ running: false
+ target: _root
+ property: "opacity"
+ duration: autoHideDuration
+ //easing.type: Easing.InOutQuad
+ onFinished: {
+ console.debug("_autoHideAnimation finished")
+ _root.visible = false
+ }
+ }
+}
Index: sources/gui/qml/components/ProgressBar.qml
===================================================================
diff -u -r9391d4058233e096350d9dc3ced79aed8ed93b38 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/components/ProgressBar.qml (.../ProgressBar.qml) (revision 9391d4058233e096350d9dc3ced79aed8ed93b38)
+++ sources/gui/qml/components/ProgressBar.qml (.../ProgressBar.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -14,7 +14,6 @@
// Qt
import QtQuick 2.12
-import QtQuick.Controls 2.12
// Project
// Qml imports
@@ -25,13 +24,16 @@
*/
RangeRect { id: _root
property alias value : _progressRect.value
- property alias valueEx : _progressRectEx.value
property alias color : _progressRect.color
property alias bgColor : _root.color
property alias marker : _marker
+ property alias markerHeight: _marker.height
+ property alias minimum : _root.minimum
+ property alias maximum : _root.maximum
+
height : Variables.progressbarHeight
minimum : 0
@@ -40,35 +42,29 @@
minText.visible : true
maxText.visible : true
-
- ProgressRect { id: _progressRectEx
- visible : value
-
- minimum : _root.minimum
- maximum : _root.maximum
- value : _root.valueEx
-
- color : Colors.highlightMedProgressBar
- maxText.visible: visible
- margin : 0
- }
-
+ // Since this Component is the base Component of the ProgressBarEx
+ // we need to use the z order
+ // to order the parent object (ProgressBar) Components
+ // in the child(ProgressBarEx)
ProgressRect { id: _progressRect
+ z: 1 // Main ProgressBar Rect, z order in the gui
minimum : _root.minimum
maximum : _root.maximum
value : _root.value
color : Colors.highlightProgressBar
- RangeMarker { id: _marker
- anchors {
- left : parent.right
- }
+ }
- height : Variables.rangeMarkerHeight
- hasHandle : true
-
- value : _root.value
+ RangeMarker { id: _marker
+ z : 3 // ProgressBar marker should be on top of the all ProgressBars z order in the gui
+ anchors {
+ left : _progressRect.right
}
+
+ height : Variables.rangeMarkerHeight
+ hasHandle : true
+
+ value : _root.value
}
}
Index: sources/gui/qml/components/ProgressBarEx.qml
===================================================================
diff -u
--- sources/gui/qml/components/ProgressBarEx.qml (revision 0)
+++ sources/gui/qml/components/ProgressBarEx.qml (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -0,0 +1,48 @@
+/*!
+ *
+ * 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 ProgressBarEx.qml
+ * \date 2020/03/15
+ * \author Behrouz NematiPour
+ *
+ */
+
+// Qt
+import QtQuick 2.12
+
+// Project
+// Qml imports
+import "qrc:/globals"
+
+/*!
+ * \brief Denali project ProgressBar
+ */
+ProgressBar { id: _root
+ property alias valueEx : _progressRectEx.value
+
+ minimum : 0
+ maximum : 0
+
+ minText.visible : true
+ maxText.visible : true
+
+
+ ProgressRect { id: _progressRectEx
+ z : 2 // ProgressBarEx z order in the gui
+ // to be ordred amont the components of the parent (ProgressBar)
+ visible : value
+
+ minimum : _root.minimum
+ maximum : _root.maximum
+ value : _root.valueEx
+
+ color : Colors.highlightMedProgressBar
+ maxText.visible: visible
+ margin : 0
+ }
+}
Index: sources/gui/qml/components/ProgressRect.qml
===================================================================
diff -u -r00e025a5d672cae66e592608792c17d98be54d19 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/components/ProgressRect.qml (.../ProgressRect.qml) (revision 00e025a5d672cae66e592608792c17d98be54d19)
+++ sources/gui/qml/components/ProgressRect.qml (.../ProgressRect.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -26,11 +26,17 @@
* in regards to the min, max, width, current value of the parent
*/
RangeRect { id: _root
- property int value : 0
- property real margin : Variables.rangeRectMargin
+ property int value : 0
+ property real margin : Variables.rangeRectMargin
QtObject { id: _private
- property int length: ((parent.width * (value - minimum)) / (maximum - minimum) - (margin * 2))
+ property int length: if ( value < minimum ) {
+ 0
+ } else if ( value > maximum ) {
+ width
+ } else {
+ ((parent.width * (value - minimum)) / (maximum - minimum) - (margin * 2))
+ }
}
width : _private.length
Index: sources/gui/qml/components/RangeRect.qml
===================================================================
diff -u -r732bc047743c99a157cf147f5313194867c1f5e3 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/components/RangeRect.qml (.../RangeRect.qml) (revision 732bc047743c99a157cf147f5313194867c1f5e3)
+++ sources/gui/qml/components/RangeRect.qml (.../RangeRect.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -14,7 +14,6 @@
// Qt
import QtQuick 2.12
-import QtQuick.Controls 2.12
// Project
// Qml imports
@@ -24,14 +23,19 @@
* \brief Denali project RangeRect
*/
Rectangle { id: _root
- signal clicked()
+ signal clicked(var vMouseEvent)
+ signal dragged(var vMouseEvent)
property int minimum : 0
property int maximum : 0
property alias minText : _textMinimum
property alias maxText : _textMaximum
+ property string unit : ""
+
+ property real touchMargin: 0
+
width : parent.width
height : parent.height
@@ -45,7 +49,7 @@
font.bold : true
color : Colors.textProgressBar
- text : minimum
+ text : minimum + unit
anchors {
left : parent.left
@@ -61,7 +65,7 @@
font.bold : true
color : Colors.textProgressBar
- text : maximum
+ text : maximum + unit
anchors {
right : parent.right
@@ -71,9 +75,15 @@
}
MouseArea { id: _mouseArea
+ anchors.topMargin : -touchMargin
+ anchors.bottomMargin: -touchMargin
anchors.fill: parent
+ onPositionChanged: {
+ _root.dragged(mouse)
+ }
+
onClicked: {
- _root.clicked
+ _root.clicked(mouse)
}
}
}
Index: sources/gui/qml/components/Slider.qml
===================================================================
diff -u
--- sources/gui/qml/components/Slider.qml (revision 0)
+++ sources/gui/qml/components/Slider.qml (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -0,0 +1,114 @@
+/*!
+ *
+ * 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 Slider.qml
+ * \date 2020/03/13
+ * \author Behrouz NematiPour
+ *
+ */
+
+// Qt
+import QtQuick 2.12
+
+// Project
+// Qml imports
+import "qrc:/globals"
+
+/*!
+ * \brief Denali project ProgressBar
+ */
+RangeRect { id: _root
+ property alias value : _progressRect.value
+ property int step : 1
+
+ property alias color : _progressRect.color
+ property alias bgColor : _root.color
+
+ property real handlerWidth: 34
+
+ height : Variables.progressbarHeight
+ touchMargin : 25
+
+ minimum : 0
+ maximum : 0
+
+ minText {
+ visible : true
+ anchors.topMargin: Variables.sliderTextMargin
+ font.pixelSize : Fonts.fontPixelSliderMarker
+ font.bold : false
+ }
+ maxText {
+ visible : true
+ anchors.topMargin: Variables.sliderTextMargin
+ font.pixelSize : Fonts.fontPixelSliderMarker
+ font.bold : false
+ }
+
+ function getPosition(x) {
+ return ( x * ( maximum - minimum ) ) / width + minimum
+ }
+
+ function setValue(x) {
+ if ( x < 0 ) {
+ value = minimum
+ } else
+ if ( x > width ) {
+ value = maximum
+ } else
+ if (step === 1) { // only for performance othewise formula works perfectly fine.
+ value = getPosition(x)
+ } else {
+ value = Math.floor((getPosition(x) - minimum) / step) * step + minimum
+ }
+ }
+
+ ProgressRect { id: _progressRect
+ color : Colors.highlightProgressBar
+ touchMargin : parent.touchMargin
+
+ minimum : parent.minimum
+ maximum : parent.maximum
+ value : parent.value
+
+ // propagation is not working on drag
+ onDragged: {
+ setValue(vMouseEvent.x)
+ }
+ onClicked: {
+ setValue(vMouseEvent.x)
+ }
+ }
+
+ onDragged: {
+ setValue(vMouseEvent.x)
+ }
+ onClicked: {
+ setValue(vMouseEvent.x)
+ }
+
+ Rectangle { id: _handler
+ property real diameter : parent.handlerWidth
+
+ anchors.verticalCenter : parent.verticalCenter
+ anchors.horizontalCenter: _progressRect.right
+
+ width : diameter
+ height : diameter
+ radius : diameter
+ color : "white"
+ Rectangle {
+ property real diameter : parent.diameter - 8
+ anchors.centerIn: parent
+ width : diameter
+ height : diameter
+ radius : diameter
+ color : Colors.highlightProgressBar
+ }
+ }
+}
Index: sources/gui/qml/components/TouchRect.qml
===================================================================
diff -u -r94f7349bd073a732dba5295250fc0e26f740743c -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 94f7349bd073a732dba5295250fc0e26f740743c)
+++ sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -38,6 +38,8 @@
property color borderColor : Colors.borderButton
property color backgroundColor : Colors.backgroundButtonNormal
+ signal clicked
+
onDurationChanged: {
_colorAnimationOn .duration = duration;
_colorAnimationOff.duration = duration;
@@ -84,7 +86,7 @@
}
MouseArea { id: _mouseArea
anchors.fill: parent
- onPressed: {
+ onClicked : {
if ( disabled ) { return }
animate(true)
}
Index: sources/gui/qml/globals/Colors.qml
===================================================================
diff -u -r9391d4058233e096350d9dc3ced79aed8ed93b38 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 9391d4058233e096350d9dc3ced79aed8ed93b38)
+++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -48,7 +48,7 @@
readonly property color borderButton : "#4290EC" //K:D //"#438FEB"
readonly property color borderDisableButton : "#607A91"
readonly property color boderSeparatorLine : "#476982"
- readonly property color borderDialog : "#F51A344D"
+ readonly property color borderDialog : "#D01A344D" // "#D00F0F0F" //"#F51A344D"
readonly property color touchTextAreaTitle : "#a0b6d0"
Index: sources/gui/qml/globals/Fonts.qml
===================================================================
diff -u -r9391d4058233e096350d9dc3ced79aed8ed93b38 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 9391d4058233e096350d9dc3ced79aed8ed93b38)
+++ sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -42,4 +42,8 @@
readonly property int fontPixelInfusionValue : 32
readonly property int fontPixelInfusionUnit : 22
+ readonly property int fontPixelConfirm : 19
+
+ readonly property int fontPixelSliderMarker : 17
+
}
Index: sources/gui/qml/globals/Variables.qml
===================================================================
diff -u -r9391d4058233e096350d9dc3ced79aed8ed93b38 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 9391d4058233e096350d9dc3ced79aed8ed93b38)
+++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -40,13 +40,14 @@
readonly property int touchRectHeight : 85 //K:D //70
readonly property int touchRectRadius : 45
- readonly property int poweroffWidth : 950
- readonly property int poweroffHeight : 550
readonly property int titleBottomPadding : 25
readonly property int columnSpacing : 25 //K:D //20
+ readonly property int dialogMargin : 80
+ readonly property int dialogWidth : applicationWidth - dialogMargin
+ readonly property int dialogHeight : applicationHeight - dialogMargin
readonly property int dialogRadius : 10
readonly property int rangeRectMargin : 1
@@ -61,4 +62,9 @@
readonly property int progressbarInfusionHeight : 5
+ readonly property int sliderTextMargin : 20
+
+ readonly property int bloodFlowResolution : 25
+ readonly property int dialysateFlowResolution : 50
+
}
Index: sources/gui/qml/main.qml
===================================================================
diff -u -r057d3ef4e29c63235040c5cfe8c6421ef7787d6a -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/main.qml (.../main.qml) (revision 057d3ef4e29c63235040c5cfe8c6421ef7787d6a)
+++ sources/gui/qml/main.qml (.../main.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -12,6 +12,45 @@
*
*/
+/*
+-Item
+ Circle
+ LogoD
+ MainMenu
+ PlaceHolderText
+ ProgressCircle
+ ScreenItem
+ StackItem
+ TextRect
+ TimeText
+ TouchArea
+ RangeMarker
+
+-Text
+ TitleText
+
+-Rectangle
+ Line
+ Background
+ CloseButton
+ TouchRect
+ BackButton
+ ConfirmButton
+ ExportButton
+ USBButton
+ RangeRect
+ ProgressBar
+ ProgressBarEx
+ ProgressRect
+ Slider
+ RangeBar
+
+-Dialog
+ ModalDialog
+ AutoHideInfo
+ PowwerOff
+*/
+
// Qt
import QtQuick 2.12
import QtQuick.Controls 2.12
@@ -53,7 +92,7 @@
case GuiActions.PowerOffBroadcast:
_autoHideInfo.showDialog(
qsTr("System is shutting down"),
- 5000 // if there is any error happening then after 5 seconds dialog hides.
+ 5000 // if any error happens and shutdown is not successful then after 5 seconds dialog hides.
)
break;
@@ -62,7 +101,7 @@
}
// TODO : When Testing data on Setting screen is removed
- // This needs to be moved into the TreatmentFlows.qml
+ // This needs to be moved into the Treatment______.qml
VTreatmentBloodFlow { id: vTreatmentBloodFlow }
VTreatmentDialysateFlow { id: vTreatmentDialysateFlow }
VTreatmentUltrafiltration { id: vTreatmentUltrafiltration }
@@ -83,7 +122,7 @@
case GuiActions.Rejected:
_autoHideInfo.showDialog(
qsTr("Cannot shutdown during 'Treatment'"), // '%1').arg()
- 1000 // if there is any error happening then after 5 seconds dialog hides.
+ 2000 // notifies user and hides the dialog
)
break;
@@ -140,4 +179,19 @@
anchors.rightMargin: 4
font.pixelSize: 14
}
+
+ Rectangle { // TEST : Some kind of alarm bar.
+ visible: false
+ height: 50
+ anchors {
+ bottom: parent.bottom
+ left: parent.left
+ right: parent.right
+ }
+ radius: 5
+ Text {
+ anchors.centerIn: parent
+ text: qsTr("Something had happened...")
+ }
+ }
}
Index: sources/gui/qml/pages/treatment/TreatmentHome.qml
===================================================================
diff -u -r9e57e4c990afab0996def98521d4f9fee83f96d8 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision 9e57e4c990afab0996def98521d4f9fee83f96d8)
+++ sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -32,21 +32,12 @@
property alias startTreatmentButton : _startTreatmentRect.button
property alias createTreatmentButton: _createTreatmentRect.button
+ signal treatmentStarted()
+ signal treatmentCreated()
+
// 2 - Header
LogoD { id: _headerLogo }
- // exported properties
- TreatmentStart { id : _treatmentStart
- onBackPressed: {
- _treatmentStack.pop()
- }
- }
- TreatmentCreate { id : _treatmentCreate
- onBackPressed: {
- _treatmentStack.pop()
- }
- }
-
// Definitions
Column {
spacing: Variables.columnSpacing
@@ -57,20 +48,17 @@
}
TouchRect { id : _startTreatmentRect
text.text: qsTr("START TREATMENT")
- button.onClicked: {
- _treatmentStack.push(_treatmentStart)
- }
+ button.onClicked: treatmentStarted()
}
TouchRect { id : _createTreatmentRect
text.text: qsTr("CREATE TREATMENT")
- button.onClicked: {
- _treatmentStack.push(_treatmentCreate)
- }
+ button.onClicked: treatmentCreated()
}
}
onVisibleChanged: {
if (visible) {
+ console.debug("TreatmentHome", visible)
_mainMenu.hidden = false
}
}
Index: sources/gui/qml/pages/treatment/TreatmentStack.qml
===================================================================
diff -u -r9e57e4c990afab0996def98521d4f9fee83f96d8 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 9e57e4c990afab0996def98521d4f9fee83f96d8)
+++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -21,14 +21,16 @@
// Qml imports
import "qrc:/globals"
import "qrc:/components"
-
+import "qrc:/pages/treatment/adjustments"
/*!
* \brief TreatmentStack is the screen
* which contains the main stack for all the Trearment screens
* This is the screen which will be show up when "Treatment" option
* is selected from the main menu.
*/
StackItem { id : _root
+ stackView.initialItem : _treatmentHome
+
MainMenu { id: _treatmentMenu
y : -Variables.mainMenuHeight
position : MainMenu.Position.Top
@@ -41,6 +43,24 @@
hasLogo : true
}
- TreatmentHome { id : _treatmentHome }
- stackView.initialItem : _treatmentHome
+ TreatmentHome { id: _treatmentHome
+ onTreatmentStarted : push( _treatmentStart )
+ onTreatmentCreated : push( _treatmentCreate)
+ }
+
+ TreatmentStart { id: _treatmentStart
+ onBackPressed : pop ()
+ onSectionFlowClicked : {
+ _treatmentFlowAdjustment.open()
+ }
+ }
+
+ TreatmentFlowAdjustment { id: _treatmentFlowAdjustment
+ onCloseClicked : close()
+ }
+
+ TreatmentCreate { id: _treatmentCreate
+ onBackPressed : pop()
+ }
+
}
Index: sources/gui/qml/pages/treatment/TreatmentStart.qml
===================================================================
diff -u -r4a6abe765f03feae8100ec660aa04aa218d4dfa3 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/pages/treatment/TreatmentStart.qml (.../TreatmentStart.qml) (revision 4a6abe765f03feae8100ec660aa04aa218d4dfa3)
+++ sources/gui/qml/pages/treatment/TreatmentStart.qml (.../TreatmentStart.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -47,24 +47,55 @@
signal backPressed()
+ signal sectionFlowClicked()
+
// ---------- COLUMN LEFT
- TreatmentFlows { id: _flowsTouchArea }
+ TreatmentFlows { id: _flowsTouchArea
+ x : leftColumnX
+ y : row1Y
+ onClicked: {
+ sectionFlowClicked()
+ }
+ }
Line { x: 0; y: row1LineY; length: lineLength }
- TreatmentVitals { id: _vitalsTouchArea }
+ TreatmentVitals { id: _vitalsTouchArea
+ x : leftColumnX
+ y : row2Y
+ }
Line { x: 0; y: row2LineY; length: lineLength }
- TreatmentPressure { id: _pressureTouchArea }
+ TreatmentPressure { id: _pressureTouchArea
+ x : leftColumnX
+ y : row3Y
+ width : _flowsTouchArea.width
+ }
// ---------- COLUMN RIGHT
- TreatmentUltrafiltration { id: _ultrafiltrationTouchArea; maximum: 1000 } // TEST : this is a test has to be read form the prescreprion values
+ TreatmentUltrafiltration { id: _ultrafiltrationTouchArea;
+ x : rightColumnX
+ y : row1Y
+ width : _flowsTouchArea.width
+ maximum : 1000 // TEST : this is a test has to be read form the prescreprion values
+ value : vTreatmentUltrafiltration.ultrafiltration_MeasUFVol.toFixed(2);
+ valueEx : 0
+ }
Line { x: rightLinesX; y: row1LineY; length: lineLength }
- TreatmentFluid { id: _fluidManagementTouchArea }
+ TreatmentFluid { id: _fluidManagementTouchArea
+ x : rightColumnX
+ y : row2Y
+ width : _flowsTouchArea.width
+ }
Line { x: rightLinesX; y: row2LineY; length: lineLength; }
- TreatmentInfusion { id: _solutionInfusionTouchArea }
+ TreatmentInfusion { id: _solutionInfusionTouchArea
+ x : rightColumnX
+ y : row3Y
+ width : _flowsTouchArea.width
+ }
// ---------- Center
TreatmentTime { id: _treatmentTime }
onVisibleChanged: {
+ console.debug("TreatmentHome", visible)
if (visible) {
_mainMenu.hidden = true
_treatmentMenu.hidden = false
@@ -80,6 +111,5 @@
backPressed()
}
}
-
}
}
Index: sources/gui/qml/pages/treatment/adjustments/TreatmentFlowAdjustment.qml
===================================================================
diff -u
--- sources/gui/qml/pages/treatment/adjustments/TreatmentFlowAdjustment.qml (revision 0)
+++ sources/gui/qml/pages/treatment/adjustments/TreatmentFlowAdjustment.qml (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -0,0 +1,119 @@
+/*!
+ *
+ * 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 SettingsHome.qml
+ * \date 2019/10/21
+ * \author Behrouz NematiPour
+ *
+ */
+
+// Qt
+import QtQuick 2.12
+import QtQuick.Controls 2.12
+
+// Project
+import Gui.Actions 0.1;
+
+// Qml imports
+import "qrc:/globals"
+import "qrc:/components"
+
+/*!
+ * \brief TreatmentFlowAdjustment.qml is the screen
+ * To adjust the treatment blood/dialysate flow
+ */
+ModalDialog { id: _root
+
+ property alias bloodFlowRateValue : _bloodFlowSlider.value
+ property alias bloodFlowRateMinimum : _bloodFlowSlider.minimum
+ property alias bloodFlowRateMaximum : _bloodFlowSlider.maximum
+ property alias bloodFlowRateStep : _bloodFlowSlider.step
+
+ property alias dialysateFlowRateValue : _dialysateFlowSlider.value
+ property alias dialysateFlowRateMinimum : _dialysateFlowSlider.minimum
+ property alias dialysateFlowRateMaximum : _dialysateFlowSlider.maximum
+ property alias dialysateFlowRateStep : _dialysateFlowSlider.step
+
+ property string unit : qsTr("mL")
+ property int textWidth : 200
+
+ signal closeClicked()
+ signal confirmClicked()
+
+ Column {
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: parent.top
+ anchors.topMargin: 175
+
+ spacing: 200
+ Row {
+ spacing: 100
+ TextRect { id: _bloodFlow
+ anchors.top: parent.top
+ anchors.topMargin: 25
+ width: textWidth
+ title: qsTr("Blood Flow Rate")
+ label: _bloodFlowSlider.value
+ extra: _root.unit
+ labelFont.weight: Font.ExtraLight
+ }
+ Slider { id : _bloodFlowSlider
+ anchors.verticalCenter: parent.verticalCenter
+ width : 600
+ height : 5
+ minimum : 100
+ maximum : 500
+ unit : _root.unit
+ step : Variables.bloodFlowResolution
+ }
+ }
+ Row {
+ spacing: 100
+ TextRect { id: _dialysateInletFlow
+ anchors.top: parent.top
+ anchors.topMargin: 25
+ width: textWidth
+ title: qsTr("Dialysate Flow Rate")
+ label: _dialysateFlowSlider.value
+ extra: _root.unit
+ labelFont.weight: Font.ExtraLight
+ }
+ Slider { id : _dialysateFlowSlider
+ anchors.verticalCenter: parent.verticalCenter
+ width : 600
+ height : 5
+ minimum : 100
+ maximum : 600
+ unit : _root.unit
+ step : Variables.dialysateFlowResolution
+ }
+ }
+ }
+
+ Line { x: 100; y: 400; length: 1000; color: "#5f809d"}
+
+ ConfirmButton {
+ onClicked : confirmClicked()
+ }
+
+ TitleText {
+ text: qsTr("FLOWS")
+ font.pixelSize: Fonts.fontPixelButton
+ color: Colors.textMain
+ height: 50
+ anchors {
+ top: parent.top
+ horizontalCenter: parent.horizontalCenter
+ margins: 35
+ }
+ }
+
+ CloseButton {
+ onClicked : closeClicked()
+ }
+}
Index: sources/gui/qml/pages/treatment/sections/TreatmentFlows.qml
===================================================================
diff -u -r595ed1fbe8066960afd4c8fea168208e81b173d9 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/pages/treatment/sections/TreatmentFlows.qml (.../TreatmentFlows.qml) (revision 595ed1fbe8066960afd4c8fea168208e81b173d9)
+++ sources/gui/qml/pages/treatment/sections/TreatmentFlows.qml (.../TreatmentFlows.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -26,10 +26,9 @@
* \brief Treatment Screen Flows section
*/
TouchArea { id: _root
-
- x: leftColumnX
- y: row1Y
- title: qsTr("FLOWS")
+ x : 0
+ y : 0
+ title : qsTr("FLOWS")
components: [
TextRect { id: _bloodFlow
title: qsTr("Blood")
Index: sources/gui/qml/pages/treatment/sections/TreatmentFluid.qml
===================================================================
diff -u -r9e57e4c990afab0996def98521d4f9fee83f96d8 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/pages/treatment/sections/TreatmentFluid.qml (.../TreatmentFluid.qml) (revision 9e57e4c990afab0996def98521d4f9fee83f96d8)
+++ sources/gui/qml/pages/treatment/sections/TreatmentFluid.qml (.../TreatmentFluid.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -26,11 +26,11 @@
/*!
* \brief Treatment Screen Fluid Management section
*/
-TouchArea { id: _fluidManagementTouchArea
- x: rightColumnX
- y: row2Y
- width: _flowsTouchArea.width
- height: 200
+TouchArea { id: _root
+ x : 0
+ y : 0
+ width : 200
+ height : 200
isTouchable: false
title: qsTr("FLUID MANAGEMENT")
titleVSpacing: 40
Index: sources/gui/qml/pages/treatment/sections/TreatmentInfusion.qml
===================================================================
diff -u -r9e57e4c990afab0996def98521d4f9fee83f96d8 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/pages/treatment/sections/TreatmentInfusion.qml (.../TreatmentInfusion.qml) (revision 9e57e4c990afab0996def98521d4f9fee83f96d8)
+++ sources/gui/qml/pages/treatment/sections/TreatmentInfusion.qml (.../TreatmentInfusion.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -26,11 +26,11 @@
/*!
* \brief Treatment Screen Solution Infusion section
*/
-TouchArea { id: _solutionInfusionTouchArea
- x: rightColumnX
- y: row3Y
- width: _flowsTouchArea.width
- height: 200
+TouchArea { id: _root
+ x : 0
+ y : 0
+ width : 200
+ height : 200
isTouchable: false
orientation: TouchArea.Orientation.Vertical
title: qsTr("SOLUTION INFUSION")
Index: sources/gui/qml/pages/treatment/sections/TreatmentPressure.qml
===================================================================
diff -u -r9e57e4c990afab0996def98521d4f9fee83f96d8 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/pages/treatment/sections/TreatmentPressure.qml (.../TreatmentPressure.qml) (revision 9e57e4c990afab0996def98521d4f9fee83f96d8)
+++ sources/gui/qml/pages/treatment/sections/TreatmentPressure.qml (.../TreatmentPressure.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -26,11 +26,11 @@
/*!
* \brief Treatment Screen Pressure section
*/
-TouchArea { id: _pressureTouchArea
+TouchArea { id: _root
clip: false
- x: leftColumnX
- y: row3Y
- width: _flowsTouchArea.width
+ x : 0
+ y : 0
+ width : 200
height : 200
isTouchable: true
orientation: TouchArea.Orientation.Horizontal
Index: sources/gui/qml/pages/treatment/sections/TreatmentUltrafiltration.qml
===================================================================
diff -u -r4a6abe765f03feae8100ec660aa04aa218d4dfa3 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/pages/treatment/sections/TreatmentUltrafiltration.qml (.../TreatmentUltrafiltration.qml) (revision 4a6abe765f03feae8100ec660aa04aa218d4dfa3)
+++ sources/gui/qml/pages/treatment/sections/TreatmentUltrafiltration.qml (.../TreatmentUltrafiltration.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -27,25 +27,25 @@
* \brief Treatment Screen Ultrafiltration section
*/
TouchArea { id: _root
- property alias minimum : _progressbar.minimum
- property alias maximum : _progressbar.maximum
- property alias value : _progressbar.value
- property alias valueEx : _progressbar.valueEx
+ property alias minimum : _progressbarex.minimum
+ property alias maximum : _progressbarex.maximum
+ property alias value : _progressbarex.value
+ property alias valueEx : _progressbarex.valueEx
clip: false
- x : rightColumnX
- y : row1Y
- width : _flowsTouchArea.width
+ x : 0
+ y : 0
+ width : 200
height : 200
isTouchable : true
orientation : TouchArea.Orientation.Vertical
title : qsTr("ULTRAFILTRATION VOLUME") + " " + qsTr("(mL)")
- ProgressBar { id: _progressbar
+ ProgressBarEx { id: _progressbarex
y : 75
width : parent.width
height : Variables.progressbarHeight
- value : vTreatmentUltrafiltration.ultrafiltration_MeasUFVol.toFixed(2);
+ value : 0
valueEx : 0
}
}
Index: sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml
===================================================================
diff -u -r9e57e4c990afab0996def98521d4f9fee83f96d8 -r79bf4dda5c027044ebd0014e7deac42a058a7fcf
--- sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml (.../TreatmentVitals.qml) (revision 9e57e4c990afab0996def98521d4f9fee83f96d8)
+++ sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml (.../TreatmentVitals.qml) (revision 79bf4dda5c027044ebd0014e7deac42a058a7fcf)
@@ -26,12 +26,12 @@
/*!
* \brief Treatment Screen Vitals section
*/
-TouchArea { id: _vitalsTouchArea
+TouchArea { id: _root
property alias textRectBloodPressure : _bloodPressure
property alias textRectHeartBeat : _heartBeat
- x: leftColumnX
- y: row2Y
+ x: 0
+ y: 0
isTouchable: false
orientation: TouchArea.Orientation.Vertical
title: qsTr("VITALS")