Index: denali.pro =================================================================== diff -u -r35959dd708a5c4fdf02626306441e5a77e7f7782 -rfe9182d85a7e707c5a476331e03ed493371f7f7f --- denali.pro (.../denali.pro) (revision 35959dd708a5c4fdf02626306441e5a77e7f7782) +++ denali.pro (.../denali.pro) (revision fe9182d85a7e707c5a476331e03ed493371f7f7f) @@ -60,6 +60,7 @@ sources/model/mtreatmentflows.h \ sources/model/mtreatmentoutletflow.h \ sources/model/mtreatmenttime.h \ + sources/view/vtreatmentpressureocclusion.h \ sources/view/vview.h \ sources/view/vpoweroff.h \ sources/view/vtreatmentbloodflow.h \ @@ -102,6 +103,7 @@ sources/view/vpoweroff.cpp \ sources/view/vtreatmentbloodflow.cpp \ sources/view/vtreatmentdialysateflow.cpp \ + sources/view/vtreatmentpressureocclusion.cpp \ sources/view/vtreatmentultrafiltration.cpp \ sources/view/vtreatmenttime.cpp \ sources/view/valarmstatus.cpp \ Index: sources/gui/qml/pages/treatment/sections/TreatmentPressure.qml =================================================================== diff -u -rcd7de5f6d239a11615ba8c6c03339a10996486ca -rfe9182d85a7e707c5a476331e03ed493371f7f7f --- sources/gui/qml/pages/treatment/sections/TreatmentPressure.qml (.../TreatmentPressure.qml) (revision cd7de5f6d239a11615ba8c6c03339a10996486ca) +++ sources/gui/qml/pages/treatment/sections/TreatmentPressure.qml (.../TreatmentPressure.qml) (revision fe9182d85a7e707c5a476331e03ed493371f7f7f) @@ -16,6 +16,7 @@ import QtQuick 2.12 // Project +import VTreatmentPressureOcclusion 0.1; // Qml imports import "qrc:/globals" @@ -33,26 +34,24 @@ isTouchable: true orientation: TouchArea.Orientation.Horizontal title: qsTr("PRESSURE") + " " + qsTr("(mmHg)") + + VTreatmentPressureOcclusion { id: vTreatmentPressureOcclusion } + RangeBar { id: _arterialRangeBar x: 0 y: 75 width : 175 height : 15 rangebar.color: Colors.pressuresArterialBar - value : 0 + value : vTreatmentPressureOcclusion.pressureocclusion_ArterialPressure // TEST : simulation code minimum : -400 maximum : 400 lowerBound: -300 upperBound: 100 - NumberAnimation on value { - duration: 70000 - from: _arterialRangeBar.minimum - to: _arterialRangeBar.maximum - loops: Animation.Infinite - } + Text { id: _arterialText anchors { left: parent.left @@ -72,20 +71,14 @@ height : 15 rangebar.color: Colors.pressuresVenousBar - value : 0 + value : vTreatmentPressureOcclusion.pressureocclusion_VenousPressure // TEST : simulation code minimum: -100 maximum: 800 lowerBound: -100 upperBound: 500 - NumberAnimation on value { - duration: 70000 - from : _venousRangeBar.minimum - to : _venousRangeBar.maximum - loops : Animation.Infinite - } Text { id: _venousText anchors { left: parent.left Index: sources/view/vtreatmentpressureocclusion.cpp =================================================================== diff -u --- sources/view/vtreatmentpressureocclusion.cpp (revision 0) +++ sources/view/vtreatmentpressureocclusion.cpp (revision fe9182d85a7e707c5a476331e03ed493371f7f7f) @@ -0,0 +1,28 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, + * IN PART OR IN WHOLE, + * WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * file vtreatmentpressureocclusion.cpp + * date 3/24/2020 + * author Behrouz NematiPour + * + */ +#include "vtreatmentpressureocclusion.h" + +// Project +#include "guicontroller.h" + +VIEW_DEF(VTreatmentPressureOcclusion, PressureOcclusionData) + +void VTreatmentPressureOcclusion::onActionReceive(const PressureOcclusionData &vData) +{ + pressureocclusion_ArterialPressure ( vData.mArterialPressure ); + pressureocclusion_VenousPressure ( vData.mVenousPressure ); + pressureocclusion_BloodPumpOcclusion ( vData.mBloodPumpOcclusion ); + pressureocclusion_DialysateInletPumpOcclusion ( vData.mDialysateInletPumpOcclusion ); + pressureocclusion_DialysateOutletPumpOcclusion ( vData.mDialysateOutletPumpOcclusion ); +} Index: sources/view/vtreatmentpressureocclusion.h =================================================================== diff -u --- sources/view/vtreatmentpressureocclusion.h (revision 0) +++ sources/view/vtreatmentpressureocclusion.h (revision fe9182d85a7e707c5a476331e03ed493371f7f7f) @@ -0,0 +1,39 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, + * IN PART OR IN WHOLE, + * WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * file vtreatmentpressureocclusion.h + * date 3/24/2020 + * author Behrouz NematiPour + * + */ +#pragma once + +// Qt +#include + +// Project +#include "mmodel.h" +#include "vview.h" + +// namespace +namespace View { + +class VTreatmentPressureOcclusion : public QObject +{ + Q_OBJECT + + PROPERTY( float, pressureocclusion_ArterialPressure , 0, false) + PROPERTY( float, pressureocclusion_VenousPressure , 0, false) + PROPERTY( float, pressureocclusion_BloodPumpOcclusion , 0, false) + PROPERTY( float, pressureocclusion_DialysateInletPumpOcclusion , 0, false) + PROPERTY( float, pressureocclusion_DialysateOutletPumpOcclusion , 0, false) + + VIEW_DEC(VTreatmentPressureOcclusion, PressureOcclusionData) + +}; +} Index: sources/view/vview.h =================================================================== diff -u -r3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7 -rfe9182d85a7e707c5a476331e03ed493371f7f7f --- sources/view/vview.h (.../vview.h) (revision 3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7) +++ sources/view/vview.h (.../vview.h) (revision fe9182d85a7e707c5a476331e03ed493371f7f7f) @@ -13,6 +13,25 @@ */ #pragma once +/*! + * \brief Denali Message UI usage instruction + * \details This comment explains how to use a Denali Message populated data in Denali UI Application + * + * 1 - Look at the message structure in the "message list.xlsx" + * + * 2 - View Implementation : + * Implement a view like VPressureOcclusion by copy/paste the closest model .h/.cpp file + * and adding it to project and modify to fit the new model. + * + * 3 - Register View : + * Add the required lines like the other models in the vview.h file. + * + * 4 - Usage in UI : + * Import : import VTreatmentPressureOcclusion 0.1; + * Instantiate : VTreatmentPressureOcclusion { id: vTreatmentPressureOcclusion } + * Access : value: vTreatmentPressureOcclusion.pressureocclusion_ArterialPressure + * + */ //--------------------------------------------------------------------------------// //--------------------------------------------------------------------------------// // The child declaration in header @@ -42,6 +61,7 @@ #include "vtreatmentbloodflow.h" #include "vtreatmentdialysateflow.h" #include "vtreatmentultrafiltration.h" +#include "vtreatmentpressureocclusion.h" #include "vtreatmenttime.h" #include "valarmstatus.h" #include "vpoweroff.h" @@ -50,6 +70,7 @@ REGISTER_TYPE( VTreatmentBloodFlow ) \ REGISTER_TYPE( VTreatmentDialysateFlow ) \ REGISTER_TYPE( VTreatmentUltrafiltration ) \ + REGISTER_TYPE( VTreatmentPressureOcclusion ) \ REGISTER_TYPE( VTreatmentTime ) \ REGISTER_TYPE( VAlarmStatus ) \ REGISTER_TYPE( VPowerOff )