Index: denali.qrc =================================================================== diff -u -r5963f00ffd2c557d3ae06a5deea05032a3a3bd68 -r2f7a4176a08ba884281b370d452f19c25501a4b4 --- denali.qrc (.../denali.qrc) (revision 5963f00ffd2c557d3ae06a5deea05032a3a3bd68) +++ denali.qrc (.../denali.qrc) (revision 2f7a4176a08ba884281b370d452f19c25501a4b4) @@ -18,6 +18,7 @@ resources/images/Logo Diality.png resources/images/Power_symbol-128.png resources/images/splash.png + resources/images/ArrowRight.png sources/gui/qml/components/MainMenu.qml @@ -30,6 +31,9 @@ sources/gui/qml/components/BackButton.qml sources/gui/qml/components/USBButton.qml sources/gui/qml/components/ExportButton.qml + sources/gui/qml/components/TouchArea.qml + sources/gui/qml/components/TextRect.qml + sources/gui/qml/components/BackgroundRect.qml qtquickcontrols2.conf Index: resources/images/ArrowRight.png =================================================================== diff -u Binary files differ Index: sources/gui/qml/components/BackgroundRect.qml =================================================================== diff -u --- sources/gui/qml/components/BackgroundRect.qml (revision 0) +++ sources/gui/qml/components/BackgroundRect.qml (revision 2f7a4176a08ba884281b370d452f19c25501a4b4) @@ -0,0 +1,29 @@ +/*! + * + * 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 LogoD.qml + * \date 2020/01/11 + * \author Behrouz NematiPour + * + */ + +// Qt +import QtQuick 2.0 + +// 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/TextRect.qml =================================================================== diff -u --- sources/gui/qml/components/TextRect.qml (revision 0) +++ sources/gui/qml/components/TextRect.qml (revision 2f7a4176a08ba884281b370d452f19c25501a4b4) @@ -0,0 +1,81 @@ +/*! + * + * 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 TextRect.qml + * \date 2019/01/10 + * \author Behrouz NematiPour + * + */ + +// Qt +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +// Project +// Qml imports +import "qrc:/globals" + +/*! + * \brief The TextRect Component + * which is a static text rectangle area containing title and a text blow it + * with and extra text next to it whcih can be used for example for unit. + */ +Item { id : _root + property string title : "" + property string titleColor : Colors.textTextRectTitle + + property string label : "" + property string labelColor : Colors.textTextRectLabel + property bool labelAutoSize : false + property int labelwidth : 80 // text:3 Digit "000" & pixel: 46 => width: 80 + + property string extra : "" + property string extraColor : Colors.textTextRectExtra + + readonly property int titleVSpacing : 5 + readonly property int textHSpacing : 5 + + width : _column.width + height: _column.height + + Column { id: _column + width : Math.max(_titleText.width , _row.width ) + height: _titleText.height + _row.height + spacing + anchors.fill: parent + spacing: titleVSpacing + Text { id: _titleText + text: _root.title + color: titleColor + font.pixelSize: Fonts.fontPixelTextRectTitle + verticalAlignment: Text.AlignBottom + } + Row { id: _row + width : _labelText.width + _extraText.width + spacing + height: _labelText.height + _extraText.height + spacing: textHSpacing + Text { id: _labelText + width: labelAutoSize ? contentWidth : labelwidth + text: _root.label + color: labelColor + font.pixelSize: Fonts.fontPixelTextRectLabel + verticalAlignment: Text.AlignBottom + horizontalAlignment: Text.AlignRight + } + Text { id: _extraText + text: _root.extra + color: extraColor + font.pixelSize: Fonts.fontPixelTextRectExtra + verticalAlignment: Text.AlignBottom + anchors.baseline: _labelText.baseline + } + } + } + + Component.onCompleted: { + } +} Index: sources/gui/qml/components/TouchArea.qml =================================================================== diff -u --- sources/gui/qml/components/TouchArea.qml (revision 0) +++ sources/gui/qml/components/TouchArea.qml (revision 2f7a4176a08ba884281b370d452f19c25501a4b4) @@ -0,0 +1,81 @@ +/*! + * + * 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 TouchArea.qml + * \date 2019/01/09 + * \author Behrouz NematiPour + * + */ + +// Qt +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +// Project +// Qml imports +import "qrc:/globals" + +/*! + * \brief The TouchArea Component + * which is used as a touchable component(s) container + * with a title at the top + * if set to be touchable will show an arrow right side of the title + * next to the right edge of the component. + */ +Item { id : _root + property string title : "" + property bool isTouchable : true + property list components + + readonly property int titleVSpacing : 20 + readonly property int componentsHSpacing : 80 + readonly property int arrowSpacing : 40 + + signal clicked() + + width : _column.width + arrowSpacing + height: _column.height + clip: true + + Column { id: _column + width: Math.max(_titleText.width , _row.width) + height: _titleText.height + _row.height + spacing: titleVSpacing + Row { + Text { id: _titleText + text: _root.title + font.pixelSize: Fonts.fontPixelTouchAreaTitle + color: Colors.touchTextAreaTitle + } + } + Row { id: _row + spacing: componentsHSpacing + children: components + } + } + + Image { id: _arrowImage + visible: isTouchable + anchors.right: parent.right + anchors.top: parent.top + width : Variables.arrowWidth + height: Variables.arrowHeight + source: "qrc:/images/iArrow" + } + + MouseArea { id: _mouseArea + anchors.fill: parent + onClicked: { + if (isTouchable) { + _root.clicked() + } + } + } + Component.onCompleted: { + } +} Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -rfbeafa0714f065bce0403e2e8ce68f6d8fbea6bd -r2f7a4176a08ba884281b370d452f19c25501a4b4 --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision fbeafa0714f065bce0403e2e8ce68f6d8fbea6bd) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 2f7a4176a08ba884281b370d452f19c25501a4b4) @@ -1,6 +1,6 @@ /*! * - * Copyright (c) 2019-2019 Diality Inc. - All Rights Reserved. + * 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 @@ -41,4 +41,10 @@ readonly property color boderSeparatorLine : "#476982" readonly property color borderDialog : "#F51A344D" + readonly property color touchTextAreaTitle : "#a0b6d0" + + readonly property color textTextRectTitle : "#ffffff" + readonly property color textTextRectLabel : "#e8e8e8" + readonly property color textTextRectExtra : "#708795" + } Index: sources/gui/qml/globals/Fonts.qml =================================================================== diff -u -r781e62c996e81897517fbdb1bc79fe3bbcf165c1 -r2f7a4176a08ba884281b370d452f19c25501a4b4 --- sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 781e62c996e81897517fbdb1bc79fe3bbcf165c1) +++ sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 2f7a4176a08ba884281b370d452f19c25501a4b4) @@ -1,6 +1,6 @@ /*! * - * Copyright (c) 2019-2019 Diality Inc. - All Rights Reserved. + * 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 @@ -22,6 +22,12 @@ * which is going to be used in the project */ QtObject { - readonly property int fontPixelButton: 12 * 2 - readonly property int fontPixelTitle : 12 * 3.5 + readonly property int fontPixelButton : 12 * 2 + readonly property int fontPixelTitle : 12 * 3.5 + + readonly property int fontPixelTouchAreaTitle : 16 + + readonly property int fontPixelTextRectTitle : 25 + readonly property int fontPixelTextRectLabel : 46 + readonly property int fontPixelTextRectExtra : 28 } Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r781e62c996e81897517fbdb1bc79fe3bbcf165c1 -r2f7a4176a08ba884281b370d452f19c25501a4b4 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 781e62c996e81897517fbdb1bc79fe3bbcf165c1) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 2f7a4176a08ba884281b370d452f19c25501a4b4) @@ -1,6 +1,6 @@ /*! * - * Copyright (c) 2019-2019 Diality Inc. - All Rights Reserved. + * 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 @@ -31,6 +31,9 @@ readonly property int logoWidth : 50 readonly property int logoHeight : 50 + readonly property int arrowWidth : 12 + readonly property int arrowHeight : 16 + readonly property int borderWidth : 2 readonly property int touchRectWidth : 512 //K:D //425 Index: sources/gui/qml/pages/TreatmentStart (test).qml =================================================================== diff -u --- sources/gui/qml/pages/TreatmentStart (test).qml (revision 0) +++ sources/gui/qml/pages/TreatmentStart (test).qml (revision 2f7a4176a08ba884281b370d452f19c25501a4b4) @@ -0,0 +1,366 @@ +/*! + * + * Copyright (c) 2019-2019 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 ManagerHome.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 ManagerHome is the screen + * which is the default screen in the "Manager" stack + */ +ScreenItem { id: _root + signal backPressed() + BackButton { id : _backButton + onPressed: backPressed() + } + + //Column { + // spacing: Variables.columnSpacing + // anchors.centerIn: parent + // TitleText { id: _titleText + // width: parent.width + // text: qsTr("Start Treatment Placeholder") + // } + //} + + USBButton { + x: 200 + anchors { + top : parent.top + topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + } + } + ExportButton { + x: 300 + width: 150 + height: 50 + anchors { + top : parent.top + topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + } + } + + Column { id: _BloodFlowColumn + width: 150 + spacing: 20 + topPadding: 100 + leftPadding: 10 + Text { + id: _BloodFlow_Title + text: qsTr(" Blood ") + width: _BloodFlowColumn.width + horizontalAlignment: Text.AlignHCenter + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + font.underline: true + } + Text { + id: _BloodFlow_S32 + text: qsTr("") + width: _BloodFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + Text { + id: _BloodFlow_F32_1 + text: qsTr("") + width: _BloodFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + Text { + id: _BloodFlow_F32_2 + text: qsTr("") + width: _BloodFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + Text { + id: _BloodFlow_F32_3 + text: qsTr("") + width: _BloodFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + Text { + id: _BloodFlow_F32_4 + text: qsTr("") + width: _BloodFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + Text { + id: _BloodFlow_F32_5 + text: qsTr("") + width: _BloodFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + Text { + id: _BloodFlow_F32_6 + text: qsTr("") + width: _BloodFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + } + + Column { id: _DialysateFlowColumn + width: 150 + spacing: 20 + topPadding: 100 + leftPadding: 180 + Text { + id: _DialysateFlow_Title + text: qsTr(" Dialysate ") + width: _DialysateFlowColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + font.underline: true + } + Text { + id: _DialysateFlow_S32 + text: qsTr("") + width: _DialysateFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + Text { + id: _DialysateFlow_F32_1 + text: qsTr("") + width: _DialysateFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + Text { + id: _DialysateFlow_F32_2 + text: qsTr("") + width: _DialysateFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + Text { + id: _DialysateFlow_F32_3 + text: qsTr("") + width: _DialysateFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + Text { + id: _DialysateFlow_F32_4 + text: qsTr("") + width: _DialysateFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + Text { + id: _DialysateFlow_F32_5 + text: qsTr("") + width: _DialysateFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + Text { + id: _DialysateFlow_F32_6 + text: qsTr("") + width: _DialysateFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + } + + Column { id: _AlarmStatusColumn + width: 270 + spacing: 5 + topPadding: 100 + leftPadding: 400 + Text { + id: _AlarmStatus_Title + text: qsTr(" Alarm Status ") + width: _AlarmStatusColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + font.underline: true + } + Text { + id: _AlarmStatus_Priority + text: qsTr("") + width: _AlarmStatusColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelButton + } + Text { + id: _AlarmStatus_ID + text: qsTr("") + width: _AlarmStatusColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelButton + } + Text { + id: _AlarmStatus_EsclateIn + text: qsTr("") + width: _AlarmStatusColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelButton + } + Text { id: _AlarmStatus_MuteTimeout + text: qsTr("") + width: _AlarmStatusColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelButton + } + Text { id: _AlarmStatus_systemFault + text: qsTr("") + width: _AlarmStatusColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelButton + } + Text { id: _AlarmStatus_stop + text: qsTr("") + width: _AlarmStatusColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelButton + } + Text { id: _AlarmStatus_noClear + text: qsTr("") + width: _AlarmStatusColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelButton + } + Text { id: _AlarmStatus_noResume + text: qsTr("") + width: _AlarmStatusColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelButton + } + Text { id: _AlarmStatus_noRinseback + text: qsTr("") + width: _AlarmStatusColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelButton + } + Text { id: _AlarmStatus_noEndTreatment + text: qsTr("") + width: _AlarmStatusColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelButton + } + Text { id: _AlarmStatus_noNewTreatment + text: qsTr("") + width: _AlarmStatusColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelButton + } + Text { id: _AlarmStatus_bypassDialyzer + text: qsTr("") + width: _AlarmStatusColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelButton + } + Text { id: _AlarmStatus_alarmsToEscalate + text: qsTr("") + width: _AlarmStatusColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelButton + } + Text { id: _AlarmStatus_alarmsSilenced + text: qsTr("") + width: _AlarmStatusColumn.width + horizontalAlignment: Text.AlignLeft + color: Colors.textMain + font.pixelSize: Fonts.fontPixelButton + } + } + Connections { + target: _GuiView + onDidActionReceive: { + if ( ! visible ) return; + switch(vAction) { + case GuiActions.BloodFlow: + _BloodFlow_S32 .text = vData[GuiActions.BloodFlow_FlowSetPoint ]; + _BloodFlow_F32_1.text = vData[GuiActions.BloodFlow_MeasuredFlow ].toFixed(2); + _BloodFlow_F32_2.text = vData[GuiActions.BloodFlow_RotorSpeed ].toFixed(2); + _BloodFlow_F32_3.text = vData[GuiActions.BloodFlow_MotorSpeed ].toFixed(2); + _BloodFlow_F32_4.text = vData[GuiActions.BloodFlow_MotorCtlSpeed ].toFixed(2); + _BloodFlow_F32_5.text = vData[GuiActions.BloodFlow_MotorCtlCurrent].toFixed(2); + _BloodFlow_F32_6.text = vData[GuiActions.BloodFlow_PWMDtCycle ].toFixed(2) + "%"; + break; + case GuiActions.BloodFlow: + _DialysateFlow_S32 .text = vData[GuiActions.DialysateFlow_FlowSetPoint ]; + _DialysateFlow_F32_1.text = vData[GuiActions.DialysateFlow_MeasuredFlow ].toFixed(2); + _DialysateFlow_F32_2.text = vData[GuiActions.DialysateFlow_RotorSpeed ].toFixed(2); + _DialysateFlow_F32_3.text = vData[GuiActions.DialysateFlow_MotorSpeed ].toFixed(2); + _DialysateFlow_F32_4.text = vData[GuiActions.DialysateFlow_MotorCtlSpeed ].toFixed(2); + _DialysateFlow_F32_5.text = vData[GuiActions.DialysateFlow_MotorCtlCurrent].toFixed(2); + _DialysateFlow_F32_6.text = vData[GuiActions.DialysateFlow_PWMDtCycle ].toFixed(2) + "%"; + break; + case GuiActions.AlarmStatus: + _AlarmStatus_Priority .text = _GuiView.alarmPriorityName(vData[GuiActions.AlarmStatus_Priority ]) + _AlarmStatus_ID .text = _GuiView.alarmIDName (vData[GuiActions.AlarmStatus_AlarmID ]) + _AlarmStatus_EsclateIn .text = "Escalates In : " + vData[GuiActions.AlarmStatus_EscalateIn ] + _AlarmStatus_MuteTimeout .text = "MuteTimeout : " + vData[GuiActions.AlarmStatus_MuteTimeout ] + _AlarmStatus_systemFault .text = (vData[GuiActions.AlarmStatus_Flag_systemFault ] ? "1" : "0" ) + " : systemFault " + _AlarmStatus_stop .text = (vData[GuiActions.AlarmStatus_Flag_stop ] ? "1" : "0" ) + " : stop " + _AlarmStatus_noClear .text = (vData[GuiActions.AlarmStatus_Flag_noClear ] ? "1" : "0" ) + " : noClear " + _AlarmStatus_noResume .text = (vData[GuiActions.AlarmStatus_Flag_noResume ] ? "1" : "0" ) + " : noResume " + _AlarmStatus_noRinseback .text = (vData[GuiActions.AlarmStatus_Flag_noRinseback ] ? "1" : "0" ) + " : noRinseback " + _AlarmStatus_noEndTreatment .text = (vData[GuiActions.AlarmStatus_Flag_noEndTreatment ] ? "1" : "0" ) + " : noEndTreatment " + _AlarmStatus_noNewTreatment .text = (vData[GuiActions.AlarmStatus_Flag_noNewTreatment ] ? "1" : "0" ) + " : noNewTreatment " + _AlarmStatus_bypassDialyzer .text = (vData[GuiActions.AlarmStatus_Flag_bypassDialyzer ] ? "1" : "0" ) + " : bypassDialyzer " + _AlarmStatus_alarmsToEscalate.text = (vData[GuiActions.AlarmStatus_Flag_alarmsToEscalate] ? "1" : "0" ) + " : alarmsToEscalate " + _AlarmStatus_alarmsSilenced .text = (vData[GuiActions.AlarmStatus_Flag_alarmsSilenced ] ? "1" : "0" ) + " : alarmsSilenced " + break; + } + } + } +} Index: sources/gui/qml/pages/TreatmentStart.qml =================================================================== diff -u -rb9c5b0b3afc3b34d4980ecc4f023f498f80dafbc -r2f7a4176a08ba884281b370d452f19c25501a4b4 --- sources/gui/qml/pages/TreatmentStart.qml (.../TreatmentStart.qml) (revision b9c5b0b3afc3b34d4980ecc4f023f498f80dafbc) +++ sources/gui/qml/pages/TreatmentStart.qml (.../TreatmentStart.qml) (revision 2f7a4176a08ba884281b370d452f19c25501a4b4) @@ -1,6 +1,6 @@ /*! * - * Copyright (c) 2019-2019 Diality Inc. - All Rights Reserved. + * 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 @@ -28,7 +28,11 @@ * which is the default screen in the "Manager" stack */ ScreenItem { id: _root + + property int bloodFlow_MeasuredFlow_Precision: 2 + signal backPressed() + BackButton { id : _backButton onPressed: backPressed() } @@ -61,305 +65,30 @@ } } - Column { id: _BloodFlowColumn - width: 150 - spacing: 20 - topPadding: 100 - leftPadding: 10 - Text { - id: _BloodFlow_Title - text: qsTr(" Blood ") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignHCenter - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true - } - Text { - id: _BloodFlow_S32 - text: qsTr("") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _BloodFlow_F32_1 - text: qsTr("") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _BloodFlow_F32_2 - text: qsTr("") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _BloodFlow_F32_3 - text: qsTr("") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _BloodFlow_F32_4 - text: qsTr("") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _BloodFlow_F32_5 - text: qsTr("") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _BloodFlow_F32_6 - text: qsTr("") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } + TouchArea { + x: 46 // Hard Coded for now + y: 113 // Hard Coded for now + title: qsTr("FLOWS") + components: [ + TextRect { id: _bloodFlow + title: qsTr("Blood") + label: "600" // value + extra: "mL" // unit + } , + TextRect { id: _dialysateFlow + title: qsTr("Dialysate") + label: "500" // value + extra: "mL" // unit + } + ] } - - Column { id: _DialysateFlowColumn - width: 150 - spacing: 20 - topPadding: 100 - leftPadding: 180 - Text { - id: _DialysateFlow_Title - text: qsTr(" Dialysate ") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true - } - Text { - id: _DialysateFlow_S32 - text: qsTr("") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _DialysateFlow_F32_1 - text: qsTr("") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _DialysateFlow_F32_2 - text: qsTr("") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _DialysateFlow_F32_3 - text: qsTr("") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _DialysateFlow_F32_4 - text: qsTr("") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _DialysateFlow_F32_5 - text: qsTr("") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _DialysateFlow_F32_6 - text: qsTr("") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - } - - Column { id: _AlarmStatusColumn - width: 270 - spacing: 5 - topPadding: 100 - leftPadding: 400 - Text { - id: _AlarmStatus_Title - text: qsTr(" Alarm Status ") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true - } - Text { - id: _AlarmStatus_Priority - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { - id: _AlarmStatus_ID - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { - id: _AlarmStatus_EsclateIn - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_MuteTimeout - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_systemFault - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_stop - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_noClear - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_noResume - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_noRinseback - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_noEndTreatment - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_noNewTreatment - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_bypassDialyzer - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_alarmsToEscalate - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_alarmsSilenced - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - } Connections { target: _GuiView onDidActionReceive: { if ( ! visible ) return; switch(vAction) { case GuiActions.BloodFlow: - _BloodFlow_S32 .text = vData[GuiActions.BloodFlow_FlowSetPoint ]; - _BloodFlow_F32_1.text = vData[GuiActions.BloodFlow_MeasuredFlow ].toFixed(2); - _BloodFlow_F32_2.text = vData[GuiActions.BloodFlow_RotorSpeed ].toFixed(2); - _BloodFlow_F32_3.text = vData[GuiActions.BloodFlow_MotorSpeed ].toFixed(2); - _BloodFlow_F32_4.text = vData[GuiActions.BloodFlow_MotorCtlSpeed ].toFixed(2); - _BloodFlow_F32_5.text = vData[GuiActions.BloodFlow_MotorCtlCurrent].toFixed(2); - _BloodFlow_F32_6.text = vData[GuiActions.BloodFlow_PWMDtCycle ].toFixed(2) + "%"; - break; - case GuiActions.BloodFlow: - _DialysateFlow_S32 .text = vData[GuiActions.DialysateFlow_FlowSetPoint ]; - _DialysateFlow_F32_1.text = vData[GuiActions.DialysateFlow_MeasuredFlow ].toFixed(2); - _DialysateFlow_F32_2.text = vData[GuiActions.DialysateFlow_RotorSpeed ].toFixed(2); - _DialysateFlow_F32_3.text = vData[GuiActions.DialysateFlow_MotorSpeed ].toFixed(2); - _DialysateFlow_F32_4.text = vData[GuiActions.DialysateFlow_MotorCtlSpeed ].toFixed(2); - _DialysateFlow_F32_5.text = vData[GuiActions.DialysateFlow_MotorCtlCurrent].toFixed(2); - _DialysateFlow_F32_6.text = vData[GuiActions.DialysateFlow_PWMDtCycle ].toFixed(2) + "%"; - break; - case GuiActions.AlarmStatus: - _AlarmStatus_Priority .text = _GuiView.alarmPriorityName(vData[GuiActions.AlarmStatus_Priority ]) - _AlarmStatus_ID .text = _GuiView.alarmIDName (vData[GuiActions.AlarmStatus_AlarmID ]) - _AlarmStatus_EsclateIn .text = "Escalates In : " + vData[GuiActions.AlarmStatus_EscalateIn ] - _AlarmStatus_MuteTimeout .text = "MuteTimeout : " + vData[GuiActions.AlarmStatus_MuteTimeout ] - _AlarmStatus_systemFault .text = (vData[GuiActions.AlarmStatus_Flag_systemFault ] ? "1" : "0" ) + " : systemFault " - _AlarmStatus_stop .text = (vData[GuiActions.AlarmStatus_Flag_stop ] ? "1" : "0" ) + " : stop " - _AlarmStatus_noClear .text = (vData[GuiActions.AlarmStatus_Flag_noClear ] ? "1" : "0" ) + " : noClear " - _AlarmStatus_noResume .text = (vData[GuiActions.AlarmStatus_Flag_noResume ] ? "1" : "0" ) + " : noResume " - _AlarmStatus_noRinseback .text = (vData[GuiActions.AlarmStatus_Flag_noRinseback ] ? "1" : "0" ) + " : noRinseback " - _AlarmStatus_noEndTreatment .text = (vData[GuiActions.AlarmStatus_Flag_noEndTreatment ] ? "1" : "0" ) + " : noEndTreatment " - _AlarmStatus_noNewTreatment .text = (vData[GuiActions.AlarmStatus_Flag_noNewTreatment ] ? "1" : "0" ) + " : noNewTreatment " - _AlarmStatus_bypassDialyzer .text = (vData[GuiActions.AlarmStatus_Flag_bypassDialyzer ] ? "1" : "0" ) + " : bypassDialyzer " - _AlarmStatus_alarmsToEscalate.text = (vData[GuiActions.AlarmStatus_Flag_alarmsToEscalate] ? "1" : "0" ) + " : alarmsToEscalate " - _AlarmStatus_alarmsSilenced .text = (vData[GuiActions.AlarmStatus_Flag_alarmsSilenced ] ? "1" : "0" ) + " : alarmsSilenced " - break; + _bloodFlow.label = vData[GuiActions.BloodFlow_MeasuredFlow ].toFixed(BloodFlow_MeasuredFlow_Precision); } } }