Index: denali.qrc =================================================================== diff -u -rf9a99ad603189f8aafd2b913fd1d453094f00a7e -ra9c98aee00fd5339b969b353926dccf72b0d496f --- denali.qrc (.../denali.qrc) (revision f9a99ad603189f8aafd2b913fd1d453094f00a7e) +++ denali.qrc (.../denali.qrc) (revision a9c98aee00fd5339b969b353926dccf72b0d496f) @@ -39,6 +39,7 @@ sources/gui/qml/components/PlaceHolderText.qml sources/gui/qml/components/ProgressBar.qml sources/gui/qml/components/ProgressMarker.qml + sources/gui/qml/components/ProgressRect.qml qtquickcontrols2.conf Index: sources/canbus/messagedispatcher.cpp =================================================================== diff -u -r4209e0f69d1639b9f9255a2e9209c4287b155593 -ra9c98aee00fd5339b969b353926dccf72b0d496f --- sources/canbus/messagedispatcher.cpp (.../messagedispatcher.cpp) (revision 4209e0f69d1639b9f9255a2e9209c4287b155593) +++ sources/canbus/messagedispatcher.cpp (.../messagedispatcher.cpp) (revision a9c98aee00fd5339b969b353926dccf72b0d496f) @@ -24,6 +24,7 @@ #include "messageacknowmodel.h" //#define DEBUG_ACKBACK_HD_TO_UI +//#define DEBUG_OUT_OF_SYNC using namespace Can; @@ -164,7 +165,7 @@ // TODO : must be moved to a MessageModel class if (mMessage.isComplete()) { rxCount(); - #ifdef QT_DEBUG + #ifdef DEBUG_OUT_OF_SYNC if (_rxSequence != mMessage.sequence) { qDebug() << tr("Out of Sync : %1 , %2").arg(_rxSequence).arg(mMessage.sequence); } Index: sources/gui/qml/components/Background.qml =================================================================== diff -u -r442d1c4f53c96991d4103485ff5ff683ed00d4f7 -ra9c98aee00fd5339b969b353926dccf72b0d496f --- sources/gui/qml/components/Background.qml (.../Background.qml) (revision 442d1c4f53c96991d4103485ff5ff683ed00d4f7) +++ sources/gui/qml/components/Background.qml (.../Background.qml) (revision a9c98aee00fd5339b969b353926dccf72b0d496f) @@ -17,13 +17,7 @@ // Project - Rectangle { id: _root - - property alias bgColor : _root.color - property alias bgOpacity : _root.opacity - anchors.fill: parent color: "gray" - opacity: 0.5 } Index: sources/gui/qml/components/ProgressBar.qml =================================================================== diff -u -rf9a99ad603189f8aafd2b913fd1d453094f00a7e -ra9c98aee00fd5339b969b353926dccf72b0d496f --- sources/gui/qml/components/ProgressBar.qml (.../ProgressBar.qml) (revision f9a99ad603189f8aafd2b913fd1d453094f00a7e) +++ sources/gui/qml/components/ProgressBar.qml (.../ProgressBar.qml) (revision a9c98aee00fd5339b969b353926dccf72b0d496f) @@ -36,88 +36,99 @@ 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 color minColor : Colors.textProgressMarker + + property int margin : 1 property real radius : 2 - property int markerExtraHeight : Variables.progressMarkerExtraHeight + property alias markerColor : _progressMarker.color + property alias markerText : _progressMarker.text + property int markerHeight : Variables.progressMarkerHeight + width : parent.width height: Variables.progressbarHeight - Rectangle { id: _background - width : parent.width - height: parent.height + Background { id: _background color : Colors.backgroundProgressBar radius: _root.radius } - Rectangle { id: _highlightMed - property int widthDest: ((_root.width * (medimum - minimum)) / (maximum - minimum) - (margin * 2)) + ProgressRect { id: _highlightMed + minimum : _root.minimum + maximum : _root.maximum + value : _root.medimum - visible : medimum + margin : _root.margin + radius : _root.radius 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)) + ProgressRect { id: _highlight + minimum : _root.minimum + maximum : _root.maximum + value : _root.value + margin : _root.margin + radius : _root.radius 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 + ProgressMarker { id: _progressMarker + value : _root.value + height : _root.markerHeight + + text.font.pixelSize : Fonts.fontPixelProgressBarMarker + text.font.bold : true + + text.anchors.right : left + text.anchors.top : top + text.anchors.rightMargin: 5 + text.anchors.topMargin : -5 } - value : _root.value } Text { id: _textMed visible : medimum + + font.pixelSize : Fonts.fontPixelProgressBarRange + font.bold : true + + color : Colors.textProgressBar + text : medimum + anchors { right : _highlightMed.right - top : _root.bottom + top : parent.bottom + topMargin : Variables.progressTextMargin } - color : "white" - text : medimum } Text { id: _textMinimum + font.pixelSize : Fonts.fontPixelProgressBarRange + font.bold : true + + color : Colors.textProgressBar + text : minimum + anchors { - left : _root.left - top : _root.bottom + left : parent.left + top : parent.bottom + topMargin : Variables.progressTextMargin } - color : "white" - text : minimum } Text { id: _textMaximum + font.pixelSize : Fonts.fontPixelProgressBarRange + font.bold : true + + color : Colors.textProgressBar + text : maximum + anchors { - right : _root.right - top : _root.bottom + right : parent.right + top : parent.bottom + topMargin : Variables.progressTextMargin } - color : "white" - text : maximum } MouseArea { id: _mouseArea Index: sources/gui/qml/components/ProgressMarker.qml =================================================================== diff -u -rf9a99ad603189f8aafd2b913fd1d453094f00a7e -ra9c98aee00fd5339b969b353926dccf72b0d496f --- sources/gui/qml/components/ProgressMarker.qml (.../ProgressMarker.qml) (revision f9a99ad603189f8aafd2b913fd1d453094f00a7e) +++ sources/gui/qml/components/ProgressMarker.qml (.../ProgressMarker.qml) (revision a9c98aee00fd5339b969b353926dccf72b0d496f) @@ -26,19 +26,23 @@ 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 text : _textValue + property color color : Colors.progressMarker property alias thickness : _root.width + property alias handle : _handle.visible height: Variables.headerHeight - width : 6 + width : Variables.progressMarkerWidth + anchors { + left : parent.right + bottom : parent.bottom + } + Rectangle { id: _handle - width : _root.width - height : _root.width - radius : _root.width + width : _root.width * 3 + height : _root.width * 3 + radius : _root.width * 3 color : _root.color anchors { top : _root.top @@ -47,7 +51,7 @@ } Rectangle { id: _stick - width : _root.width / 3 + width : _root.width height : _root.height color : _root.color anchors { @@ -58,11 +62,11 @@ Text { id: _textValue anchors { - right : _progressMarker.left - top : _progressMarker.top + right : parent.left + top : parent.bottom rightMargin: 5 } - color : Colors.textColorProgressMarker + color : Colors.textProgressMarker text : value } } Index: sources/gui/qml/components/ProgressRect.qml =================================================================== diff -u --- sources/gui/qml/components/ProgressRect.qml (revision 0) +++ sources/gui/qml/components/ProgressRect.qml (revision a9c98aee00fd5339b969b353926dccf72b0d496f) @@ -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 ProgressRect.qml + * \date 2020/01/23 + * \author Behrouz NematiPour + * + */ + +// Qt +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +// Project +// Qml imports +import "qrc:/globals" + +/*! + * \brief Denali project Progress Rect + * \details This rectangle fits into the rect area and will calculate its length + * in regards to the min, max, width, current value of the parent + */ +Rectangle { id: _highlightMed + property int minimum : 0 + property int maximum : 0 + property int value : 0 + property real margin : 0 + + QtObject { id: _private + property int length: ((parent.width * (value - minimum)) / (maximum - minimum) - (margin * 2)) + } + + width : _private.length + + anchors { + left : parent.left + top : parent.top + bottom : parent.bottom + margins : margin + } +} Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -rf9a99ad603189f8aafd2b913fd1d453094f00a7e -ra9c98aee00fd5339b969b353926dccf72b0d496f --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision f9a99ad603189f8aafd2b913fd1d453094f00a7e) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision a9c98aee00fd5339b969b353926dccf72b0d496f) @@ -34,9 +34,10 @@ readonly property color backgroundProgressBar : "#3e546e" readonly property color highlightProgressBar : "#3d8eef" readonly property color highlightMedProgressBar : "#1b2b3e" + readonly property color textProgressBar : "#88a3c5" - readonly property color textColorProgressMarker : "white" - readonly property color colorProgressMarker : "white" + readonly property color textProgressMarker : "white" + readonly property color progressMarker : "white" readonly property color textMain : "#FCFCFC" readonly property color textButton : "#E8E8E8" Index: sources/gui/qml/globals/Fonts.qml =================================================================== diff -u -r442d1c4f53c96991d4103485ff5ff683ed00d4f7 -ra9c98aee00fd5339b969b353926dccf72b0d496f --- sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 442d1c4f53c96991d4103485ff5ff683ed00d4f7) +++ sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision a9c98aee00fd5339b969b353926dccf72b0d496f) @@ -33,4 +33,6 @@ readonly property int fontPixelVitals : 68 + readonly property int fontPixelProgressBarMarker: 16 + readonly property int fontPixelProgressBarRange : 14 } Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -rf9a99ad603189f8aafd2b913fd1d453094f00a7e -ra9c98aee00fd5339b969b353926dccf72b0d496f --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision f9a99ad603189f8aafd2b913fd1d453094f00a7e) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision a9c98aee00fd5339b969b353926dccf72b0d496f) @@ -50,6 +50,8 @@ readonly property int dialogRadius : 10 readonly property int progressbarHeight : 30 - readonly property int progressMarkerExtraHeight : 30 + readonly property int progressMarkerHeight : 60 + readonly property int progressMarkerWidth : 2 + readonly property int progressTextMargin : 7 } Index: sources/gui/qml/pages/TreatmentStart.qml =================================================================== diff -u -rf9a99ad603189f8aafd2b913fd1d453094f00a7e -ra9c98aee00fd5339b969b353926dccf72b0d496f --- sources/gui/qml/pages/TreatmentStart.qml (.../TreatmentStart.qml) (revision f9a99ad603189f8aafd2b913fd1d453094f00a7e) +++ sources/gui/qml/pages/TreatmentStart.qml (.../TreatmentStart.qml) (revision a9c98aee00fd5339b969b353926dccf72b0d496f) @@ -28,8 +28,10 @@ * which is the default screen in the "Manager" stack */ ScreenItem { id: _root - property int bloodFlow_MeasuredFlow_Precision: 0 + property int bloodFlow_MeasuredFlow_Precision: 0 + property int dialysateFlow_MeasuredFlow_Precision: 0 + property int leftColumnX : 40 property int rightColumnX : 875 @@ -177,6 +179,10 @@ switch(vAction) { case GuiActions.BloodFlow: _bloodFlow.label = vData[GuiActions.BloodFlow_MeasuredFlow].toFixed(bloodFlow_MeasuredFlow_Precision); + break + case GuiActions.DialysateFlow: + _dialysateFlow.label = vData[GuiActions.DialysateFlow_MeasuredFlow].toFixed(dialysateFlow_MeasuredFlow_Precision); + break } } }