Index: denali.pro.user =================================================================== diff -u -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 -r73b965e55528619f22a12ae3b3408c9dcecc9144 --- denali.pro.user (.../denali.pro.user) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) +++ denali.pro.user (.../denali.pro.user) (revision 73b965e55528619f22a12ae3b3408c9dcecc9144) @@ -1,6 +1,6 @@ - + EnvironmentId Index: denali.qrc =================================================================== diff -u -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 -r73b965e55528619f22a12ae3b3408c9dcecc9144 --- denali.qrc (.../denali.qrc) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) +++ denali.qrc (.../denali.qrc) (revision 73b965e55528619f22a12ae3b3408c9dcecc9144) @@ -63,7 +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/NotificationBarSmall.qml sources/gui/qml/components/UltrafiltrationButton.qml sources/gui/qml/components/ImageWave.qml sources/gui/qml/components/ImageClock.qml Index: main.cpp =================================================================== diff -u -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 -r73b965e55528619f22a12ae3b3408c9dcecc9144 --- main.cpp (.../main.cpp) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) +++ main.cpp (.../main.cpp) (revision 73b965e55528619f22a12ae3b3408c9dcecc9144) @@ -69,6 +69,7 @@ bool gSendEmptyKeepAwake = false ; bool gFakeSeqAtBegin = false ; bool gDisableHunhandledReport = false ; +bool gDisableAlarms = false ; bool gConsoleoutFrameInterface = false ; bool gConsoleoutCanInterface = false ; @@ -145,13 +146,19 @@ QCoreApplication::translate("main", "Disable unhandled messages report as an error in the log")); parser.addOption(optionDisableHunhandledReport); + // --- -u : disable-unhandled-report + QCommandLineOption optionDisableAlarms(QStringList() << "q" << "disable-alarms", + QCoreApplication::translate("main", "Disables UI display of alarms")); + parser.addOption(optionDisableAlarms); + // --- parse command lines parser.process(*qApp); gConsoleoutCanInterface = parser.isSet(optionConsoleoutCanInterface ); gConsoleoutFrameInterface = parser.isSet(optionConsoleoutFrameInterface ); gDisableHunhandledReport = parser.isSet(optionDisableHunhandledReport ); + gDisableAlarms = parser.isSet(optionDisableAlarms ); if (parser.isSet(optionSendEmptyKeepAwake)) gSendEmptyKeepAwake = true; bool ok = false; Fisheye: Tag 73b965e55528619f22a12ae3b3408c9dcecc9144 refers to a dead (removed) revision in file `sources/gui/qml/components/NotificationBar2.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/components/NotificationBarSmall.qml =================================================================== diff -u --- sources/gui/qml/components/NotificationBarSmall.qml (revision 0) +++ sources/gui/qml/components/NotificationBarSmall.qml (revision 73b965e55528619f22a12ae3b3408c9dcecc9144) @@ -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 -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 -r73b965e55528619f22a12ae3b3408c9dcecc9144 --- sources/gui/qml/components/TouchArea.qml (.../TouchArea.qml) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) +++ sources/gui/qml/components/TouchArea.qml (.../TouchArea.qml) (revision 73b965e55528619f22a12ae3b3408c9dcecc9144) @@ -74,7 +74,7 @@ Component.onCompleted: { } - NotificationBar2 { id: _notification + NotificationBarSmall { id: _notification height : 25 imageAutoSize: true color: "transparent" Index: sources/gui/qml/main.qml =================================================================== diff -u -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 -r73b965e55528619f22a12ae3b3408c9dcecc9144 --- sources/gui/qml/main.qml (.../main.qml) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) +++ sources/gui/qml/main.qml (.../main.qml) (revision 73b965e55528619f22a12ae3b3408c9dcecc9144) @@ -174,6 +174,7 @@ } NotificationDialog { id: _alarm_dialog + alarmID: -1 onClosed: { _alarm_bar.visible = true; } Index: sources/gui/qml/pages/SettingsHome.qml =================================================================== diff -u -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 -r73b965e55528619f22a12ae3b3408c9dcecc9144 --- sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) +++ sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision 73b965e55528619f22a12ae3b3408c9dcecc9144) @@ -44,8 +44,11 @@ anchors.centerIn: parent; // add each settings page here. - SettingsItem { title : qsTr("Sound") } - SettingsItem { title : qsTr("Diagnostics") + SettingsItem { id: _item_sound + title : qsTr("Sound") + } + SettingsItem { id: _item_diagnostics + title : qsTr("Diagnostics") onClicked: { push(_diagnostics); } Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml =================================================================== diff -u -rcbea4224ad67eecc2e7c4c66df9a7db711c72832 -r73b965e55528619f22a12ae3b3408c9dcecc9144 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml (.../TreatmentAdjustmentBase.qml) (revision cbea4224ad67eecc2e7c4c66df9a7db711c72832) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentBase.qml (.../TreatmentAdjustmentBase.qml) (revision 73b965e55528619f22a12ae3b3408c9dcecc9144) @@ -75,7 +75,7 @@ } } - NotificationBar2 { id: _pausedNotification + NotificationBarSmall { id: _pausedNotification visible : pausedVisible && !notification.visible text : qsTr("Ultrafiltration is paused.") imageSource: "qrc:/images/iPauseGray" Index: sources/main.h =================================================================== diff -u -r9cfaddcf21cf36ab5a948b65dd8ef659598a4ed7 -r73b965e55528619f22a12ae3b3408c9dcecc9144 --- sources/main.h (.../main.h) (revision 9cfaddcf21cf36ab5a948b65dd8ef659598a4ed7) +++ sources/main.h (.../main.h) (revision 73b965e55528619f22a12ae3b3408c9dcecc9144) @@ -44,6 +44,7 @@ extern bool gSendEmptyKeepAwake; extern bool gFakeSeqAtBegin; extern bool gDisableHunhandledReport; +extern bool gDisableAlarms; //--------------------------------------------------------------------------------// //--------------------------------------------------------------------------------// #define DEBUG_PROPERTY_CHANGED(vVARIABLE) //qDebug() << "#" << #vVARIABLE << v##vVARIABLE; Index: sources/view/valarmstatus.cpp =================================================================== diff -u -r603e08a20dcc314f05c29ecbfd453c9153b0f8dd -r73b965e55528619f22a12ae3b3408c9dcecc9144 --- sources/view/valarmstatus.cpp (.../valarmstatus.cpp) (revision 603e08a20dcc314f05c29ecbfd453c9153b0f8dd) +++ sources/view/valarmstatus.cpp (.../valarmstatus.cpp) (revision 73b965e55528619f22a12ae3b3408c9dcecc9144) @@ -29,6 +29,11 @@ void VAlarmStatus::onActionReceive(const AlarmStatusData &vData) { + if (gDisableAlarms) { + LOG_EVENT(tr("Disabling ID %0 has been acknowleged and is visible. ")); + return; + } + GuiAlarmID alarmID = static_cast(vData.mTop); if (acknowledgedAlarms.contains(alarmID)) { qDebug() << "Alarm ID " << alarmID << " has been acknowleged and is visible. ";