Index: sources/view/hd/adjustment/common/VCommonAdjustmentVitals.h =================================================================== diff -u -raeb915075b9e13e5c1aaf2800ba6db03b6c24a0b -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/view/hd/adjustment/common/VCommonAdjustmentVitals.h (.../VCommonAdjustmentVitals.h) (revision aeb915075b9e13e5c1aaf2800ba6db03b6c24a0b) +++ sources/view/hd/adjustment/common/VCommonAdjustmentVitals.h (.../VCommonAdjustmentVitals.h) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,15 +1,15 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2021-2024 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 VTreatmentVitals.h + * \file VCommonAdjustmentVitals.h * \author (last) Behrouz NematiPour + * \date (last) 10-Jan-2024 * \author (original) Behrouz NematiPour - * \date (last) 22-Jun-2021 - * \date (original) 22-Jun-2021 + * \date (original) 23-Jun-2021 * */ #pragma once @@ -36,20 +36,18 @@ // friends friend class ::tst_views; - int _timerId = 0; - int _timerCounter = 1; + int _timerId = 0; // 0 means no timer started or failed to start. + int _counter_sec = 0; + int _counter_min = 0; - // coco begin validated: + // 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) - // coco end + // disabled coco end // Vitals data - // formatting - PROPERTY( QString , datetimeFormat ,"yyyy/MMM/dd - HH:mm") - // constant range variables / units / ... CONSTANT( quint16 , systolicMin , 60) CONSTANT( quint16 , systolicMax , 250) @@ -60,22 +58,32 @@ // timer - PROPERTY( bool , enabled , 0) // enable the vital screen timer + PROPERTY( bool , enableDialog , 0) // enable the vital Dialog being triggered (pre-treatment is screen not a dialog) PROPERTY( quint8 , interval , 0) // show the vital screen in min - PROPERTY( quint8 , timeout , 1) // close the vital screen in min // timestamp PROPERTY( quint64 , epoch , 0) PROPERTY( QString , lastRead , "") + PROPERTY( QString , countdown , "") // vitals PROPERTY( quint16 , systolic , 0) PROPERTY( quint16 , diastolic , 0) PROPERTY( quint16 , heartRate , 0) + PROPERTY( quint16 , systolic__rt , 0) + PROPERTY( quint16 , diastolic_rt , 0) + PROPERTY( quint16 , heartRate_rt , 0) + + // For Debugging purposes + PROPERTY( quint8 , min_left , 0) + PROPERTY( quint8 , sec_left , 0) + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentVitals, UIBloodPressureData) void update (quint16 vSystolic, quint16 vDiastolic, quint16 vHeartRate); + void update_rt (quint16 vSystolic, quint16 vDiastolic, quint16 vHeartRate); + void treatmentLog(); // timer @@ -86,34 +94,25 @@ void timerEvent(QTimerEvent *) override; private slots: - void onTimerChanged(); + void onIntervalChanged(); public slots: // vitals void doConfirm (quint16 vSystolic, quint16 vDiastolic, quint16 vHeartRate); void doSkip (); - void doTimeout (); - void doReset (bool vEnabled); + void doReset (); + // timer + void doTimerStart () { timerStart(); } + void doTimerStop () { timerStop (); } + signals: - /*! - * \brief didAdjustment - * \details the notification signal to send the user's Request - * \param vData - data model includes request information - */ - void didAdjustment(const AdjustHDAlarmVolumeRequestData &vData); /*! * \brief didTrigger * \details the signal to trigger the Gui to notify the user for the vitals measurement */ - void didTrigger(); - - /*! - * \brief didTrigger - * \details the signal to trigger the Gui to close the vitals measurement screen on no user interaction - */ - void didTimeout(); + void didTrigger(quint16 vSystolic = 0, quint16 vDiastolic = 0, quint16 vHeartRate = 0); }; }