#pragma once /*! * * Copyright (c) 2024-2025 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 VAdvancedInstitutionalRecord.h * \author (last) Nico Ramirez * \date (last) 20-Nov-2025 * \author (original) Nico Ramirez * \date (original) 20-Nov-2025 * */ #pragma once // Qt #include // Project #include "main.h" // Doxygen : do not remove #include "VAdjustmentResponseBase.h" #include "MListModel.h" #include "MSettings.h" #include "MTDAdvancedInstitutionalRecordResponse.h" #include "MAdjustTDAdvancedInstitutionalRecordResponse.h" namespace View { /*! * \brief The VAdvancedInstitutionalRecord class * \details View for Model's Data representation. * * \sa Model::VAdjustmentResponseBase * */ class VAdvancedInstitutionalRecord : public VAdjustmentResponseBase { Q_OBJECT // friends friend class ::tst_views; enum { None = -1, Min = 0 , Max = 1 , Def = 2 , } Range; enum { eRole_Title = Qt::UserRole + 1 , eRole_Units , eRole_Min , eRole_Max , eRole_Step , eRole_Decimal , eRole_MinVal , eRole_MaxVal , eRole_DefVal , eRole_RejectionMin , eRole_RejectionMax , eRole_RejectionDef , } DataRole; enum { eMinRoRejectionRatio , eDisinfectionFrequency , eDisinfectionParametersCycleTime , eMaxBloodPumpStopTime , eInletWaterCondLowThreshold , eInletWaterCondHighThreshold , eChlorineWaterSampleCheck , eWaterSampleTestResultRequired } Records; // The property adjustment_Triggered has to be always true // and to always trigger the change event to work as a notifier for GUI TRIGGER( bool , adjustment , 0) RANGESET( quint32 , minRORejectionRatioAlarm , 0) RANGESET( quint32 , disinfectionFrequency , 0) RANGESET( quint32 , disinfectionParametersCycleTime , 0) RANGESET( quint32 , maxBloodPumpStopTime , 0) RANGESET( quint32 , inletWaterCondLowThreshold , 0) RANGESET( quint32 , inletWaterCondHighThreshold , 0) RANGESET( quint32 , chlorineWaterSampleCheck , 0) RANGESET( quint32 , waterSampleTestResultRequired , 0) Q_PROPERTY(MListModel* model READ model NOTIFY didModelChange) VIEW_DEC_CLASS_ADJUSTMENT(VAdvancedInstitutionalRecord, AdvancedInstitutionalRecordResponseData ) VIEW_DEC_SLOT(SettingsData ) VIEW_DEC_SLOT(AdjustAdvancedInstitutionalRecordResponseData ) private: MListModel* model () { return &_institutionalList; } MListModel _institutionalList; void initModel(); public slots: void doAdjustment() { AdvancedInstitutionalRequestData data; emit didAdjustment(data); } void clearRejectionReason(const int &vRow, const int &vRange); signals: void didAdjustment(const AdvancedInstitutionalRequestData &vData); void didModelChange(); }; }