/*! * * 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 VTreatmentAdjustmentResponseBase.h * \author (last) Behrouz NematiPour * \date (last) 05-Sep-2020 * \author (original) Behrouz NematiPour * \date (original) 26-Aug-2020 * */ #pragma once // Qt #include // Project #include "main.h" // Doxygen : don't remove #include "MModel.h" #include "VView.h" #include "GuiGlobals.h" // forward declarations class tst_views; // namespace using namespace Gui; namespace View { /*! * \brief The VTreatmentAdjustmentResponseBase class * \details The base class of all the view classes for adjustment response. * All the adjustment responses contain accepted field as a flag for acceptance or rejection of the requested adjustment. * In case of adjustment request rejection the reason field is the reason for rejection. */ class VTreatmentAdjustmentResponseBase : public QObject { Q_OBJECT // friends friend class ::tst_views; // coco begin validated: // The adjustment_Reason property as quint32 is not used directly in GUI // it will be used as QString text. // has been manually tested that it works perfectly fine if used. // this property changed to trigger since it has been found out during tests that the reason could be same but has to be shown again. TRIGGER ( quint32 , adjustment_Reason , 0) // coco end PROPERTY( bool , adjustment_Accepted , 0) Q_PROPERTY(QString adjustment_ReasonText READ text NOTIFY adjustment_ReasonTriggered) VIEW_DEC_CLASS(VTreatmentAdjustmentResponseBase) private: QString reasonText (GuiRequestReasons vEnum); protected slots: QString text(); }; }