Index: denali.qrc
===================================================================
diff -u -r8c69137f18382bdc55a5678e6ed44a7683fe4dea -rf9a99ad603189f8aafd2b913fd1d453094f00a7e
--- denali.qrc (.../denali.qrc) (revision 8c69137f18382bdc55a5678e6ed44a7683fe4dea)
+++ denali.qrc (.../denali.qrc) (revision f9a99ad603189f8aafd2b913fd1d453094f00a7e)
@@ -37,6 +37,8 @@
sources/gui/qml/components/Background.qml
sources/gui/qml/components/Line.qml
sources/gui/qml/components/PlaceHolderText.qml
+ sources/gui/qml/components/ProgressBar.qml
+ sources/gui/qml/components/ProgressMarker.qml
qtquickcontrols2.conf
Index: sources/gui/qml/components/ProgressBar.qml
===================================================================
diff -u
--- sources/gui/qml/components/ProgressBar.qml (revision 0)
+++ sources/gui/qml/components/ProgressBar.qml (revision f9a99ad603189f8aafd2b913fd1d453094f00a7e)
@@ -0,0 +1,129 @@
+/*!
+ *
+ * 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 ProgressBar.qml
+ * \date 2020/01/22
+ * \author Behrouz NematiPour
+ *
+ */
+
+// Qt
+import QtQuick 2.12
+import QtQuick.Controls 2.12
+
+// Project
+// Qml imports
+import "qrc:/globals"
+
+/*!
+ * \brief Denali project ProgressBar
+ */
+Item { id: _root
+
+ signal clicked()
+
+ property int minimum : 0
+ property int maximum : 100
+ property int medimum : 0 // Median
+
+ property int value : 0
+
+ property alias bgColor : _background.color
+ property alias color : _highlight.color
+ property alias colorMed : _highlightMed.color
+ property alias colorMarker : _progressMarker.color
+ property alias colorMarkerText : _progressMarker.textColor
+
+ property int margin : 2
+ property real radius : 2
+ property int markerExtraHeight : Variables.progressMarkerExtraHeight
+
+ width : parent.width
+ height: Variables.progressbarHeight
+
+ Rectangle { id: _background
+ width : parent.width
+ height: parent.height
+ color : Colors.backgroundProgressBar
+ radius: _root.radius
+ }
+
+ Rectangle { id: _highlightMed
+ property int widthDest: ((_root.width * (medimum - minimum)) / (maximum - minimum) - (margin * 2))
+
+ visible : medimum
+ color : Colors.highlightMedProgressBar
+ width : widthDest
+ anchors {
+ left : parent.left
+ top : parent.top
+ bottom : parent.bottom
+ margins : _root.margin
+ }
+ radius: _root.radius
+ }
+
+ Rectangle { id: _highlight
+ property int widthDest: ((_root.width * (value - minimum)) / (maximum - minimum) - (margin * 2))
+
+ color : Colors.highlightProgressBar
+ width : widthDest
+ //Behavior on width { SmoothedAnimation { velocity: 1200 } }
+ anchors {
+ left : parent.left
+ top : parent.top
+ bottom : parent.bottom
+ margins : _root.margin
+ }
+ radius: _root.radius
+ }
+
+ ProgressMarker { id: _progressMarker
+ height : _root.height + markerExtraHeight
+ anchors {
+ left : _highlight.right
+ bottom : _highlight.bottom
+ }
+ value : _root.value
+ }
+
+ Text { id: _textMed
+ visible : medimum
+ anchors {
+ right : _highlightMed.right
+ top : _root.bottom
+ }
+ color : "white"
+ text : medimum
+ }
+
+ Text { id: _textMinimum
+ anchors {
+ left : _root.left
+ top : _root.bottom
+ }
+ color : "white"
+ text : minimum
+ }
+
+ Text { id: _textMaximum
+ anchors {
+ right : _root.right
+ top : _root.bottom
+ }
+ color : "white"
+ text : maximum
+ }
+
+ MouseArea { id: _mouseArea
+ anchors.fill: _background
+ onClicked: {
+ _root.clicked
+ }
+ }
+}
Index: sources/gui/qml/components/ProgressMarker.qml
===================================================================
diff -u
--- sources/gui/qml/components/ProgressMarker.qml (revision 0)
+++ sources/gui/qml/components/ProgressMarker.qml (revision f9a99ad603189f8aafd2b913fd1d453094f00a7e)
@@ -0,0 +1,68 @@
+/*!
+ *
+ * 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 ProgressMarker.qml
+ * \date 2020/01/22
+ * \author Behrouz NematiPour
+ *
+ */
+
+// Qt
+import QtQuick 2.12
+import QtQuick.Controls 2.12
+
+// Project
+// Qml imports
+import "qrc:/globals"
+
+/*!
+ * \brief Denali project simple logo (No 'Diality')
+ */
+Item { id : _root
+ property int value : 0
+
+ property alias textColor : _textValue.color
+ property alias textFontSize : _textValue.font.pixelSize
+
+ property color color : Colors.colorProgressMarker
+ property alias thickness : _root.width
+
+ height: Variables.headerHeight
+ width : 6
+
+ Rectangle { id: _handle
+ width : _root.width
+ height : _root.width
+ radius : _root.width
+ color : _root.color
+ anchors {
+ top : _root.top
+ horizontalCenter: parent.horizontalCenter
+ }
+ }
+
+ Rectangle { id: _stick
+ width : _root.width / 3
+ height : _root.height
+ color : _root.color
+ anchors {
+ top : _root.top
+ horizontalCenter: parent.horizontalCenter
+ }
+ }
+
+ Text { id: _textValue
+ anchors {
+ right : _progressMarker.left
+ top : _progressMarker.top
+ rightMargin: 5
+ }
+ color : Colors.textColorProgressMarker
+ text : value
+ }
+}
Index: sources/gui/qml/globals/Colors.qml
===================================================================
diff -u -r442d1c4f53c96991d4103485ff5ff683ed00d4f7 -rf9a99ad603189f8aafd2b913fd1d453094f00a7e
--- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 442d1c4f53c96991d4103485ff5ff683ed00d4f7)
+++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision f9a99ad603189f8aafd2b913fd1d453094f00a7e)
@@ -31,6 +31,13 @@
readonly property color backgroundDottedMenu : "#64809D"
readonly property color backgroundSlider : "#195187"
+ readonly property color backgroundProgressBar : "#3e546e"
+ readonly property color highlightProgressBar : "#3d8eef"
+ readonly property color highlightMedProgressBar : "#1b2b3e"
+
+ readonly property color textColorProgressMarker : "white"
+ readonly property color colorProgressMarker : "white"
+
readonly property color textMain : "#FCFCFC"
readonly property color textButton : "#E8E8E8"
readonly property color textDisableButton : "#607A91"
Index: sources/gui/qml/globals/Variables.qml
===================================================================
diff -u -r2f7a4176a08ba884281b370d452f19c25501a4b4 -rf9a99ad603189f8aafd2b913fd1d453094f00a7e
--- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 2f7a4176a08ba884281b370d452f19c25501a4b4)
+++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision f9a99ad603189f8aafd2b913fd1d453094f00a7e)
@@ -48,4 +48,8 @@
readonly property int columnSpacing : 25 //K:D //20
readonly property int dialogRadius : 10
+
+ readonly property int progressbarHeight : 30
+ readonly property int progressMarkerExtraHeight : 30
+
}
Index: sources/gui/qml/pages/TreatmentStart.qml
===================================================================
diff -u -r0e87420e50dd94c37eb25f289ef3262e0e45d7f4 -rf9a99ad603189f8aafd2b913fd1d453094f00a7e
--- sources/gui/qml/pages/TreatmentStart.qml (.../TreatmentStart.qml) (revision 0e87420e50dd94c37eb25f289ef3262e0e45d7f4)
+++ sources/gui/qml/pages/TreatmentStart.qml (.../TreatmentStart.qml) (revision f9a99ad603189f8aafd2b913fd1d453094f00a7e)
@@ -28,7 +28,6 @@
* which is the default screen in the "Manager" stack
*/
ScreenItem { id: _root
-
property int bloodFlow_MeasuredFlow_Precision: 0
property int leftColumnX : 40
@@ -108,12 +107,25 @@
// ---------- COLUMN RIGHT
TouchArea { id: _ultrafiltrationTouchArea
+ clip: false
x: rightColumnX
y: row1Y
width: _flowsTouchArea.width
+ height: 200
isTouchable: true
orientation: TouchArea.Orientation.Vertical
title: qsTr("ULTRAFILTRATION VOLUME") + " " + qsTr("(mL)")
+ ProgressBar { id: _progressbar
+ property int r: Math.floor(Math.random() * 5000 + 1000)
+ y: 75
+ width: parent.width
+
+ // TEST : simulation code
+ minimum: 0 // TEST : only test values
+ medimum: 3000 // TEST : only test values
+ maximum: 4000 // TEST : only test values
+ NumberAnimation on value { duration: 50000 /*_progressbar.r*/; from: _progressbar.minimum; to: _progressbar.maximum; loops: Animation.Infinite; }
+ }
}
Line { x: rightLinesX; y: row1LineY; length: lineLength }