Index: denali.pro =================================================================== diff -u -rd4b88173e0d4a683a315d2fc57b8e1ec356b1232 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- denali.pro (.../denali.pro) (revision d4b88173e0d4a683a315d2fc57b8e1ec356b1232) +++ denali.pro (.../denali.pro) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -38,11 +38,19 @@ HEADERS += \ common/AlarmDefs.h \ + common/DGDefs.h \ + common/HDDefs.h \ common/MsgDefs.h \ sources/main.h \ sources/maintimer.h \ + sources/model/mloadcellreadings.h \ + sources/model/mtemperaturesensors.h \ sources/model/mtreatmentadjustblooddialysateresponse.h \ sources/model/mtreatmentadjustdurationresponse.h \ + sources/model/mtreatmentadjustrequests.h \ + sources/model/mtreatmentadjustultrafiltrationconfirmresponse.h \ + sources/model/mtreatmentadjustultrafiltrationstateresponse.h \ + sources/model/mtreatmentadjustultrafiltrationeditresponse.h \ sources/model/mtreatmentpressureocclusion.h \ sources/model/mtreatmentranges.h \ sources/threads.h \ @@ -66,7 +74,14 @@ sources/model/mtreatmentflows.h \ sources/model/mtreatmentoutletflow.h \ sources/model/mtreatmenttime.h \ - sources/view/vtreatmentadjustmentsresponse.h \ + sources/view/vloadcellreadings.h \ + sources/view/vtemperaturesensors.h \ + sources/view/vtreatmentadjustmentduration.h \ + sources/view/vtreatmentadjustmentflows.h \ + sources/view/vtreatmentadjustmentresponsebase.h \ + sources/view/vtreatmentadjustmentultrafiltrationconfirm.h \ + sources/view/vtreatmentadjustmentultrafiltrationedit.h \ + sources/view/vtreatmentadjustmentultrafiltrationstate.h \ sources/view/vtreatmentpressureocclusion.h \ sources/view/vtreatmentranges.h \ sources/view/vview.h \ @@ -88,8 +103,13 @@ SOURCES += \ main.cpp \ sources/maintimer.cpp \ + sources/model/mloadcellreadings.cpp \ + sources/model/mtemperaturesensors.cpp \ sources/model/mtreatmentadjustblooddialysateresponse.cpp \ sources/model/mtreatmentadjustdurationresponse.cpp \ + sources/model/mtreatmentadjustultrafiltrationconfirmresponse.cpp \ + sources/model/mtreatmentadjustultrafiltrationstateresponse.cpp \ + sources/model/mtreatmentadjustultrafiltrationeditresponse.cpp \ sources/model/mtreatmentpressureocclusion.cpp \ sources/model/mtreatmentranges.cpp \ sources/threads.cpp \ @@ -111,8 +131,15 @@ sources/model/mtreatmentoutletflow.cpp \ sources/model/mtreatmenttime.cpp \ sources/model/malarmstatus.cpp \ + sources/view/vloadcellreadings.cpp \ sources/view/vpoweroff.cpp \ - sources/view/vtreatmentadjustmentsresponse.cpp \ + sources/view/vtemperaturesensors.cpp \ + sources/view/vtreatmentadjustmentduration.cpp \ + sources/view/vtreatmentadjustmentflows.cpp \ + sources/view/vtreatmentadjustmentresponsebase.cpp \ + sources/view/vtreatmentadjustmentultrafiltrationconfirm.cpp \ + sources/view/vtreatmentadjustmentultrafiltrationedit.cpp \ + sources/view/vtreatmentadjustmentultrafiltrationstate.cpp \ sources/view/vtreatmentbloodflow.cpp \ sources/view/vtreatmentdialysateflow.cpp \ sources/view/vtreatmentpressureocclusion.cpp \ @@ -135,9 +162,11 @@ DEFINES += \ VER_MAJOR="\\\"${majorVersion}\\\"" \ VER_MINOR="\\\"${minorVersion}\\\"" \ + VER_MICRO="\\\"${microVersion}\\\"" \ VER_REVIS="\\\"${buildNumber}\\\"" \ VER_MAJOR_DEV=\\\"0\\\" \ VER_MINOR_DEV=\\\"0\\\" \ + VER_MICRO_DEV=\\\"0\\\" \ VER_REVIS_DEV=\\\"$$system( date "+%m%d%H%M" )\\\" \ VER_APPLY=\\\"$$system( touch -m main.cpp)\\\" @@ -269,3 +298,5 @@ qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target + +DISTFILES += Index: denali.pro.user =================================================================== diff -u -rd5ed5f9460543b58a9195a6e33668b8058f9893a -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- denali.pro.user (.../denali.pro.user) (revision d5ed5f9460543b58a9195a6e33668b8058f9893a) +++ denali.pro.user (.../denali.pro.user) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -1,6 +1,6 @@ - + EnvironmentId @@ -60,7 +60,20 @@ ProjectExplorer.Project.PluginSettings - + + + true + Builtin.Questionable + + true + Builtin.DefaultTidyAndClazy + 2 + + + + true + + ProjectExplorer.Project.Target.0 @@ -72,19 +85,23 @@ 0 0 - true - 2 /home/denali/Project/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Debug - /home/denali/Project/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Debug true + qmake + QtProjectManager.QMakeBuildStep + false false + false + false true + Make + Qt4ProjectManager.MakeStep false @@ -100,6 +117,8 @@ true + Make + Qt4ProjectManager.MakeStep true @@ -115,26 +134,30 @@ 2 false + Debug Debug Qt4ProjectManager.Qt4BuildConfiguration 2 - 2 - 2 + true - true - 2 /home/denali/Project/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Release - /home/denali/Project/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Release true + qmake + QtProjectManager.QMakeBuildStep + false true + false + false true + Make + Qt4ProjectManager.MakeStep false @@ -150,6 +173,8 @@ true + Make + Qt4ProjectManager.MakeStep true @@ -165,26 +190,30 @@ 2 false + Release Release Qt4ProjectManager.Qt4BuildConfiguration 0 - 2 - 2 + true - true - 2 /home/denali/Project/tmp/build/unittest/tst_threads - /home/denali/Project/tmp/build/unittest/tst_threads true + qmake + QtProjectManager.QMakeBuildStep + false CONFIG+=tst_threads CONFIG+=CodeCoverage false + false + false true + Make + Qt4ProjectManager.MakeStep false @@ -197,27 +226,35 @@ %{buildDir}/denali %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true -m denali.csmes -t UnitTests denali.csexe cmcsexeimport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --html=Coverage/index cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --csv-excel=Coverage/coverage.csv cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep 6 @@ -228,6 +265,8 @@ true + Make + Qt4ProjectManager.MakeStep true @@ -245,26 +284,30 @@ PATH=/opt/SquishCoco/bin:/opt/SquishCoco/wrapper/bin:/opt/Qt5.12.5/5.12.5/gcc_64/bin:/usr/bin:/home/denali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin + tst_threads tst_threads Qt4ProjectManager.Qt4BuildConfiguration 2 - 2 - 2 + true - true - 2 /home/denali/Project/tmp/build/unittest/tst_messaging - /home/denali/Project/tmp/build/unittest/tst_messaging true + qmake + QtProjectManager.QMakeBuildStep + false CONFIG+=tst_messaging CONFIG+=CodeCoverage false + false + false true + Make + Qt4ProjectManager.MakeStep false @@ -277,27 +320,35 @@ %{buildDir}/denali %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true -m denali.csmes -t UnitTests denali.csexe cmcsexeimport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --html=Coverage/index cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --csv-excel=Coverage/coverage.csv cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep 6 @@ -308,6 +359,8 @@ true + Make + Qt4ProjectManager.MakeStep true @@ -325,26 +378,30 @@ PATH=/opt/SquishCoco/bin:/opt/SquishCoco/wrapper/bin:/opt/Qt5.12.5/5.12.5/gcc_64/bin:/usr/bin:/home/denali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin + tst_messaging tst_messaging Qt4ProjectManager.Qt4BuildConfiguration 2 - 2 - 2 + true - true - 2 /home/denali/Project/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Profile - /home/denali/Project/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Profile true + qmake + QtProjectManager.QMakeBuildStep + false true + false + false true + Make + Qt4ProjectManager.MakeStep false @@ -360,6 +417,8 @@ true + Make + Qt4ProjectManager.MakeStep true @@ -375,26 +434,30 @@ 2 false + Profile Profile Qt4ProjectManager.Qt4BuildConfiguration 0 - 2 - 2 + true - true - 2 /home/denali/Project/tmp/build/unittest/tst_canbus - /home/denali/Project/tmp/build/unittest/tst_canbus true + qmake + QtProjectManager.QMakeBuildStep + false CONFIG+=tst_canbus CONFIG+=CodeCoverage false + false + false true + Make + Qt4ProjectManager.MakeStep false @@ -407,27 +470,35 @@ %{buildDir}/denali %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true -m denali.csmes -t UnitTests denali.csexe cmcsexeimport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --html=Coverage/index cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --csv-excel=Coverage/coverage.csv cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep 6 @@ -438,6 +509,8 @@ true + Make + Qt4ProjectManager.MakeStep true @@ -455,26 +528,30 @@ PATH=/opt/SquishCoco/bin:/opt/SquishCoco/wrapper/bin:/opt/Qt5.12.5/5.12.5/gcc_64/bin:/usr/bin:/home/denali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin + tst_canbus tst_canbus Qt4ProjectManager.Qt4BuildConfiguration 2 - 2 - 2 + true - true - 2 /home/denali/Project/tmp/build/unittest/tst_logging - /home/denali/Project/tmp/build/unittest/tst_logging true + qmake + QtProjectManager.QMakeBuildStep + false CONFIG+=tst_logging CONFIG+=CodeCoverage false + false + false true + Make + Qt4ProjectManager.MakeStep false @@ -487,27 +564,35 @@ %{buildDir}/denali %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true -m denali.csmes -t UnitTests denali.csexe cmcsexeimport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --html=Coverage/index cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --csv-excel=Coverage/coverage.csv cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep 6 @@ -518,6 +603,8 @@ true + Make + Qt4ProjectManager.MakeStep true @@ -535,26 +622,30 @@ PATH=/opt/SquishCoco/bin:/opt/SquishCoco/wrapper/bin:/opt/Qt5.12.5/5.12.5/gcc_64/bin:/usr/bin:/home/denali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin + tst_logging tst_logging Qt4ProjectManager.Qt4BuildConfiguration 2 - 2 - 2 + true - true - 2 /home/denali/Project/tmp/build/unittest/tst_utilities - /home/denali/Project/tmp/build/unittest/tst_utilities true + qmake + QtProjectManager.QMakeBuildStep + false CONFIG+=tst_utilities CONFIG+=CodeCoverage true + false + false true + Make + Qt4ProjectManager.MakeStep false @@ -567,27 +658,35 @@ %{buildDir}/denali %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true -m denali.csmes -t UnitTests denali.csexe cmcsexeimport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --html=Coverage/index cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --csv-excel=Coverage/coverage.csv cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep 6 @@ -598,6 +697,8 @@ true + Make + Qt4ProjectManager.MakeStep true @@ -615,26 +716,30 @@ PATH=/opt/SquishCoco/bin:/opt/SquishCoco/wrapper/bin:/opt/Qt5.12.5/5.12.5/gcc_64/bin:/usr/bin:/home/denali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin + tst_utilities tst_utilities Qt4ProjectManager.Qt4BuildConfiguration 2 - 2 - 2 + true - true - 2 /home/denali/Project/tmp/build/unittest/tst_acknow - /home/denali/Project/tmp/build/unittest/tst_acknow true + qmake + QtProjectManager.QMakeBuildStep + false CONFIG+=tst_acknow CONFIG+=CodeCoverage true + false + false true + Make + Qt4ProjectManager.MakeStep false @@ -647,27 +752,35 @@ %{buildDir}/denali %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true -m denali.csmes -t UnitTests denali.csexe cmcsexeimport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --html=Coverage/index cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --csv-excel=Coverage/coverage.csv cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep 6 @@ -678,6 +791,8 @@ true + Make + Qt4ProjectManager.MakeStep true @@ -695,26 +810,30 @@ PATH=/opt/SquishCoco/bin:/opt/SquishCoco/wrapper/bin:/opt/Qt5.12.5/5.12.5/gcc_64/bin:/usr/bin:/home/denali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin + tst_acknow tst_acknow Qt4ProjectManager.Qt4BuildConfiguration 2 - 2 - 2 + true - true - 2 /home/denali/Project/tmp/build/unittest/tst_models - /home/denali/Project/tmp/build/unittest/tst_models true + qmake + QtProjectManager.QMakeBuildStep + false CONFIG+=tst_models CONFIG+=CodeCoverage false + false + false true + Make + Qt4ProjectManager.MakeStep false @@ -727,27 +846,35 @@ %{buildDir}/denali %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true -m denali.csmes -t UnitTests denali.csexe cmcsexeimport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --html=Coverage/index cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --csv-excel=Coverage/coverage.csv cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep 6 @@ -758,6 +885,8 @@ true + Make + Qt4ProjectManager.MakeStep true @@ -775,26 +904,30 @@ PATH=/opt/SquishCoco/bin:/opt/SquishCoco/wrapper/bin:/opt/Qt5.12.5/5.12.5/gcc_64/bin:/usr/bin:/home/denali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin + tst_models tst_models Qt4ProjectManager.Qt4BuildConfiguration 2 - 2 - 2 + true - true - 2 /home/denali/Project/tmp/build/unittest/tst_initializations - /home/denali/Project/tmp/build/unittest/tst_initializations true + qmake + QtProjectManager.QMakeBuildStep + false CONFIG+=tst_initializations CONFIG+=CodeCoverage false + false + false true + Make + Qt4ProjectManager.MakeStep false @@ -807,27 +940,35 @@ %{buildDir}/denali %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true -m denali.csmes -t UnitTests denali.csexe cmcsexeimport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --html=Coverage/index cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --csv-excel=Coverage/coverage.csv cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep 6 @@ -838,6 +979,8 @@ true + Make + Qt4ProjectManager.MakeStep true @@ -855,26 +998,30 @@ PATH=/opt/SquishCoco/bin:/opt/SquishCoco/wrapper/bin:/opt/Qt5.12.5/5.12.5/gcc_64/bin:/usr/bin:/home/denali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin + tst_initializations tst_initializations Qt4ProjectManager.Qt4BuildConfiguration 2 - 2 - 2 + true - true - 2 /home/denali/Project/tmp/build/unittest/tst_views - /home/denali/Project/tmp/build/unittest/tst_views true + qmake + QtProjectManager.QMakeBuildStep + false CONFIG+=tst_views CONFIG+=CodeCoverage false + false + false true + Make + Qt4ProjectManager.MakeStep false @@ -887,27 +1034,35 @@ %{buildDir}/denali %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true -m denali.csmes -t UnitTests denali.csexe cmcsexeimport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --html=Coverage/index cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep true --csmes=denali.csmes --csv-excel=Coverage/coverage.csv cmreport %{buildDir} + Custom Process Step + ProjectExplorer.ProcessStep 6 @@ -918,6 +1073,8 @@ true + Make + Qt4ProjectManager.MakeStep true @@ -935,11 +1092,11 @@ PATH=/opt/SquishCoco/bin:/opt/SquishCoco/wrapper/bin:/opt/Qt5.12.5/5.12.5/gcc_64/bin:/usr/bin:/home/denali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin + tst_views tst_views Qt4ProjectManager.Qt4BuildConfiguration 2 - 2 - 2 + true 12 @@ -950,8 +1107,8 @@ ProjectExplorer.BuildSteps.Deploy 1 - - false + Deploy Configuration + ProjectExplorer.DefaultDeployConfiguration 1 @@ -963,14 +1120,6 @@ 250 - - -e - cpu-cycles - --call-graph - dwarf,4096 - -F - 250 - -F true 4096 @@ -1016,11 +1165,11 @@ 2 + denali + Qt4ProjectManager.Qt4RunConfiguration:/home/denali/Project/application/denali.pro - /home/denali/Project/application/denali.pro - false - + 3768 false true true @@ -1039,23 +1188,27 @@ Qt 5.12.5 (iMX8) Qt 5.12.5 (iMX8) {5d6458ef-f917-4aef-a092-c77bbe106149} - 0 + 1 0 0 - true - 2 /home/denali/Project/tmp/build/denali-Qt_5_12_5_iMX8-Debug - /home/denali/Project/tmp/build/denali-Qt_5_12_5_iMX8-Debug true + qmake + QtProjectManager.QMakeBuildStep + false false + false + false true + Make + Qt4ProjectManager.MakeStep false @@ -1071,6 +1224,8 @@ true + Make + Qt4ProjectManager.MakeStep true @@ -1086,26 +1241,30 @@ 2 false + Debug Debug Qt4ProjectManager.Qt4BuildConfiguration 2 - 2 - 2 + true - true - 2 /home/denali/Project/tmp/build/denali-Qt_5_12_5_iMX8-Release - /home/denali/Project/tmp/build/denali-Qt_5_12_5_iMX8-Release true + qmake + QtProjectManager.QMakeBuildStep + false - true + false + false + false true + Make + Qt4ProjectManager.MakeStep false @@ -1121,6 +1280,8 @@ true + Make + Qt4ProjectManager.MakeStep true @@ -1136,26 +1297,30 @@ 2 false + Release Release Qt4ProjectManager.Qt4BuildConfiguration 0 - 2 - 2 + true - true - 2 /home/denali/Project/tmp/build/denali-Qt_5_12_5_iMX8-Profile - /home/denali/Project/tmp/build/denali-Qt_5_12_5_iMX8-Profile true + qmake + QtProjectManager.QMakeBuildStep + false true + false + false true + Make + Qt4ProjectManager.MakeStep false @@ -1171,6 +1336,8 @@ true + Make + Qt4ProjectManager.MakeStep true @@ -1186,17 +1353,19 @@ 2 false + Profile Profile Qt4ProjectManager.Qt4BuildConfiguration 0 - 2 - 2 + true 3 true + Check for free disk space + RemoteLinux.CheckForFreeDiskSpaceStep @@ -1209,6 +1378,8 @@ true + Kill current application instance + RemoteLinux.KillAppStep @@ -1219,6 +1390,8 @@ true + Deploy files via rsync + RemoteLinux.RsyncDeployStep @@ -1235,8 +1408,8 @@ ProjectExplorer.BuildSteps.Deploy 1 - - false + Deploy to Remote Linux Host + DeployToGenericLinux 1 @@ -1248,14 +1421,6 @@ 250 - - -e - cpu-cycles - --call-graph - dwarf,4096 - -F - 250 - -F true 4096 @@ -1301,15 +1466,14 @@ 1 - denali (on Generic Linux Device (iMX8)) + denali (on Generic Linux Device) + denali (on Generic Linux Device) RemoteLinuxRunConfiguration:/home/denali/Project/application/denali.pro - /home/denali/Project/application/denali.pro 1 false - false - + 3768 false true false Index: denali.qrc =================================================================== diff -u -r670f257c9b88d3e5506eccaad111bec914102a72 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- denali.qrc (.../denali.qrc) (revision 670f257c9b88d3e5506eccaad111bec914102a72) +++ denali.qrc (.../denali.qrc) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -3,11 +3,13 @@ sources/gui/qml/pages/ManagerStack.qml sources/gui/qml/pages/SettingsStack.qml sources/gui/qml/pages/SettingsHome.qml + sources/gui/qml/pages/Diagnostics.qml sources/gui/qml/pages/ManagerHome.qml sources/gui/qml/dialogs/PowerOff.qml sources/gui/qml/dialogs/AutoHideInfo.qml + sources/gui/qml/dialogs/NotificationDialog.qml resources/images/Settings_gear_setting_tools-128.png @@ -18,6 +20,9 @@ resources/images/ArrowRight.png resources/images/logo d Dark Transparent.png resources/images/Close.png + resources/images/alarm.svg + resources/images/bell.svg + resources/images/bell-off.svg resources/images/Back.png resources/images/Pause.png resources/images/Resume.png @@ -39,6 +44,7 @@ sources/gui/qml/components/USBButton.qml sources/gui/qml/components/ExportButton.qml sources/gui/qml/components/TouchArea.qml + sources/gui/qml/components/SettingsItem.qml sources/gui/qml/components/TextRect.qml sources/gui/qml/components/Background.qml sources/gui/qml/components/Line.qml @@ -57,6 +63,7 @@ sources/gui/qml/components/ConfirmButton.qml sources/gui/qml/components/TickMarks.qml sources/gui/qml/components/NotificationBar.qml + sources/gui/qml/components/NotificationBar2.qml sources/gui/qml/components/UltrafiltrationButton.qml sources/gui/qml/components/ImageWave.qml sources/gui/qml/components/ImageClock.qml Index: main.cpp =================================================================== diff -u -rd4b88173e0d4a683a315d2fc57b8e1ec356b1232 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- main.cpp (.../main.cpp) (revision d4b88173e0d4a683a315d2fc57b8e1ec356b1232) +++ main.cpp (.../main.cpp) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -84,7 +84,7 @@ * -v, --version Displays version information. \n * -c, --canOut Show the Can Frame Output \n * -m, --msgOut Show the Message Output \n - * -0, --disable-keep-awake Disable send low priority, empty message on \n + * -0, --enable-keep-awake Enable send low priority, empty message on \n * the CANBus just to keep UI board CAN driver \n * awake \n * -i, --fake-interval Test fake message interval(ms) \n @@ -112,7 +112,8 @@ QCoreApplication::translate("main", "Show the Message Output")); parser.addOption(optionConsoleoutFrameInterface); - // --- -0 : disable-keep-awake (the fast mode) + + // --- -0 : enable-keep-awake (the fast mode) QCommandLineOption optionSendEmptyKeepAwake(QStringList() << "0" << "enable-keep-awake", QCoreApplication::translate("main", "Enable send low priority, empty message on the CANBus just to keep UI board CAN driver awake")); parser.addOption(optionSendEmptyKeepAwake); @@ -171,6 +172,35 @@ } } } +/*! + * \brief setApplicationVersion + * \details sets up the application version regarding the environment valiables + * which are set by bamboo and if those are not set value of 0 will be used + * and revision(build) version will be set to current date/time. + */ +void setApplicationVersion() { + QString ver_major = QString("%1").arg(VER_MAJOR); + if (ver_major.isEmpty()) { + ver_major = VER_MAJOR_DEV; + } + QString ver_minor = QString("%1").arg(VER_MINOR); + if (ver_minor.isEmpty()) { + ver_minor = VER_MINOR_DEV; + } + QString ver_micro = QString("%1").arg(VER_MICRO); + if (ver_micro.isEmpty()) { + ver_micro = VER_MICRO_DEV; + } + QString ver_revis = QString("%1").arg(VER_REVIS); + if (ver_revis.isEmpty()) { + ver_revis = VER_REVIS_DEV; + } + QCoreApplication::setApplicationVersion(QString("%1.%2.%3.%4") + .arg(ver_major) + .arg(ver_minor) + .arg(ver_micro) + .arg(ver_revis)); +} #ifdef UNIT_TEST #include TEST_CLASS_INCLUDE @@ -202,22 +232,7 @@ app.thread()->setObjectName("Main Thread"); //! - Setting the application version regarding the Bamboo build number. - QString ver_major = QString("%1").arg(VER_MAJOR); - if (ver_major.isEmpty()) { - ver_major = VER_MAJOR_DEV; - } - QString ver_minor = QString("%1").arg(VER_MINOR); - if (ver_minor.isEmpty()) { - ver_minor = VER_MINOR_DEV; - } - QString ver_revis = QString("%1").arg(VER_REVIS); - if (ver_revis.isEmpty()) { - ver_revis = VER_REVIS_DEV; - } - QCoreApplication::setApplicationVersion(QString("%1.%2.%3") - .arg(ver_major) - .arg(ver_minor) - .arg(ver_revis)); + setApplicationVersion(); //! - Parse the command line arguments commandlineParse(); Index: sources/applicationcontroller.cpp =================================================================== diff -u -reece7acacf84e8cc34b830f6b5ab3f112823a905 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/applicationcontroller.cpp (.../applicationcontroller.cpp) (revision eece7acacf84e8cc34b830f6b5ab3f112823a905) +++ sources/applicationcontroller.cpp (.../applicationcontroller.cpp) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -16,13 +16,12 @@ // Qt // Project -#include "guiglobals.h" #include "maintimer.h" -#include "guicontroller.h" #include "messagedispatcher.h" #include "logger.h" #include "usbwatcher.h" #include "filehandler.h" +#include "guicontroller.h" /*! * \brief ApplicationController::ApplicationController @@ -98,6 +97,9 @@ connect(&_MessageDispatcher, SIGNAL(didActionReceive(GuiActionType, const QVariantList &)), this , SLOT( onActionReceive(GuiActionType, const QVariantList &))); + connect(&_MessageDispatcher, SIGNAL(didFailedTransmit(Sequence)), + this , SLOT(onFailedTransmit(Sequence))); + connect(&_GuiController , SIGNAL(didUSBDriveUmount()), this , SLOT( onUSBDriveUmount())); connect(&_USBWatcher , SIGNAL(didUSBDriveMount ()), @@ -152,6 +154,16 @@ // coco end /*! + * \brief ApplicationController::onFailedTransmit + * Called when we failed to get a response back from the HD + * \param seq - The sequence that failed to send to the HD. + */ +void ApplicationController::onFailedTransmit(Sequence seq) +{ + emit didFailedTransmit(seq); +} + +/*! * \brief Process the requested action * \details Processes the requested action * \param vAction - User requested Action Index: sources/applicationcontroller.h =================================================================== diff -u -reece7acacf84e8cc34b830f6b5ab3f112823a905 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/applicationcontroller.h (.../applicationcontroller.h) (revision eece7acacf84e8cc34b830f6b5ab3f112823a905) +++ sources/applicationcontroller.h (.../applicationcontroller.h) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -21,6 +21,7 @@ #include "guiglobals.h" #include "applicationpost.h" #include "mmodel.h" +#include "messageglobals.h" // define #define _ApplicationController ApplicationController::I() @@ -30,8 +31,8 @@ // namespace using namespace Gui; +using namespace Can; - class ApplicationController : public QObject { Q_OBJECT @@ -66,10 +67,10 @@ void createFakeSeqAtBeginLongMessage(QVariantList &vData, const int vFakeDataLen); private slots: // Should be private for thread safety and is connected internally. - void onActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG - void onActionTransmit(GuiActionType vAction, const QVariantList &vData); // UI => HD/DG + void onActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG + void onActionTransmit(GuiActionType vAction, const QVariantList &vData); // UI => HD/DG - void onMainTimerTimeout(); + void onMainTimerTimeout(); void onUSBDriveMount (); void onUSBDriveUmount(); @@ -78,6 +79,8 @@ void onExportLog (); void onExport (); + void onFailedTransmit(Sequence seq); + signals: void didActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG void didActionTransmit(GuiActionType vAction, const QVariantList &vData); // UI => HD/DG @@ -88,6 +91,10 @@ void didExport (); + void didAdjustBloodDialysateFlows(quint32 vBloodFlow, quint32 vDialysateFlow); + void didAdjustDuration(quint32 vDuration); + void didFailedTransmit(Sequence seq); + // ---- Signal/Slots ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS ACTION_RECEIVE_MODEL_BRIDGE_DEFINITIONS Index: sources/canbus/messagedispatcher.cpp =================================================================== diff -u -r1a364403f0d1839397054b1eca4d51201b0cf943 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/canbus/messagedispatcher.cpp (.../messagedispatcher.cpp) (revision 1a364403f0d1839397054b1eca4d51201b0cf943) +++ sources/canbus/messagedispatcher.cpp (.../messagedispatcher.cpp) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -95,15 +95,19 @@ connect(&_FrameInterface , SIGNAL(didFrameReceive (Can_Id , const QByteArray &)), this , SLOT( onFrameReceive (Can_Id , const QByteArray &))); - // From Message Acknow Model timer timeout. connect(&_MessageAcknowModel , SIGNAL(didFramesTransmit(Can_Id, Sequence, const FrameList &)), this , SLOT( onFramesTransmit(Can_Id, Sequence, const FrameList &))); connect(&_MessageAcknowModel , SIGNAL(didFailedTransmit( Sequence )), this , SLOT( onFailedTransmit( Sequence ))); + // From HD -> Message interpreter - ACTION_RECEIVE_INTERPRETER_CONNECTIONS +// ACTION_RECEIVE_INTERPRETER_CONNECTIONS + + // ---- Signal/Slots + ADJUST_TRANSMT_MODEL_BRIDGE_CONNECTIONS(_ApplicationController) + ACTION_RECEIVE_MODEL_BRIDGE_CONNECTIONS(_interpreter ) } /*! @@ -212,6 +216,75 @@ } /*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Blood/Dialysate Adjustment Denali message. + * \param vData - Data model contains Blood Flow Rate + and Dialysate Flow Rate + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustBloodDialysateRequestData &vData) +{ + QVariantList mData; + mData += vData.bloodFlow; + mData += vData.dialysateFlow; + onActionTransmit(GuiActionType::AdjustBloodDialysateReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the treatment duration Adjustment Denali message. + * \param vData - Data model contains treatment duration adjustment value in minuts + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustDurationRequestData &vData) +{ + QVariantList mData; + mData += vData.duration; + onActionTransmit(GuiActionType::AdjustDurationReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Ultrafiltration State Adjustment Denali message. + * \param vData - Data model contains treatment ultrafiltration state adjustment + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustUltrafiltrationStateRequestData &vData) +{ + QVariantList mData; + mData += vData.requestedState; + actionTransmit(GuiActionType::AdjustUltrafiltrationStateReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Ultrafiltration Adjustment Denali message. + * \param vData - Data model contains treatment ultrafiltration adjustment volume + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustUltrafiltrationEditRequestData &vData) +{ + QVariantList mData; + mData += vData.volume; + onActionTransmit(GuiActionType::AdjustUltrafiltrationEditReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Ultrafiltration Adjustment User Selected Option Denali message. + * \param vData - Data model contains treatment ultrafiltration adjustment volume and user selected option. + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustUltrafiltrationConfirmRequestData &vData) +{ + QVariantList mData; + mData += vData.volume; + mData += vData.option; + onActionTransmit(GuiActionType::AdjustUltrafiltrationConfirmReq, mData); +} + + +/*! * \brief MessageDispatcher::actionTransmit * \details This method is called by slot MessageDispatcher::onActionTransmit * which emits didFrameTransmit on successful interpretation of the requested message @@ -315,7 +388,7 @@ case GuiActionType::Acknow: LOG_EVENT(tr("HD Ack Bak %1").arg(mSequence)); #ifdef DEBUG_ACKBACK_HD_TO_UI - qDebug() << tr(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HD AckBak : %1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ").arg(mSequence); + qDebug() << tr(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HD AckBak : %1 %2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ").arg(mSequence).arg(vMessage.actionId); #endif emit didAcknowReceive(mSequence); break; @@ -324,10 +397,13 @@ if (mSequence < 0) { LOG_EVENT(tr("HD Ack Req %1").arg(mSequence)); #ifdef DEBUG_ACKBACK_HD_TO_UI - qDebug() << tr(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HD AckReq : %1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ").arg(mSequence); + qDebug() << tr(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HD AckReq : %1 %2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ").arg(mSequence).arg(vMessage.actionId); #endif // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ UI AckBak is immediately handled at the same place. actionTransmit(GuiActionType::Acknow, {}, -mSequence); + #ifdef DEBUG_ACKBACK_HD_TO_UI + qDebug() << tr(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ UI AckBak : %1 %2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ").arg(-mSequence).arg(vMessage.actionId); + #endif } emit didActionReceive(mActionId, mData); break; Index: sources/canbus/messagedispatcher.h =================================================================== diff -u -reece7acacf84e8cc34b830f6b5ab3f112823a905 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/canbus/messagedispatcher.h (.../messagedispatcher.h) (revision eece7acacf84e8cc34b830f6b5ab3f112823a905) +++ sources/canbus/messagedispatcher.h (.../messagedispatcher.h) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -104,6 +104,7 @@ QList _needsAcknow { GuiActionType::AdjustBloodDialysateReq , GuiActionType::AdjustDurationReq , + GuiActionType::AlarmSilenceReq , GuiActionType::AdjustUltrafiltrationStateReq , GuiActionType::AdjustUltrafiltrationEditReq , GuiActionType::AdjustUltrafiltrationConfirmReq , @@ -183,6 +184,13 @@ */ void didFrameTransmit (Can_Id vCan_Id, const QByteArray &vPayload); + /*! + * \brief didFailedTransmit + * \details When a message fails to transmit to the HD, emit this signal. + * \param vSequence - The message Sequence we that failed to send. + */ + void didFailedTransmit(Sequence vSequence); + private slots: // A Frame has been received from CanInterface void onFrameReceive (Can_Id vCan_Id, const QByteArray &vPayload); Index: sources/canbus/messageglobals.h =================================================================== diff -u -r255df1f61af0193b8f2f9630bdf3ce68be0f5e29 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/canbus/messageglobals.h (.../messageglobals.h) (revision 255df1f61af0193b8f2f9630bdf3ce68be0f5e29) +++ sources/canbus/messageglobals.h (.../messageglobals.h) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -53,6 +53,8 @@ {Gui::GuiActionType::PressureOcclusion , 5 * 4 }, // 5 parameters each 4bytes {Gui::GuiActionType::AlarmSilenceReq , 5 * 4 }, // 5 parameters each 4bytes {Gui::GuiActionType::AlarmSilenceRsp , 5 * 4 }, // 5 parameters each 4bytes + {Gui::GuiActionType::LoadCellReadings , 4 * 4 }, // 4 parameters each 4bytes + {Gui::GuiActionType::TemperatureSensors , 12 * 4 }, // 12 parameters each 4bytes // ---- {Gui::GuiActionType::AlarmStatus , 4 * 4 + 2 }, // 4 parameters each 4bytes + 1 parameter 2bytes @@ -68,10 +70,23 @@ {Gui::GuiActionType::AdjustDurationReq , 1 * 4 }, // 1 parameters each 4bytes {Gui::GuiActionType::AdjustDurationRsp , 4 * 4 }, // 4 parameters each 4bytes + // ---- + {Gui::GuiActionType::AdjustUltrafiltrationStateReq , 1 * 4 }, // 1 parameters each 4bytes // ---- + {Gui::GuiActionType::AdjustUltrafiltrationEditReq , 1 * 4 }, // 1 parameters each 4bytes + {Gui::GuiActionType::AdjustUltrafiltrationEditRsp , 8 * 4 }, // 8 parameters each 4bytes + + // ---- + {Gui::GuiActionType::AdjustUltrafiltrationConfirmReq , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::AdjustUltrafiltrationConfirmRsp , 5 * 4 }, + + // ---- + {Gui::GuiActionType::CanBUSFaultCount , 1 }, {Gui::GuiActionType::String , 255 }, {Gui::GuiActionType::Acknow , 0 }, + {Gui::GuiActionType::AcknowGeneric , 1 }, + }; /*! Index: sources/canbus/messageinterpreter.cpp =================================================================== diff -u -r7d3062c841b788ced31d939dec990afe0de1442d -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/canbus/messageinterpreter.cpp (.../messageinterpreter.cpp) (revision 7d3062c841b788ced31d939dec990afe0de1442d) +++ sources/canbus/messageinterpreter.cpp (.../messageinterpreter.cpp) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -115,6 +115,12 @@ } break; + case Gui::GuiActionType::AlarmSilenceReq: + if (count) { + vPayload = Format::fromVariant(vData); + } + break; + case Gui::GuiActionType::AdjustUltrafiltrationStateReq: if (count) { vPayload = Format::fromVariant(vData); @@ -293,6 +299,11 @@ ok = true; break; + case Gui::GuiActionType::AlarmSilenceRsp: + printUnhandled (vMessage); + ok = true; + break; + case Gui::GuiActionType::TreatmentState: printUnhandled (vMessage); ok = true; Index: sources/gui/guicontroller.cpp =================================================================== diff -u -r255df1f61af0193b8f2f9630bdf3ce68be0f5e29 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/gui/guicontroller.cpp (.../guicontroller.cpp) (revision 255df1f61af0193b8f2f9630bdf3ce68be0f5e29) +++ sources/gui/guicontroller.cpp (.../guicontroller.cpp) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -84,6 +84,7 @@ connect(&_ApplicationController, SIGNAL(didFailedTransmit(Sequence)), this , SLOT(didFailedTransmit(Sequence))); + // ---- Signal/Slots ACTION_RECEIVE_MODEL_BRIDGE_CONNECTIONS(_ApplicationController) } @@ -280,16 +281,6 @@ } // coco end -void GuiController::doAdjustBloodDialysateFlows(quint32 vBloodFlow, quint32 vDialysateFlow) -{ - emit didAdjustBloodDialysateFlows(vBloodFlow, vDialysateFlow); -} - -void GuiController::doAdjustDuration(quint32 vDuration) -{ - emit didAdjustDuration(vDuration); -} - /*! * \brief GuiController::didFailedTransmit * Raises an HD communiation timeout alarm if communication with HD is lost. @@ -306,3 +297,4 @@ data.mFlags = QBitArray(16, false); // 16 QBitArray of flags, if needed emit didActionReceive(data); } + Index: sources/gui/guicontroller.h =================================================================== diff -u -reece7acacf84e8cc34b830f6b5ab3f112823a905 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/gui/guicontroller.h (.../guicontroller.h) (revision eece7acacf84e8cc34b830f6b5ab3f112823a905) +++ sources/gui/guicontroller.h (.../guicontroller.h) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -20,10 +20,13 @@ #include "main.h" #include "guiglobals.h" #include "mmodel.h" +#include "messageglobals.h" // define #define _GuiController GuiController::I() +using namespace Can; + // namespace namespace Gui { @@ -66,6 +69,7 @@ void onUSBDriveRemove(); // OS => UI void onExport (); // OS => UI + void didFailedTransmit(Sequence seq); signals: void didActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG Index: sources/gui/guiglobals.h =================================================================== diff -u -r41eec18961c2861652405a80c9cad523c0475172 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/gui/guiglobals.h (.../guiglobals.h) (revision 41eec18961c2861652405a80c9cad523c0475172) +++ sources/gui/guiglobals.h (.../guiglobals.h) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -52,6 +52,8 @@ AlarmStatus = 0x0200, AlarmTriggered = 0x0300, AlarmCleared = 0x0400, + AlarmSilenceReq = 0x2F00, // 47 - Not implemented yet on FW side + AlarmSilenceRsp = 0x3000, // 48 - Not implemented yet on FW side LoadCellReadings = 0x0C00, Index: sources/gui/guiview.h =================================================================== diff -u -ra159e12630645a9a35fb0a5585cc7b639cfe6aa6 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/gui/guiview.h (.../guiview.h) (revision a159e12630645a9a35fb0a5585cc7b639cfe6aa6) +++ sources/gui/guiview.h (.../guiview.h) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -18,7 +18,10 @@ // Project #include "guiglobals.h" +#include "messageglobals.h" +using namespace Can; + // define // ... Index: sources/gui/qml/components/ModalDialog.qml =================================================================== diff -u -re0f39a94ab67ab6c48389fb0d4faf5f32be13714 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision e0f39a94ab67ab6c48389fb0d4faf5f32be13714) +++ sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -24,13 +24,16 @@ * \brief The parent item for modal dialogs */ Dialog { id : _root + contentItem.objectName: "ModalDialog" //SquishQt testability + property bool autoHide : false property int autoHideDuration : 1000 property alias notificationText : _notification.text property alias backgroundColor : _backgroundRect.color property alias textColor : _notification.textColor property alias border : _backgroundRect.border property alias radius : _backgroundRect.radius + property alias notification: _notification width : Variables.dialogWidth height : Variables.dialogHeight @@ -72,5 +75,7 @@ } } - NotificationBar { id: _notification } + NotificationBar { id: _notification + text: "" //_root.notificationText + } } Index: sources/gui/qml/components/NotificationBar.qml =================================================================== diff -u -ra159e12630645a9a35fb0a5585cc7b639cfe6aa6 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/gui/qml/components/NotificationBar.qml (.../NotificationBar.qml) (revision a159e12630645a9a35fb0a5585cc7b639cfe6aa6) +++ sources/gui/qml/components/NotificationBar.qml (.../NotificationBar.qml) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -21,18 +21,38 @@ import "qrc:/globals" Rectangle { id: _root - objectName: "NotificationBar" // SquishQt + objectName: "NotificationBar" + property alias text : _text.text + property alias textColor : _text.color + property int level : 0 + property bool isSilenced : false + property int muteTimeoutSec : 0 + property color backgroundColor : Colors.textNotificationNoneBg - property alias imageSource : _image.source - property bool imageAutoSize : false - property alias text : _text.text - property alias textColor : _text.color - property alias textfontSize : _text.font.pixelSize - property alias rowAnchors : _row.anchors + signal clickedNotificationBar() - property int level : 0 + function toggleSilence(silence, timeoutSec) { + isSilenced = silence; + muteTimeoutSec = !isSilenced ? 0 : timeoutSec; + _bell.source = isSilenced ? "qrc:/images/bell-off.svg" : "qrc:/images/bell.svg" + } + // Placeholder animation + Timer { + id: _timer + interval: 1000; + running: false; + repeat: true; + onTriggered: { + _root.visible = !_root.visible; + } + } + + function setFlashing(enable) { + _timer.running = enable; + } + visible : _text.text height : Variables.notificationHeight @@ -44,40 +64,56 @@ right : parent.right } - Row { id: _row - anchors.centerIn: parent - spacing: 10 - Image { id: _image - anchors.verticalCenter: parent.verticalCenter - width : imageAutoSize ? Math.min(_root.height, _root.width) : Variables.notificationIconSize - height: imageAutoSize ? Math.min(_root.height, _root.width) : Variables.notificationIconSize - } - Text { id: _text - color : Colors.textNotificationNoneFg - font.pixelSize : Fonts.fontPixelNotification - horizontalAlignment : Text.AlignHCenter - verticalAlignment : Text.AlignVCenter - } + Image { + id: _icon + source: "qrc:/images/alarm.svg" + anchors.right: _text.left + anchors.rightMargin: Variables.notificationBarIconMargin; + anchors.verticalCenter: parent.verticalCenter; + sourceSize.height: Variables.notificationBarIconHeight; + sourceSize.width: Variables.notificationBarIconWidth; } + Text { id: _text + color : Colors.textNotificationNoneFg + anchors.centerIn : parent + font.pixelSize : Fonts.fontPixelNotification + horizontalAlignment : Text.AlignHCenter + verticalAlignment : Text.AlignVCenter + + } + + Image { + id: _bell + source: isSilenced ? "qrc:/images/bell-off.svg" : "qrc:/images/bell.svg" + anchors.left: _root.left + anchors.leftMargin: Variables.silenceIconMargin; + anchors.verticalCenter: parent.verticalCenter; + sourceSize.height: Variables.notificationBarIconHeight; + sourceSize.width: Variables.notificationBarIconWidth; + } + + Text { id: _timeout_text + color : Colors.textMain; + anchors.left : _bell.right + anchors.leftMargin : Variables.notificationBarIconMargin; + anchors.verticalCenter: parent.verticalCenter; + font.pixelSize : Fonts.fontPixelNotification + horizontalAlignment : Text.AlignHCenter + verticalAlignment : Text.AlignVCenter + text: muteTimeoutSec; // will be 60 second or less (see PRS) + visible: isSilenced; + } + + MouseArea { + id: _TouchArea + anchors.fill: parent; + onClicked: _root.clickedNotificationBar() + } + + onLevelChanged: { - switch (level) { - case GuiActions.ALARM_PRIORITY_HIGH: - _root.color = Colors.textNotificationHighBg; - _text.color = Colors.textNotificationHighFg; - break; - case GuiActions.ALARM_PRIORITY_MEDIUM: - _root.color = Colors.textNotificationMedBg; - _text.color = Colors.textNotificationMedFg; - break; - case GuiActions.ALARM_PRIORITY_LOW: - _root.color = Colors.textNotificationLowBg; - _text.color = Colors.textNotificationLowFg; - break; - default : // GuiActions.ALARM_PRIORITY_NONE - _root.color = Colors.textNotificationNoneBg; - _text.color = Colors.textNotificationNoneFg; - break; - } + [_root.color, _text.color] = getRootTextFromAlarmLevel(level); } + } Index: sources/gui/qml/components/NotificationBar2.qml =================================================================== diff -u --- sources/gui/qml/components/NotificationBar2.qml (revision 0) +++ sources/gui/qml/components/NotificationBar2.qml (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -0,0 +1,83 @@ +/*! + * + * 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 NotificationBar.qml + * \date 2020/03/30 + * \author Behrouz NematiPour + * + */ + +// Qt +import QtQuick 2.12 + +// Project +import Gui.Actions 0.1 +// Qml imports +import "qrc:/globals" + +Rectangle { id: _root + objectName: "NotificationBar" // SquishQt + + property alias imageSource : _image.source + property bool imageAutoSize : false + property alias text : _text.text + property alias textColor : _text.color + property alias textfontSize : _text.font.pixelSize + property alias rowAnchors : _row.anchors + + property int level : 0 + + + visible : _text.text + + height : Variables.notificationHeight + color : Colors.textNotificationNoneBg + //radius : Variables.dialogRadius + anchors { + bottom : parent.bottom + left : parent.left + right : parent.right + } + + Row { id: _row + anchors.centerIn: parent + spacing: 10 + Image { id: _image + anchors.verticalCenter: parent.verticalCenter + width : imageAutoSize ? Math.min(_root.height, _root.width) : Variables.notificationIconSize + height: imageAutoSize ? Math.min(_root.height, _root.width) : Variables.notificationIconSize + } + Text { id: _text + color : Colors.textNotificationNoneFg + font.pixelSize : Fonts.fontPixelNotification + horizontalAlignment : Text.AlignHCenter + verticalAlignment : Text.AlignVCenter + } + } + + onLevelChanged: { + switch (level) { + case GuiActions.ALARM_PRIORITY_HIGH: + _root.color = Colors.textNotificationHighBg; + _text.color = Colors.textNotificationHighFg; + break; + case GuiActions.ALARM_PRIORITY_MEDIUM: + _root.color = Colors.textNotificationMedBg; + _text.color = Colors.textNotificationMedFg; + break; + case GuiActions.ALARM_PRIORITY_LOW: + _root.color = Colors.textNotificationLowBg; + _text.color = Colors.textNotificationLowFg; + break; + default : // GuiActions.ALARM_PRIORITY_NONE + _root.color = Colors.textNotificationNoneBg; + _text.color = Colors.textNotificationNoneFg; + break; + } + } +} Index: sources/gui/qml/components/TouchArea.qml =================================================================== diff -u -rae97f70129df818530bcb70c934c42fa28eb6034 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/gui/qml/components/TouchArea.qml (.../TouchArea.qml) (revision ae97f70129df818530bcb70c934c42fa28eb6034) +++ sources/gui/qml/components/TouchArea.qml (.../TouchArea.qml) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -27,51 +27,36 @@ * next to the right edge of the component. */ Rectangle { id : _root - enum Orientation { - Horizontal, - Vertical - } - property string title : "" property int titleLetterSpacing : 3 property bool isTouchable : true - property int orientation : TouchArea.Orientation.Horizontal - property list components - property int titleVSpacing : 20 - property int componentsHSpacing : 80 - property int componentsVSpacing : 0 - property int arrowSpacing : 40 + property alias notification : _notification signal clicked() color: "transparent" - width : _column.width + arrowSpacing - height: _column.height clip : false - Column { id: _column - width : Math.max(_titleText.width , _grid.width) - height : _titleText.height + _grid.height - spacing : titleVSpacing - Text { id: _titleText - text: _root.title - font.pixelSize: Fonts.fontPixelTouchAreaTitle - font.letterSpacing: titleLetterSpacing - color: Colors.touchTextAreaTitle + Text { id: _titleText + anchors { + top: parent.top + left: parent.left } - Grid { id: _grid - columns : orientation === TouchArea.Orientation.Horizontal ? components.length : 1 - rows : orientation === TouchArea.Orientation.Vertical ? components.length : 1 - spacing : orientation === TouchArea.Orientation.Horizontal ? componentsHSpacing : componentsVSpacing - children: components + text: _root.title + font { + pixelSize: Fonts.fontPixelTouchAreaTitle + letterSpacing: titleLetterSpacing } + color: Colors.touchTextAreaTitle } Image { id: _arrowImage visible: isTouchable - anchors.right: parent.right - anchors.top: parent.top + anchors { + top: parent.top + right: parent.right + } width : Variables.arrowWidth height: Variables.arrowHeight source: "qrc:/images/iArrow" @@ -85,6 +70,23 @@ } } } + Component.onCompleted: { } + + NotificationBar2 { id: _notification + height : 25 + imageAutoSize: true + color: "transparent" + anchors { + bottom : parent.bottom + left : parent.left + right : parent.right + } + imageSource : "" + text : "" + textColor : "gray" + textfontSize: 16 + rowAnchors.centerIn: null + } } Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -r524fee2471717bf627eae41c6a599c9b5f4fbe55 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 524fee2471717bf627eae41c6a599c9b5f4fbe55) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -73,12 +73,22 @@ readonly property color textNotificationNoneBg : "white" readonly property color textNotificationNoneFg : "#1b2b3e" - readonly property color textNotificationLowBg : "green" // ? + readonly property color textNotificationLowBg : "#f5a623" // ? readonly property color textNotificationLowFg : "white" // ? - readonly property color textNotificationMedBg : "orange" // ? + readonly property color textNotificationMedBg : "#f5a623" // ? readonly property color textNotificationMedFg : "white" // ? readonly property color textNotificationHighBg : "#c53b33" // red readonly property color textNotificationHighFg : "white" + + readonly property color alarmTopBarHighBg : "#831913" + readonly property color alarmTopBarHighFg : "white" + + readonly property color alarmTopBarMedBg : "#db8f00" + readonly property color alarmTopBarMedFg : "white" + + readonly property color alarmTopBarLowBg : "#db8f00" + readonly property color alarmTopBarLowFg : "white" + } Index: sources/gui/qml/globals/Fonts.qml =================================================================== diff -u -reb19475a6bf4ed7f6a16bc07eefc7813496620ef -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision eb19475a6bf4ed7f6a16bc07eefc7813496620ef) +++ sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -24,6 +24,7 @@ QtObject { readonly property int fontPixelButton : 24 readonly property int fontPixelTitle : 42 + readonly property int fontPixelDialogText : 22 readonly property int fontPixelTouchAreaTitle : 16 Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -ra159e12630645a9a35fb0a5585cc7b639cfe6aa6 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision a159e12630645a9a35fb0a5585cc7b639cfe6aa6) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -24,13 +24,20 @@ QtObject { readonly property int applicationWidth : 1280 readonly property int applicationHeight : 800 + readonly property int buttonSpacing : 150 + readonly property int dialogSVGHeight : 50 + readonly property int dialogSVGWidth : 50 + readonly property int dialogSVGIconOffset : 25 readonly property int headerHeight : 100 readonly property int mainMenuHeight : 70 readonly property int logoWidth : 50 readonly property int logoHeight : 50 + readonly property int largeArrowWidth : 24 + readonly property int largeArrowHeight : 32 + readonly property int arrowWidth : 12 readonly property int arrowHeight : 16 @@ -80,6 +87,14 @@ readonly property int durationResolution : 15 // PRS346 + readonly property int silenceIconMargin : 20 + readonly property int notificationBarIconMargin : 10 + readonly property int notificationBarIconHeight : 30 + readonly property int notificationBarIconWidth : 30 + + readonly property int settingsOptionWidth : 550 + readonly property int settingsOptionHeight : 50 + readonly property int ultrafiltrationProgressbarWidth : 880 readonly property int ultrafiltrationAdjustmtenOptionWidth : 520 readonly property int ultrafiltrationAdjustmtenOptionHeight: 275 Index: sources/gui/qml/main.qml =================================================================== diff -u -r8f71000a841da5e8f18efccbb30a7655d3a211cd -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/gui/qml/main.qml (.../main.qml) (revision 8f71000a841da5e8f18efccbb30a7655d3a211cd) +++ sources/gui/qml/main.qml (.../main.qml) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -71,10 +71,29 @@ // TODO : When Testing data on Setting screen is removed // This needs to be moved into the Treatment______.qml + VAlarmStatus { id: vAlarmStatus + onRaiseAlarm: { + updateAlarm(); + _alarm_dialog.isSilenced = vAlarmStatus.alarm_Flag_alarmsSilenced + _alarm_bar.toggleSilence(vAlarmStatus.alarm_Flag_alarmsSilenced, + vAlarmStatus.alarm_MuteTimeout); - VAlarmStatus { id: vAlarmStatus } - VPowerOff { id: vPowerOff } + if (isAlarmHighPriority()) { + _alarm_dialog.visible = true; + _alarm_bar.visible = false; + } else { + if (!_alarm_dialog.visible) { + _alarm_bar.visible = true; + } + } + } + onHideAlarm: { + _alarm_bar.visible = false; + _alarm_dialog.visible = false; + } + } + VPowerOff { id: vPowerOff } VTreatmentBloodFlow { id: vTreatmentBloodFlow } VTreatmentDialysateFlow { id: vTreatmentDialysateFlow } VTreatmentPressureOcclusion { id: vTreatmentPressureOcclusion } @@ -124,12 +143,56 @@ } } - NotificationBar { id: _alarm + NotificationBar { id: _alarm_bar + anchors.bottom: _mainMenu.top level : vAlarmStatus.alarm_Priority - text : vAlarmStatus.text + text : vAlarmStatus.text; + isSilenced: vAlarmStatus.alarm_Flag_alarmsSilenced; + + onClickedNotificationBar: { + updateAlarm(); + _alarm_bar.setFlashing(false); + _alarm_bar.visible = false; + _alarm_dialog.visible = true; + } + + } + function isAlarmHighPriority() { + return vAlarmStatus.alarm_Priority === GuiActions.ALARM_PRIORITY_HIGH; + } + + function updateAlarm() { + _alarm_dialog.titleText = "Alarm"; + _alarm_dialog.description = vAlarmStatus.text; + _alarm_dialog.alarmID = vAlarmStatus.alarm_AlarmID; + [_alarm_dialog.backgroundColor, _alarm_dialog.textColor] = getRootTextFromAlarmLevel(vAlarmStatus.alarm_Priority); + [_alarm_dialog.titleBarBackground, _alarm_dialog.titleBarForeground] = getAlarmTopBarColors(vAlarmStatus.alarm_Priority); + _alarm_bar.backgroundColor = _alarm_dialog.titleBarBackground; + } + + NotificationDialog { id: _alarm_dialog + onClosed: { + _alarm_bar.visible = true; + } + onClickedOkay: { + _alarm_dialog.visible = false; + vAlarmStatus.requestOkay(alarmID) + if (isAlarmHighPriority()) { + _alarm_bar.setFlashing(true); + return; + } + _alarm_bar.setFlashing(false); + } + + onClickedSilence: { + _alarm_dialog.visible = false; + vAlarmStatus.requestSilence(); + } + } + // 9 - Others Text { // TEST : Application version should be moved into the information screen later. color: Colors.textMain @@ -146,6 +209,55 @@ font.pixelSize: 14 } + function getRootTextFromAlarmLevel(level) { + let root_color = ""; + let text_color = ""; + switch (level) { + case GuiActions.ALARM_PRIORITY_HIGH: + root_color = Colors.textNotificationHighBg; + text_color = Colors.textNotificationHighFg; + break; + case GuiActions.ALARM_PRIORITY_MEDIUM: + root_color = Colors.textNotificationMedBg; + text_color = Colors.textNotificationMedFg; + break; + case GuiActions.ALARM_PRIORITY_LOW: + root_color = Colors.textNotificationLowBg; + text_color = Colors.textNotificationLowFg; + break; + default : // GuiActions.ALARM_PRIORITY_NONE + root_color = Colors.textNotificationNoneBg; + text_color = Colors.textNotificationNoneFg; + + } + return [root_color, text_color]; + + } + + function getAlarmTopBarColors(level) { + let background = ""; + let foreground = ""; + switch (level) { + case GuiActions.ALARM_PRIORITY_HIGH: + background = Colors.alarmTopBarHighBg; + foreground = Colors.alarmTopBarHighFg; + break; + case GuiActions.ALARM_PRIORITY_MEDIUM: + background = Colors.alarmTopBarMedBg; + foreground = Colors.alarmTopBarMedFg; + break; + case GuiActions.ALARM_PRIORITY_LOW: + background = Colors.alarmTopBarLowBg; + foreground = Colors.alarmTopBarLowFg; + break; + default : // GuiActions.ALARM_PRIORITY_NONE + background = Colors.alarmTopBarLowBg; + foreground = Colors.alarmTopBarLowFg; + + } + return [background, foreground]; + } + Connections { target: vPowerOff onPoweroffTriggered: { switch (vpoweroff) { Index: sources/gui/qml/pages/Diagnostics.qml =================================================================== diff -u -r255df1f61af0193b8f2f9630bdf3ce68be0f5e29 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/gui/qml/pages/Diagnostics.qml (.../Diagnostics.qml) (revision 255df1f61af0193b8f2f9630bdf3ce68be0f5e29) +++ sources/gui/qml/pages/Diagnostics.qml (.../Diagnostics.qml) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -28,148 +28,268 @@ */ ScreenItem { id: _root - BackButton { id: _backButton - onClicked: { - pop(); - } - - } - USBButton { id: _usbButton - anchors { - top : parent.top - right : _exportButton.left - topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + anchors { + top : parent.top + right : _exportButton.left + topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + } } - } - ExportButton { id: _exportButton - width: 150 - height: 50 - anchors { - top : parent.top - right : _poweroffButton.left - topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + ExportButton { id: _exportButton + width: 150 + height: 50 + anchors { + top : parent.top + right : _poweroffButton.left + topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + } } - } - TouchRect { id : _poweroffButton - width: 150 - height: Variables.logoHeight - animated: true - anchors { - top : parent.top - right : parent.right - topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + TouchRect { id : _poweroffButton + width: 150 + height: Variables.logoHeight + animated: true + anchors { + top : parent.top + right : parent.right + topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + } + text.text: qsTr("Shutdown") + button.onPressed: { + _GuiView.doActionTransmit(GuiActions.PowerOff, GuiActions.NoData) + } } - text.text: qsTr("Shutdown") - button.onPressed: { - _GuiView.doActionTransmit(GuiActions.PowerOff, GuiActions.NoData) - } - } - Column { id: _BloodFlowColumn - width: 150 - spacing: 20 - topPadding: 100 - leftPadding: 10 - Text { - id: _BloodFlow_Title - text: qsTr(" Blood ") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignHCenter + Text { id : _canbusFaultCountText + property int count: 0 + visible: true + anchors { + top : parent.top + left : parent.left + topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + leftMargin : (Variables.headerHeight - Variables.logoHeight) / 2 + } + text: qsTr("CAN Faults : %1").arg(count) + horizontalAlignment: Text.AlignLeft color: Colors.textMain font.pixelSize: Fonts.fontPixelTitle - font.underline: true } - Repeater { - model: [ - vTreatmentBloodFlow.bloodFlow_FlowSetPoint , - vTreatmentBloodFlow.bloodFlow_MeasuredFlow .toFixed(2) , - vTreatmentBloodFlow.bloodFlow_RotorSpeed .toFixed(2) , - vTreatmentBloodFlow.bloodFlow_MotorSpeed .toFixed(2) , - vTreatmentBloodFlow.bloodFlow_MotorCtlSpeed .toFixed(2) , - vTreatmentBloodFlow.bloodFlow_MotorCtlCurrent .toFixed(2) , - "%" + vTreatmentBloodFlow.bloodFlow_PWMDutyCycle .toFixed(2) - ] + + Connections { target: _GuiView + onDidActionReceive: { + if (vAction === GuiActions.CanBUSFaultCount ) { + _canbusFaultCountText.count = vData[0] + } + } + } + + Column { id: _BloodFlowColumn + width: 150 + spacing: 20 + topPadding: 100 + leftPadding: 10 Text { - text: modelData + id: _BloodFlow_Title + text: qsTr(" Blood ") width: _BloodFlowColumn.width horizontalAlignment: Text.AlignRight color: Colors.textMain font.pixelSize: Fonts.fontPixelTitle + font.underline: true } + Repeater { + model: [ + vTreatmentBloodFlow.bloodFlow_FlowSetPoint , + vTreatmentBloodFlow.bloodFlow_MeasuredFlow .toFixed(2) , + vTreatmentBloodFlow.bloodFlow_RotorSpeed .toFixed(2) , + vTreatmentBloodFlow.bloodFlow_MotorSpeed .toFixed(2) , + vTreatmentBloodFlow.bloodFlow_MotorCtlSpeed .toFixed(2) , + vTreatmentBloodFlow.bloodFlow_MotorCtlCurrent .toFixed(2) , + "%" + vTreatmentBloodFlow.bloodFlow_PWMDutyCycle .toFixed(2) + ] + Text { + text: modelData + width: _BloodFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + } } - } - Column { id: _DialysateInletFlowColumn - width: 150 - spacing: 20 - topPadding: 100 - leftPadding: 180 - Text { - id: _DialysateInletFlow_Title - text: qsTr(" Dialysate I ") - width: _DialysateInletFlowColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true - } - Repeater { - model: [ - vTreatmentDialysateFlow.dialysateFlow_FlowSetPoint .toFixed(2) , - vTreatmentDialysateFlow.dialysateFlow_MeasuredFlow .toFixed(2) , - vTreatmentDialysateFlow.dialysateFlow_RotorSpeed .toFixed(2) , - vTreatmentDialysateFlow.dialysateFlow_MotorSpeed .toFixed(2) , - vTreatmentDialysateFlow.dialysateFlow_MotorCtlSpeed .toFixed(2) , - vTreatmentDialysateFlow.dialysateFlow_MotorCtlCurrent.toFixed(2) , - "%" + vTreatmentDialysateFlow.dialysateFlow_PWMDutyCycle .toFixed(2) - ] + Column { id: _DialysateInletFlowColumn + width : 150 + spacing : 20 + topPadding : 100 + leftPadding : 200 Text { - text: modelData + id: _DialysateInletFlow_Title + text: qsTr(" Dlyst I ") width: _DialysateInletFlowColumn.width horizontalAlignment: Text.AlignRight color: Colors.textMain font.pixelSize: Fonts.fontPixelTitle + font.underline: true } + Repeater { + model: [ + vTreatmentDialysateFlow.dialysateFlow_FlowSetPoint .toFixed(2) , + vTreatmentDialysateFlow.dialysateFlow_MeasuredFlow .toFixed(2) , + vTreatmentDialysateFlow.dialysateFlow_RotorSpeed .toFixed(2) , + vTreatmentDialysateFlow.dialysateFlow_MotorSpeed .toFixed(2) , + vTreatmentDialysateFlow.dialysateFlow_MotorCtlSpeed .toFixed(2) , + vTreatmentDialysateFlow.dialysateFlow_MotorCtlCurrent.toFixed(2) , + "%" + vTreatmentDialysateFlow.dialysateFlow_PWMDutyCycle .toFixed(2) + ] + Text { + text: modelData + width: _DialysateInletFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + } } - } - Column { id: _DialysateOutletFlowColumn - width: 150 - spacing: 20 - topPadding: 100 - leftPadding: 400 - Text { - id: _DialysateOutletFlow_Title - text: qsTr(" Dialysate O ") - width: _DialysateOutletFlowColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true - } - Repeater { - model: [ - vTreatmentUltrafiltration.ultrafiltration_RefUFVol .toFixed(2) , - vTreatmentUltrafiltration.ultrafiltration_MeasUFVol .toFixed(2) , - vTreatmentUltrafiltration.ultrafiltration_RotorSpeed .toFixed(2) , - vTreatmentUltrafiltration.ultrafiltration_MotorSpeed .toFixed(2) , - vTreatmentUltrafiltration.ultrafiltration_MotorCtlSpeed .toFixed(2) , - vTreatmentUltrafiltration.ultrafiltration_MotorCtlCurrent.toFixed(2) , - "%" + vTreatmentUltrafiltration.ultrafiltration_PWMDtCycle .toFixed(2) - ] + Column { id: _DialysateOutletFlowColumn + width : 150 + spacing : 20 + topPadding : 100 + leftPadding : 400 Text { - text: modelData + id: _DialysateOutletFlow_Title + text: qsTr(" Dlyst O ") width: _DialysateOutletFlowColumn.width horizontalAlignment: Text.AlignRight color: Colors.textMain font.pixelSize: Fonts.fontPixelTitle + font.underline: true } + Repeater { + model: [ + vTreatmentUltrafiltration.ultrafiltration_RefUFVol .toFixed(2) , + vTreatmentUltrafiltration.ultrafiltration_MeasUFVol .toFixed(2) , + vTreatmentUltrafiltration.ultrafiltration_RotorSpeed .toFixed(2) , + vTreatmentUltrafiltration.ultrafiltration_MotorSpeed .toFixed(2) , + vTreatmentUltrafiltration.ultrafiltration_MotorCtlSpeed .toFixed(2) , + vTreatmentUltrafiltration.ultrafiltration_MotorCtlCurrent.toFixed(2) , + "%" + vTreatmentUltrafiltration.ultrafiltration_PWMDtCycle .toFixed(2) + ] + Text { + text: modelData + width: _DialysateOutletFlowColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + } } - } + + Column { id: _PressureOcclusionColumn + width : 150 + spacing : 20 + topPadding : 100 + leftPadding : 600 + Text { + id: _PressureOcclusion_Title + text: qsTr(" Prsr Oc ") + width: _PressureOcclusionColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + font.underline: true + } + Repeater { + model: [ + vTreatmentPressureOcclusion.pressureocclusion_ArterialPressure .toFixed(2) , + vTreatmentPressureOcclusion.pressureocclusion_VenousPressure .toFixed(2) , + vTreatmentPressureOcclusion.pressureocclusion_BloodPumpOcclusion .toFixed(2) , + vTreatmentPressureOcclusion.pressureocclusion_DialysateInletPumpOcclusion .toFixed(2) , + vTreatmentPressureOcclusion.pressureocclusion_DialysateOutletPumpOcclusion .toFixed(2) + ] + Text { + text: modelData + width: _PressureOcclusionColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + } + } + + Column { id: _LoadCellReadingsColumn + width : 150 + spacing : 20 + topPadding : 100 + leftPadding : 800 + Text { + id: _LoadCellReading_Title + text: qsTr(" LoadCl ") + width: _LoadCellReadingsColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + font.underline: true + } + Repeater { + model: [ + vLoadCellReadings.reservoir1Prim .toFixed(2) , + vLoadCellReadings.reservoir1Bkup .toFixed(2) , + vLoadCellReadings.reservoir2Prim .toFixed(2) , + vLoadCellReadings.reservoir2Bkup .toFixed(2) + ] + Text { + objectName: "_LoadCellReadings" + index + text: modelData + width: _LoadCellReadingsColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + } + } + + Column { id: _TemperatureSensorsColumn + width : 150 + spacing : -5 + topPadding : 100 + leftPadding : 1000 + Text { + id: _TemperatureSensors_Title + text: qsTr(" Temp ") + width: _TemperatureSensorsColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + font.underline: true + } + Repeater { + model: [ + vTemperatureSensors.inletPrimaryHeater .toFixed(2) , + vTemperatureSensors.outletPrimaryHeater .toFixed(2) , + vTemperatureSensors.conductivitySensor1 .toFixed(2) , + vTemperatureSensors.conductivitySensor2 .toFixed(2) , + vTemperatureSensors.outletRedundancy .toFixed(2) , + vTemperatureSensors.inletDialysate .toFixed(2) , + vTemperatureSensors.primaryHeaterThermoCouple .toFixed(2) , + vTemperatureSensors.trimmerHeaterThermoCouple .toFixed(2) , + vTemperatureSensors.primaryHeaterColdJunction .toFixed(2) , + vTemperatureSensors.trimmerHeaterColdJunction .toFixed(2) , + vTemperatureSensors.primaryHeaterInternal .toFixed(2) , + vTemperatureSensors.trimmerHeaterInternal .toFixed(2) + ] + Text { + objectName: "_TemperatureSensors" + index + text: modelData + width: _TemperatureSensorsColumn.width + horizontalAlignment: Text.AlignRight + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + } + } } Index: sources/gui/qml/pages/SettingsHome.qml =================================================================== diff -u -r7d3062c841b788ced31d939dec990afe0de1442d -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision 7d3062c841b788ced31d939dec990afe0de1442d) +++ sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -28,268 +28,29 @@ */ ScreenItem { id: _root - USBButton { id: _usbButton - anchors { - top : parent.top - right : _exportButton.left - topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - } - } + TitleText { id: _titleText + anchors.horizontalCenter: parent.horizontalCenter; + anchors.top: parent.top + anchors.topMargin: 150 - ExportButton { id: _exportButton - width: 150 - height: 50 - anchors { - top : parent.top - right : _poweroffButton.left - topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - } - } + width: parent.width + text: qsTr("Device Settings") - TouchRect { id : _poweroffButton - width: 150 - height: Variables.logoHeight - animated: true - anchors { - top : parent.top - right : parent.right - topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - } - text.text: qsTr("Shutdown") - button.onPressed: { - _GuiView.doActionTransmit(GuiActions.PowerOff, GuiActions.NoData) - } } - Text { id : _canbusFaultCountText - property int count: 0 - visible: true - anchors { - top : parent.top - left : parent.left - topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - leftMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - } - text: qsTr("CAN Faults : %1").arg(count) - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } + Diagnostics { id: _diagnostics } - Connections { target: _GuiView - onDidActionReceive: { - if (vAction === GuiActions.CanBUSFaultCount ) { - _canbusFaultCountText.count = vData[0] - } - } - } + Column { + anchors.centerIn: parent; - Column { id: _BloodFlowColumn - width: 150 - spacing: 20 - topPadding: 100 - leftPadding: 10 - Text { - id: _BloodFlow_Title - text: qsTr(" Blood ") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true - } - Repeater { - model: [ - vTreatmentBloodFlow.bloodFlow_FlowSetPoint , - vTreatmentBloodFlow.bloodFlow_MeasuredFlow .toFixed(2) , - vTreatmentBloodFlow.bloodFlow_RotorSpeed .toFixed(2) , - vTreatmentBloodFlow.bloodFlow_MotorSpeed .toFixed(2) , - vTreatmentBloodFlow.bloodFlow_MotorCtlSpeed .toFixed(2) , - vTreatmentBloodFlow.bloodFlow_MotorCtlCurrent .toFixed(2) , - "%" + vTreatmentBloodFlow.bloodFlow_PWMDutyCycle .toFixed(2) - ] - Text { - text: modelData - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle + // add each settings page here. + SettingsItem { title : qsTr("Sound") } + SettingsItem { title : qsTr("Diagnostics") + onClicked: { + push(_diagnostics); } } } - Column { id: _DialysateInletFlowColumn - width : 150 - spacing : 20 - topPadding : 100 - leftPadding : 200 - Text { - id: _DialysateInletFlow_Title - text: qsTr(" Dlyst I ") - width: _DialysateInletFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true - } - Repeater { - model: [ - vTreatmentDialysateFlow.dialysateFlow_FlowSetPoint .toFixed(2) , - vTreatmentDialysateFlow.dialysateFlow_MeasuredFlow .toFixed(2) , - vTreatmentDialysateFlow.dialysateFlow_RotorSpeed .toFixed(2) , - vTreatmentDialysateFlow.dialysateFlow_MotorSpeed .toFixed(2) , - vTreatmentDialysateFlow.dialysateFlow_MotorCtlSpeed .toFixed(2) , - vTreatmentDialysateFlow.dialysateFlow_MotorCtlCurrent.toFixed(2) , - "%" + vTreatmentDialysateFlow.dialysateFlow_PWMDutyCycle .toFixed(2) - ] - Text { - text: modelData - width: _DialysateInletFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - } - } - Column { id: _DialysateOutletFlowColumn - width : 150 - spacing : 20 - topPadding : 100 - leftPadding : 400 - Text { - id: _DialysateOutletFlow_Title - text: qsTr(" Dlyst O ") - width: _DialysateOutletFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true - } - Repeater { - model: [ - vTreatmentUltrafiltration.ultrafiltration_RefUFVol .toFixed(2) , - vTreatmentUltrafiltration.ultrafiltration_MeasUFVol .toFixed(2) , - vTreatmentUltrafiltration.ultrafiltration_RotorSpeed .toFixed(2) , - vTreatmentUltrafiltration.ultrafiltration_MotorSpeed .toFixed(2) , - vTreatmentUltrafiltration.ultrafiltration_MotorCtlSpeed .toFixed(2) , - vTreatmentUltrafiltration.ultrafiltration_MotorCtlCurrent.toFixed(2) , - "%" + vTreatmentUltrafiltration.ultrafiltration_PWMDtCycle .toFixed(2) - ] - Text { - text: modelData - width: _DialysateOutletFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - } - } - - Column { id: _PressureOcclusionColumn - width : 150 - spacing : 20 - topPadding : 100 - leftPadding : 600 - Text { - id: _PressureOcclusion_Title - text: qsTr(" Prsr Oc ") - width: _PressureOcclusionColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true - } - Repeater { - model: [ - vTreatmentPressureOcclusion.pressureocclusion_ArterialPressure .toFixed(2) , - vTreatmentPressureOcclusion.pressureocclusion_VenousPressure .toFixed(2) , - vTreatmentPressureOcclusion.pressureocclusion_BloodPumpOcclusion .toFixed(2) , - vTreatmentPressureOcclusion.pressureocclusion_DialysateInletPumpOcclusion .toFixed(2) , - vTreatmentPressureOcclusion.pressureocclusion_DialysateOutletPumpOcclusion .toFixed(2) - ] - Text { - text: modelData - width: _PressureOcclusionColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - } - } - - Column { id: _LoadCellReadingsColumn - width : 150 - spacing : 20 - topPadding : 100 - leftPadding : 800 - Text { - id: _LoadCellReading_Title - text: qsTr(" LoadCl ") - width: _LoadCellReadingsColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true - } - Repeater { - model: [ - vLoadCellReadings.reservoir1Prim .toFixed(2) , - vLoadCellReadings.reservoir1Bkup .toFixed(2) , - vLoadCellReadings.reservoir2Prim .toFixed(2) , - vLoadCellReadings.reservoir2Bkup .toFixed(2) - ] - Text { - objectName: "_LoadCellReadings" + index - text: modelData - width: _LoadCellReadingsColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - } - } - - Column { id: _TemperatureSensorsColumn - width : 150 - spacing : -5 - topPadding : 100 - leftPadding : 1000 - Text { - id: _TemperatureSensors_Title - text: qsTr(" Temp ") - width: _TemperatureSensorsColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true - } - Repeater { - model: [ - vTemperatureSensors.inletPrimaryHeater .toFixed(2) , - vTemperatureSensors.outletPrimaryHeater .toFixed(2) , - vTemperatureSensors.conductivitySensor1 .toFixed(2) , - vTemperatureSensors.conductivitySensor2 .toFixed(2) , - vTemperatureSensors.outletRedundancy .toFixed(2) , - vTemperatureSensors.inletDialysate .toFixed(2) , - vTemperatureSensors.primaryHeaterThermoCouple .toFixed(2) , - vTemperatureSensors.trimmerHeaterThermoCouple .toFixed(2) , - vTemperatureSensors.primaryHeaterColdJunction .toFixed(2) , - vTemperatureSensors.trimmerHeaterColdJunction .toFixed(2) , - vTemperatureSensors.primaryHeaterInternal .toFixed(2) , - vTemperatureSensors.trimmerHeaterInternal .toFixed(2) - ] - Text { - objectName: "_TemperatureSensors" + index - text: modelData - width: _TemperatureSensorsColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - } - } } Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml =================================================================== diff -u -r34471900489397f483e052870ddc46059cef49fb -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml (.../TreatmentAdjustmentBase.qml) (revision 34471900489397f483e052870ddc46059cef49fb) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml (.../TreatmentAdjustmentBase.qml) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -26,24 +26,37 @@ * For all adjustment screens in treatment */ ModalDialog { id: _root + contentItem.objectName: "TreatmentAdjustmentBase" //SquishQt testability property string titleText: "" + property bool closeVisible: true + property bool confirmVisible: true + property bool backVisible: false + property bool pausedVisible: false + signal closeClicked() signal confirmClicked() + signal backClicked() onVisibleChanged: { - notificationText = ""; + notification.text = "" } header: Rectangle { id : _headerRect - ConfirmButton { + ConfirmButton { id : _confirmButton + visible: _root.confirmVisible anchors.left: parent.left onClicked : confirmClicked() } + BackButton { id : _backButton + visible: _root.backVisible + anchors.left: parent.left + onClicked : backClicked() + } - TitleText { + TitleText { id : _titleText text: titleText font.pixelSize: Fonts.fontPixelButton color: Colors.textMain @@ -55,9 +68,16 @@ } } - CloseButton { + CloseButton { id : _closeButton + visible: _root.closeVisible anchors.right: parent.right onClicked : closeClicked() } } + + NotificationBar2 { id: _pausedNotification + visible : pausedVisible && !notification.visible + text : qsTr("Ultrafiltration is paused.") + imageSource: "qrc:/images/iPauseGray" + } } Index: sources/model/malarmstatus.cpp =================================================================== diff -u -rb798668f16ad0967ab97e96f5f9a2cdd821e899f -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 --- sources/model/malarmstatus.cpp (.../malarmstatus.cpp) (revision b798668f16ad0967ab97e96f5f9a2cdd821e899f) +++ sources/model/malarmstatus.cpp (.../malarmstatus.cpp) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) @@ -13,7 +13,6 @@ */ #include "malarmstatus.h" - using namespace Model; MAlarmStatus::MAlarmStatus() { } @@ -55,3 +54,70 @@ data.mFlags = _data.mFlags ; return data; } + +/** + * @brief MAlarmStatus::toText + * Looks up the alarm description using the alarm enum + * @param val - the alarm enum (int) + * @return The alarm description (QString) + */ +QString MAlarmStatus::toText(GuiAlarmID id) { + + QString result; + switch (id) { + case GuiAlarmID::ALARM_ID_NO_ALARM: { result = QObject::tr(""); break; } + case GuiAlarmID::ALARM_ID_SOFTWARE_FAULT: { result = QObject::tr("Software Error"); break; } + case GuiAlarmID::ALARM_ID_STUCK_BUTTON_TEST_FAILED: { result = QObject::tr("Indication for when no alarms is a possible situation."); break; } + case GuiAlarmID::ALARM_ID_FPGA_POST_TEST_FAILED: { result = QObject::tr("FPGA POST failure."); break; } + case GuiAlarmID::ALARM_ID_WATCHDOG_POST_TEST_FAILED: { result = QObject::tr("Watchdog POST failure."); break; } + case GuiAlarmID::ALARM_ID_UI_COMM_POST_FAILED: { result = QObject::tr("UI communication POST failure."); break; } + case GuiAlarmID::ALARM_ID_BLOOD_PUMP_MC_CURRENT_CHECK: { result = QObject::tr("Blood pump failed motor controller current check."); break; } +// case GuiAlarmID::ALARM_ID_BLOOD_PUMP_MC_SPEED_CHECK: { result = QObject::tr("Blood pump failed motor controller speed check."); break; } + case GuiAlarmID::ALARM_ID_BLOOD_PUMP_MC_DIRECTION_CHECK: { result = QObject::tr("Blood pump failed motor controller direction check."); break; } + case GuiAlarmID::ALARM_ID_BLOOD_PUMP_ROTOR_SPEED_CHECK: { result = QObject::tr("Blood pump failed rotor speed check."); break; } + case GuiAlarmID::ALARM_ID_DIAL_IN_PUMP_MC_CURRENT_CHECK: { result = QObject::tr("Dialysis inlet pump failed motor controller current check."); break; } +// case GuiAlarmID::ALARM_ID_DIAL_IN_PUMP_MC_SPEED_CHECK: { result = QObject::tr("Dialysis inlet pump failed motor controller speed check."); break; } + case GuiAlarmID::ALARM_ID_DIAL_IN_PUMP_MC_DIRECTION_CHECK: { result = QObject::tr("Dialysis inlet pump failed motor controller direction check."); break; } + case GuiAlarmID::ALARM_ID_DIAL_IN_PUMP_ROTOR_SPEED_CHECK: { result = QObject::tr("Dialysis inlet pump failed rotor speed check. "); break; } + case GuiAlarmID::ALARM_ID_DIAL_OUT_PUMP_MC_CURRENT_CHECK: { result = QObject::tr("Dialysis outlet pump failed motor controller current check. "); break; } +// case GuiAlarmID::ALARM_ID_DIAL_OUT_PUMP_MC_SPEED_CHECK: { result = QObject::tr("Dialysis outlet pump failed motor controller speed check. "); break; } + case GuiAlarmID::ALARM_ID_DIAL_OUT_PUMP_MC_DIRECTION_CHECK: { result = QObject::tr("Dialysis outlet pump failed motor controller direction check. "); break; } + case GuiAlarmID::ALARM_ID_DIAL_OUT_PUMP_ROTOR_SPEED_CHECK: { result = QObject::tr("Dialysis outlet pump failed rotor speed check. "); break; } + case GuiAlarmID::ALARM_ID_WATCHDOG_EXPIRED: { result = QObject::tr("Watchdog expired error. "); break; } + case GuiAlarmID::ALARM_ID_RTC_COMM_ERROR: { result = QObject::tr("Real-time clock communication error. "); break; } + case GuiAlarmID::ALARM_ID_RTC_CONFIG_ERROR: { result = QObject::tr("Real-time clock configuration error. "); break; } + case GuiAlarmID::ALARM_ID_DG_COMM_TIMEOUT: { result = QObject::tr("Dialysate generator communication timeout. "); break; } + case GuiAlarmID::ALARM_ID_UI_COMM_TIMEOUT: { result = QObject::tr("User interface communication timeout. "); break; } + case GuiAlarmID::ALARM_ID_COMM_TOO_MANY_BAD_CRCS: { result = QObject::tr("Too many bad CRCs detected on received system messages. "); break; } + case GuiAlarmID::ALARM_ID_TREATMENT_STOPPED_BY_USER: { result = QObject::tr("Treatment stopped by user action - pressed stop button. "); break; } + case GuiAlarmID::ALARM_ID_BLOOD_SITTING_WARNING: { result = QObject::tr("Blood sitting too long warning (>4 min). "); break; } + case GuiAlarmID::ALARM_ID_BLOOD_SITTING_TOO_LONG_NO_RESUME: { result = QObject::tr("Blood sitting too long alarm (>5 min). "); break; } + case GuiAlarmID::ALARM_ID_BLOOD_SITTING_TOO_LONG_NO_RINSEBACK: { result = QObject::tr("Blood sitting too long alarm (>10 min). "); break; } + case GuiAlarmID::ALARM_ID_CAN_MESSAGE_NOT_ACKED: { result = QObject::tr("System message needing acknowledgment was not acknowledged. "); break; } + case GuiAlarmID::ALARM_ID_OCCLUSION_BLOOD_PUMP: { result = QObject::tr("Blood pump occlusion detected. "); break; } + case GuiAlarmID::ALARM_ID_OCCLUSION_DIAL_IN_PUMP: { result = QObject::tr("Dialysate inlet pump occlusion detected. "); break; } + case GuiAlarmID::ALARM_ID_OCCLUSION_DIAL_OUT_PUMP: { result = QObject::tr("Dialysate outlet pump occlusion detected. "); break; } + case GuiAlarmID::ALARM_ID_ARTERIAL_PRESSURE_LOW: { result = QObject::tr("Arterial pressure too low during treatment. "); break; } + case GuiAlarmID::ALARM_ID_ARTERIAL_PRESSURE_HIGH: { result = QObject::tr("Arterial pressure too high during treatment. "); break; } + case GuiAlarmID::ALARM_ID_VENOUS_PRESSURE_LOW: { result = QObject::tr("Venous pressure too low during treatment. "); break; } + case GuiAlarmID::ALARM_ID_VENOUS_PRESSURE_HIGH: { result = QObject::tr("Venous pressure too high during treatment."); break; } + case GuiAlarmID::ALARM_ID_UF_RATE_TOO_HIGH_ERROR: { result = QObject::tr("Ultrafiltration rate is too high error during treatment. "); break; } + case GuiAlarmID::ALARM_ID_UF_VOLUME_ACCURACY_ERROR: { result = QObject::tr("Ultrafiltration volume accuracy error during treatment. "); break; } + case GuiAlarmID::ALARM_ID_RTC_BATTERY_LOW: { result = QObject::tr("RTC battery low. "); break; } + case GuiAlarmID::ALARM_ID_RTC_OR_TIMER_ACCURACY_FAILURE: { result = QObject::tr("RTC or MCU timer inaccurate. "); break; } + case GuiAlarmID::ALARM_ID_RTC_RAM_OPS_ERROR: { result = QObject::tr("RTC or RAM operations failure (read or write). "); break; } + case GuiAlarmID::ALARM_ID_NVDATA_EEPROM_OPS_FAILURE: { result = QObject::tr("EEPRON operations (read, write, erase) failure. "); break; } + case GuiAlarmID::ALARM_ID_NVDATA_MFG_RECORD_CRC_ERROR: { result = QObject::tr("Manufacturing record CRC failure. "); break; } + case GuiAlarmID::ALARM_ID_NVDATA_SRVC_RECORD_CRC_ERROR: { result = QObject::tr("Service record CRC failure. "); break; } + case GuiAlarmID::ALARM_ID_NVDATA_CAL_RECORD_CRC_ERROR: { result = QObject::tr("Calibration record CRC failure. "); break; } + case GuiAlarmID::ALARM_ID_NVDATA_HW_USAGE_DATA_CRC_ERROR: { result = QObject::tr("HW usage data failure. "); break; } + case GuiAlarmID::AlARM_ID_NVDATA_DISINFECTION_DATE_CRC_ERROR: { result = QObject::tr("Last disinfection date CRC error "); break; } + case GuiAlarmID::ALARM_ID_RO_PUMP_OUT_PRESSURE_OUT_OF_RANGE: { result = QObject::tr("Pressure at outlet of RO pump is out of range. "); break; } + case GuiAlarmID::ALARM_ID_TEMPERATURE_SENSORS_OUT_OF_RANGE: { result = QObject::tr("DG temperature sensors ADC read out of range. "); break; } + case GuiAlarmID::ALARM_ID_TEMPERATURE_SENSORS_INCONSISTENT: { result = QObject::tr("DG temperature sensors values are inconsistent "); break; } + case GuiAlarmID::ALARM_ID_HD_COMM_TIMEOUT: { result = QObject::tr("HD communication timeout. "); break; } + default: { result = QObject::tr("Alarm Not Recognized"); break; } + } + return result; + +}