Index: denali.pro =================================================================== diff -u -r86acb3c49bfc7c4ed8fc860d895c0603b4816b3a -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- denali.pro (.../denali.pro) (revision 86acb3c49bfc7c4ed8fc860d895c0603b4816b3a) +++ denali.pro (.../denali.pro) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -268,11 +268,10 @@ sources/view/VTreatmentCreate.h \ sources/view/VEventSpy.h \ sources/view/VView.h \ - sources/view/VPowerOff.h \ sources/view/VGeneralEvent.h \ sources/device/DeviceView.h \ \ # ---------- Views - CONFIRM - sources/view/confirm/VConfirmDialog.h \ + sources/view/confirm/VConfirm.h \ \ # ---------- Views - POST sources/view/dg/data/post/VDGPOSTData.h \ \ # ---------- Views - Settings @@ -389,7 +388,7 @@ sources/device/DeviceController.cpp \ sources/model/ui/data/MUIBloodPressureData.cpp \ sources/storage/Settings.cpp \ - sources/storage/TreatmentLog.cpp \ + sources/storage/TreatmentLog.cpp \ sources/view/hd/data/post/VHDPOSTData.cpp \ sources/wifi/WifiInterface.cpp \ sources/bluetooth/BluetoothInterface.cpp \ @@ -529,11 +528,10 @@ \ # ---------- Views ---------- sources/view/VTreatmentCreate.cpp \ sources/view/VEventSpy.cpp \ - sources/view/VPowerOff.cpp \ sources/view/VGeneralEvent.cpp \ sources/device/DeviceView.cpp \ \ # ---------- Views - CONFIRM - sources/view/confirm/VConfirmDialog.cpp \ + sources/view/confirm/VConfirm.cpp \ \ # ---------- Views - POST sources/view/dg/data/post/VDGPOSTData.cpp \ \ # ---------- Views - Alarm Index: denali.pro.user =================================================================== diff -u -r86acb3c49bfc7c4ed8fc860d895c0603b4816b3a -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- denali.pro.user (.../denali.pro.user) (revision 86acb3c49bfc7c4ed8fc860d895c0603b4816b3a) +++ denali.pro.user (.../denali.pro.user) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -1,6 +1,6 @@ - + EnvironmentId @@ -1230,7 +1230,7 @@ denali Qt4ProjectManager.Qt4RunConfiguration:/home/denali/Projects/application/denali.pro - --disable-timeout --disable-alarm-no-minimize --disable-unhandled-report --disable-check-in-log + --disable-timeout --disable-unhandled-report 3768 false true Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r86acb3c49bfc7c4ed8fc860d895c0603b4816b3a -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 86acb3c49bfc7c4ed8fc860d895c0603b4816b3a) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -49,13 +49,13 @@ // but if the model still needs more the model will fail. // so it is better to keep them next to each other to make sure they are in sync. // ---- - {Gui::GuiActionType::ID_PowerOff , 1 }, + {Gui::GuiActionType::ID_PowerOff , 1 }, // 1 byte {Gui::GuiActionType::ID_ShuttingDown , 0 }, {Gui::GuiActionType::ID_KeepAlive , 255 }, // 0 => 255 to be able to run a multi-frame test. // Generic Confirm {Gui::GuiActionType::ID_DuetConfirmHDi , 3 * 4 }, // 3 parameters each 4bytes - {Gui::GuiActionType::ID_DuetConfirmUIr , 3 * 4 }, // 3 parameters each 4bytes + {Gui::GuiActionType::ID_DuetConfirmUIr , 2 * 4 }, // 2 parameters each 4bytes // POST {Gui::GuiActionType::ID_HDPostSingleResultData , 2 * 4 }, // 2 parameters each 4bytes Index: sources/gui/GuiGlobals.cpp =================================================================== diff -u -r86acb3c49bfc7c4ed8fc860d895c0603b4816b3a -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 86acb3c49bfc7c4ed8fc860d895c0603b4816b3a) +++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -29,7 +29,7 @@ #include "VDGPOSTData.h" // Confirm -#include "VConfirmDialog.h" +#include "VConfirm.h" // Device #include "DeviceView.h" @@ -40,7 +40,6 @@ #include "VSettings.h" #include "VAlarmStatus.h" #include "VAlarmActiveList.h" -#include "VPowerOff.h" #include "VAdjustmentVersions.h" #include "VAdjustmentServiceMode.h" #include "VAdjustmentServiceDates.h" Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r86acb3c49bfc7c4ed8fc860d895c0603b4816b3a -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 86acb3c49bfc7c4ed8fc860d895c0603b4816b3a) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -303,6 +303,10 @@ Q_ENUM(Request_Reject_Reasons) #include "HDDefs.h" + // Confirm + Q_ENUM(Generic_Confirm_Id) + Q_ENUM(Generic_Confirm_Command) + // Q_ENUM(HD_POST_States) Q_ENUM(HD_Op_Modes) Q_ENUM(HD_Standby_States) @@ -371,6 +375,9 @@ typedef GuiActions::Alarm_Data_Types GuiAlarmDataTypes; typedef GuiActions::Request_Reject_Reasons GuiRequestReasons; + // confirm + typedef GuiActions::Generic_Confirm_Id GuiConfirmId; + typedef GuiActions::Generic_Confirm_Command GuiConfirmCommand; // POST typedef GuiActions::HD_POST_States GuiHDPOSTStates; typedef GuiActions::DG_POST_States GuiDGPOSTStates; Index: sources/gui/qml/AlarmItem.qml =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- sources/gui/qml/AlarmItem.qml (.../AlarmItem.qml) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/gui/qml/AlarmItem.qml (.../AlarmItem.qml) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -52,6 +52,12 @@ // Alarms dialog/bar navigation handling ----- vvvvv ----- function alarmMinimize() { + // The has alarm check has been added here to let other components call this function, + // without worrying about the alarmDialog popoing up without an alarm present. + // Look at the PowerItem as an example. + if ( ! vAlarmStatus.hasAlarm ) return + + _alarmDialog .visible = false _alarmListDialog.visible = false _alarmBar .visible = true @@ -60,7 +66,7 @@ // The has alarm check has been added here to let other components call this function, // without worrying about the alarmDialog popoing up without an alarm present. // Look at the PowerItem as an example. - if ( ! vAlarmStatus.hasAlarm ) return; + if ( ! vAlarmStatus.hasAlarm ) return if ( _root._DEBUG_DISABLE_MAXIMIZE_ ) { alarmMinimize() Index: sources/gui/qml/PowerItem.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- sources/gui/qml/PowerItem.qml (.../PowerItem.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/PowerItem.qml (.../PowerItem.qml) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -20,8 +20,10 @@ // C++ imports import Gui.View 0.1 import Gui.Actions 0.1 -import VPowerOff 0.1 +// Confirm +import VConfirm 0.1 + // Qml imports import "qrc:/globals" import "qrc:/components" @@ -34,24 +36,18 @@ Item { id: _root anchors.fill: parent - VPowerOff { id: vPowerOff } - + VConfirm { id: vConfirm } AutoHideInfo { id: _autoHideInfo } - Connections { target: _GuiView - onDidActionReceive: { - switch(vAction) { - case GuiActions.ID_ShuttingDown: - _autoHideInfo.showDialog( - qsTr("System is shutting down"), - 5000 // if any error happens and shutdown is not successful then after 5 seconds dialog hides. - ) - break; - } - } - } - PowerOff { id: _powerOffDialog + visible : vConfirm.visible + titleText : vConfirm.title + messageText : vConfirm.message + confirmText : vConfirm.confirm + confirmVisible : ! vConfirm.isReject + cancelText : vConfirm.cancel + notificationText: vConfirm.adjustment_ReasonText + onVisibleChanged: { if (visible) _alarmItem.alarmHide() else _alarmItem.alarmMaximize() @@ -64,27 +60,63 @@ } } - Connections { target: vPowerOff - onPoweroffTriggered: { - switch (vpoweroff) { - case GuiActions.Command: - _powerOffDialog.open() - _alarmItem.alarmHide() - break; + function open() { + _powerOffDialog.open() + _alarmItem.alarmMinimize() + } - case GuiActions.Timeout: - _powerOffDialog.close() - _alarmItem.alarmMaximize() - break; + function close() { + _powerOffDialog.close() + _alarmItem.alarmMaximize() + } - case GuiActions.Rejected: - _autoHideInfo.showDialog( - qsTr("Cannot shutdown during 'Treatment'"), // '%1').arg() - 2000 // notifies user and hides the dialog + function reject() { // the power off is the only confirm has separate reject dialog, because the button is not only on UI and is HW as well. + _autoHideInfo.showDialog( + qsTr("Cannot shutdown during 'Treatment'"), // '%1').arg() + 2000 // notifies user and hides the dialog + ) + } + + // ---- Connections + Connections { target: _GuiView + onDidActionReceive: { + switch(vAction) { + case GuiActions.ID_ShuttingDown: + _autoHideInfo.showDialog ( + qsTr("System is shutting down"), + 5000 // if any error happens and shutdown is not successful then after 5 seconds dialog hides. ) break; } } } + Connections { target: vConfirm + onIsRejectChanged: { + _powerOffDialog.footerUpdate() + } + + onVisibleChanged: { + if ( vvisible ) open () + else close () + } + + onPoweroffTriggered: { + switch (vpoweroff) { + case GuiActions.Command : open (); break; + case GuiActions.Timeout : close (); break; + case GuiActions.Rejected: reject(); break; + } + } + onAdjustmentTriggered: { + // DEBUG: + // console.debug('\n' + + // 'id : ' + vConfirm.id + '\n' + + // 'command : ' + vConfirm.command + '\n' + + // 'title : ' + vConfirm.title + '\n' + + // 'message : ' + vConfirm.message + '\n' + + // 'adjustment_ReasonText : ' + vConfirm.adjustment_ReasonText + // ) + } + } } Index: sources/gui/qml/components/Footer.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- sources/gui/qml/components/Footer.qml (.../Footer.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/components/Footer.qml (.../Footer.qml) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -35,26 +35,38 @@ property int spacing : 0 } - // this code will run once and will not run for each child, - // that's becuase the available property to add children is the children property - // and that property can only change by assigning a list to it. - // so it happens once with no performance issue of multiple redundant call. - onVisibleChanged: { + function update() { // check there is a child let count = childrenCount if ( ! count ) return let width = childrenWidth - let spacing = (_root.width - (width * count)) / (count + 1) + let visibleCount = 0 for (let i = 0; i < count; i++) { - if (children[i].width !== width) { - children[i].width = width + console.debug(children[i].text.text) + if ( children[i].visible ) { + + visibleCount += 1 + if (children[i].width !== width) { + children[i].width = width + } } + else { + children[i].width = 0 + } } + let spacing = (_root.width - (width * visibleCount)) / (visibleCount + 1) + console.debug( " ~~~~~~~~~~ ", count, visibleCount, spacing) _private.spacing = spacing } + // this code will run once and will not run for each child, + // that's becuase the available property to add children is the children property + // and that property can only change by assigning a list to it. + // so it happens once with no performance issue of multiple redundant call. + onVisibleChanged : update() + spacing : _private.spacing rightPadding : _private.spacing leftPadding : _private.spacing Index: sources/gui/qml/components/TouchRect.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -29,6 +29,7 @@ property alias pixelSize : _text.font.pixelSize property alias fgColor : _text.color property alias bgColor : _root.color + property alias textString : _text.text property bool touchable : true property bool animated : true Index: sources/gui/qml/dialogs/PowerOff.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- sources/gui/qml/dialogs/PowerOff.qml (.../PowerOff.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/dialogs/PowerOff.qml (.../PowerOff.qml) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -25,28 +25,53 @@ * \brief Contains the PowerOff Dialog Implementation */ ModalDialog { id : _root - contentItem.objectName: "PowerOffDialog" //SquishQt testability + contentItem.objectName : "PowerOffDialog" //SquishQt testability + property alias titleText : _titleText.text + property alias messageText : _messageText.text + property alias confirmText : _confirmTouch.textString + property alias confirmVisible : _confirmTouch.visible + property alias cancelText : _cancelTouch.textString + property alias cancelVisible : _cancelTouch.visible - Column { - spacing: Variables.columnSpacing - anchors.centerIn: parent - TitleText { id: _titleText - width: parent.width - text: qsTr("Are you sure you want to Shutdown?") - } - TouchRect { id : _shutdownRect - text.text: qsTr("SHUTDOWN") - onPressed: { - accepted() - close() + notification.iconVisible: false + + function footerUpdate() { + _footer.update() + } + + TitleText { id: _titleText + width : _root.width + height : Variables.mainMenuHeight + anchors.top : parent.top + anchors.topMargin : Variables.minVGap2 // Since it doesnt have border, it looks too close to top border. + clip : true + } + + TitleText { id: _messageText + anchors.centerIn : parent + width : parent.width + height : Variables.mainMenuHeight * 4 // title + reason + 2*Gap + clip : true + text : qsTr("Are you sure you want to Shutdown?") + } + + Footer { id: _footer + childrenWidth: 350 + children: [ + TouchRect { id : _cancelTouch + textString : qsTr("CANCEL") + onPressed : { + rejected() + close() + } + }, + TouchRect { id : _confirmTouch + textString : qsTr("SHUTDOWN") + onPressed : { + accepted() + close() + } } - } - TouchRect { id : _cancelTouch - text.text: qsTr("CANCEL") - onPressed: { - rejected() - close() - } - } + ] } } Index: sources/gui/qml/main.qml =================================================================== diff -u -r86acb3c49bfc7c4ed8fc860d895c0603b4816b3a -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- sources/gui/qml/main.qml (.../main.qml) (revision 86acb3c49bfc7c4ed8fc860d895c0603b4816b3a) +++ sources/gui/qml/main.qml (.../main.qml) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -32,10 +32,6 @@ import VHDPOSTData 0.1 import VDGPOSTData 0.1 - -// Confirm -import VConfirmDialog 0.1 - // Device import VDevice 0.1 @@ -135,8 +131,6 @@ VHDPOSTData { id: vHDPOSTData } VDGPOSTData { id: vDGPOSTData } - VConfirmDialog { id: vConfirmDialog } - VDevice { id: vDevice } VSettings { id: vSettings } VAdjustmentVersions { id: vAdjustmentVersions } Index: sources/model/hd/alarm/MAlarmMapping.cpp =================================================================== diff -u -r86acb3c49bfc7c4ed8fc860d895c0603b4816b3a -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- sources/model/hd/alarm/MAlarmMapping.cpp (.../MAlarmMapping.cpp) (revision 86acb3c49bfc7c4ed8fc860d895c0603b4816b3a) +++ sources/model/hd/alarm/MAlarmMapping.cpp (.../MAlarmMapping.cpp) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -7,7 +7,7 @@ * * \file MAlarmMapping.cpp * \author (last) Behrouz NematiPour - * \date (last) 22-Sep-2022 + * \date (last) 30-Sep-2022 * \author (original) Behrouz NematiPour * \date (original) 03-May-2021 * Fisheye: Tag 13e65c3d271d503c2e2e2f1f20736652c470f8cc refers to a dead (removed) revision in file `sources/view/VPowerOff.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 13e65c3d271d503c2e2e2f1f20736652c470f8cc refers to a dead (removed) revision in file `sources/view/VPowerOff.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/view/VView.h =================================================================== diff -u -r86acb3c49bfc7c4ed8fc860d895c0603b4816b3a -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- sources/view/VView.h (.../VView.h) (revision 86acb3c49bfc7c4ed8fc860d895c0603b4816b3a) +++ sources/view/VView.h (.../VView.h) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -103,7 +103,7 @@ using namespace View; \ REGISTER_TYPE( VGeneralEvent ) \ /* CONFIRM */ \ - REGISTER_TYPE( VConfirmDialog ) \ + REGISTER_TYPE( VConfirm ) \ /* POST */ \ REGISTER_TYPE( VHDPOSTData ) \ REGISTER_TYPE( VDGPOSTData ) \ @@ -121,8 +121,6 @@ /* Alarm */ \ REGISTER_TYPE( VAlarmStatus ) \ REGISTER_TYPE( VAlarmActiveList ) \ - /* Power off */ \ - REGISTER_TYPE( VPowerOff ) \ /* Treatment Common */ \ REGISTER_TYPE( VTreatmentVitals ) \ /* Data - States */ \ Index: sources/view/confirm/VConfirm.cpp =================================================================== diff -u --- sources/view/confirm/VConfirm.cpp (revision 0) +++ sources/view/confirm/VConfirm.cpp (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -0,0 +1,107 @@ +/*! + * + * Copyright (c) 2021-2022 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file VConfirm.cpp + * \author (last) Behrouz NematiPour + * \date (last) 22-Sep-2022 + * \author (original) Behrouz NematiPour + * \date (original) 22-Sep-2022 + * + */ +#include "VConfirm.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VConfirm) + +/*! + * \brief Connection Initializer + * \details All the class signal/slot connections are defined here. +*/ +void View::VConfirm::initConnections() { + ACTION_VIEW_CONNECTION(DuetConfirmHDiData ); + ACTION_VIEW_CONNECTION(PowerOffData ); +} + +/*! + * \brief VConfirm::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void View::VConfirm::onActionReceive(const DuetConfirmHDiData &vData) +{ + id ( vData.mId ); + command ( vData.mCommand ); + + GuiConfirmCommand cmd = static_cast( _command ); + switch ( cmd ) { + case GuiConfirmCommand::GENERIC_CONFIRM_CMD_REQUEST_OPEN : + adjustment_Reason ( GuiConfirmId::GENERIC_CONFIRM_ID_NONE ); + adjustment_Accepted ( false ); // it has not been accepted yet. + isTimeout ( false ); + isReject ( false ); + isAccept ( false ); + break; + case GuiConfirmCommand::GENERIC_CONFIRM_CMD_TIMEOUT_CLOSE : + adjustment_Reason ( GuiConfirmId::GENERIC_CONFIRM_ID_NONE ); // there is no need to display the timeout reason and just hides the dialog. + adjustment_Accepted ( false ); + isTimeout ( true ); + isReject ( false ); + isAccept ( false ); + break; + case GuiConfirmCommand::GENERIC_CONFIRM_CMD_REJECT : + adjustment_Reason ( vData.mReason ); // there is no need to display the timeout reason and just hides the dialog. + adjustment_Accepted ( false ); + isTimeout ( false ); + isReject ( true ); + isAccept ( false ); + break; + case GuiConfirmCommand::GENERIC_CONFIRM_CMD_ACCEPT_CLOSE : + adjustment_Reason ( GuiConfirmId::GENERIC_CONFIRM_ID_NONE ); // there is no need to display the timeout reason and just hides the dialog. + adjustment_Accepted ( true ); + isTimeout ( false ); + isReject ( false ); + isAccept ( true ); + break; + case GuiConfirmCommand::NUM_OF_GENERIC_CONFIRM_COMMAND : /* No code */ break; + } + + // TODO: These values shall be read form the Confirm.conf + title ( QString("Title [%1]").arg(_id) ); + message ( Gui::enumString(static_cast(vData.mId), "[%1] Unknown Request") ); // For now + confirm (tr("CONFIRM")); + cancel (isReject() ? tr("CLOSE") : tr("CANCEL")); + + // *** has to be the last to let the dialog to setup itself before becomes visible. *** + visible ( cmd == GuiConfirmCommand::GENERIC_CONFIRM_CMD_REQUEST_OPEN || cmd == GuiConfirmCommand::GENERIC_CONFIRM_CMD_REJECT ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the Previous values before being set. *** + adjustment ( true ); + + // DEBUG: + qDebug() << _id << _command << adjustment_Reason() << _title << _message; +} + +void View::VConfirm::onActionReceive(const PowerOffData &vData) +{ + title ( tr("Shutdown") ); + message ( tr("Are you sure you want to Shutdown?") ); + adjustment_Reason ( GuiConfirmId::GENERIC_CONFIRM_ID_NONE ); // power off has no rejection reason on the dialog + confirm ( tr("SHUTDOWN") ); + cancel ( tr("CANCEL") ); + + poweroff(vData.mStatus); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the Previous values before being set. *** + adjustment ( true ); + + // DEBUG: + qDebug() << _id << _command << adjustment_Reason() << _title << _message; +} Index: sources/view/confirm/VConfirm.h =================================================================== diff -u --- sources/view/confirm/VConfirm.h (revision 0) +++ sources/view/confirm/VConfirm.h (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -0,0 +1,69 @@ +/*! + * + * Copyright (c) 2021-2022 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file VConfirm.h + * \author (last) Behrouz NematiPour + * \date (last) 22-Sep-2022 + * \author (original) Behrouz NematiPour + * \date (original) 22-Sep-2022 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : do not remove +#include "VAdjustmentResponseBase.h" +#include "MDuetConfirmHDi.h" +#include "MAdjustPowerOff.h" + +namespace View { + +/*! + * \brief The VConfirm class + * \details View for Model's Data representation. + * + * \sa Model::MHDPostSingleResult + * \sa Model::MHDPostFinalResult + * + */ +class VConfirm : public VAdjustmentResponseBase +{ + Q_OBJECT + + // // friends + // friend class ::tst_views; + + // disabled coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER ( bool , adjustment , 0) + // disabled coco end + + PROPERTY(quint32 , id , 0) + PROPERTY(quint32 , command , 0) + + TRIGGER( quint8 , poweroff , 0) + PROPERTY(bool , isTimeout , 0) + PROPERTY(bool , isReject , 0) + PROPERTY(bool , isAccept , 0) + + + TRIGGER (bool , visible , 0) + PROPERTY(QString , title ,"") + PROPERTY(QString , message ,"") + PROPERTY(QString , confirm ,tr("CONFIRM")) + PROPERTY(QString , cancel ,tr("CANCEL" )) + + VIEW_DEC_CLASS (VConfirm ) + VIEW_DEC_SLOT (DuetConfirmHDiData ) + VIEW_DEC_SLOT (PowerOffData ) + +}; +} Fisheye: Tag 13e65c3d271d503c2e2e2f1f20736652c470f8cc refers to a dead (removed) revision in file `sources/view/confirm/VConfirmDialog.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 13e65c3d271d503c2e2e2f1f20736652c470f8cc refers to a dead (removed) revision in file `sources/view/confirm/VConfirmDialog.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/view/hd/alarm/VAlarmStatus.cpp =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- sources/view/hd/alarm/VAlarmStatus.cpp (.../VAlarmStatus.cpp) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/view/hd/alarm/VAlarmStatus.cpp (.../VAlarmStatus.cpp) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -149,6 +149,7 @@ alarm_Flag_alarmsCondition (vData.mFlags.at(GuiAlarmFlags::ALARM_STATE_FLAG_BIT_POS_TOP_CONDITION )); if (vData.mTop == GuiAlarmID::ALARM_ID_NO_ALARM) { + hasAlarm(false); emit didAlarmEmpty(); } else {