/*! * * 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 VAdjustmentResponseBase.h * \author (last) Behrouz NematiPour * \date (last) 18-Apr-2022 * \author (original) Behrouz NematiPour * \date (original) 16-Apr-2021 * */ #pragma once // Qt #include // Project #include "main.h" // Doxygen : do not remove #include "VViewAutoGen.h" #include "GuiGlobalsAutoGen.h" #include "MSettings.h" // forward declarations class tst_views; // namespace using namespace Gui; namespace View { /*! * \brief The VAdjustmentResponseBase 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 VAdjustmentResponseBase : public QObject { Q_OBJECT // friends friend class ::tst_views; struct RejectData { QString title = ""; }; QMap _rejects; // The adjustment_Reason property as quint32 is not used directly in GUI // it will be used as QString text. // 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) PROPERTY( bool , adjustment_Accepted , 0) Q_PROPERTY(QString adjustment_ReasonText READ text NOTIFY adjustment_ReasonTriggered) VIEW_DEC_CLASS(VAdjustmentResponseBase) VIEW_DEC_SLOT (SettingsData ) protected slots: QString text (); QString title (); }; }