/*! * * Copyright (c) 2019-2020 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 VAdjustmentService.h * \author (last) Peman Montazemi * \date (last) 6-Nov-2020 * \author (original) Peman Montazemi * \date (original) 6-Nov-2020 * */ #pragma once #include // Project #include "main.h" // Doxygen : don't remove #include "VAdjustmentResponseBase.h" #include "MAdjustHDServiceResponse.h" #include "MAdjustDGServiceResponse.h" namespace View { /*! * \brief The VAdjustmentService class * \details View for Model's Data representation. * * \sa Model::MAdjustServiceResponse * */ class VAdjustmentService : public VAdjustmentResponseBase { Q_OBJECT // friends friend class ::tst_views; const QString _serviceDateFormat = "yyyy/MM/dd"; // 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 , adjustmentHD , 0) TRIGGER( bool , adjustmentDG , 0) // coco end // Service seconds PROPERTY( quint8 , hdLastServiceEpoch, 0) PROPERTY( quint8 , hdServiceInterval , 0) PROPERTY( quint8 , dgLastServiceEpoch, 0) PROPERTY( quint8 , dgServiceInterval , 0) // Service data PROPERTY( QString , hdLastServiceDate , 0) PROPERTY( QString , hdNextServiceDate , 0) PROPERTY( QString , dgLastServiceDate , 0) PROPERTY( QString , dgNextServiceDate , 0) VIEW_DEC_CLASS(VAdjustmentService) VIEW_DEC_SLOT (AdjustServiceHDResponseData) VIEW_DEC_SLOT (AdjustServiceDGResponseData) // ---------- Version public slots: void doAdjustment() { AdjustServiceRequestData data; emit didAdjustment(data); } signals: void didAdjustment(const AdjustServiceRequestData &vData); }; }