/*! * * 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 VHDPOSTData.h * \author (last) Behrouz NematiPour * \date (last) 18-Apr-2022 * \author (original) Behrouz NematiPour * \date (original) 27-Jul-2021 * */ #pragma once #include // Project #include "main.h" // Doxygen : do not remove #include "VAdjustmentResponseBase.h" #include "MHDPostSingleResultData.h" #include "MHDPostFinalResultData.h" namespace View { /*! * \brief The VHDPOSTData class * \details View for Model's Data representation. * * \sa Model::MHDPostSingleResult * \sa Model::MHDPostFinalResult * */ class VHDPOSTData : public VAdjustmentResponseBase { Q_OBJECT // friends friend class ::tst_views; // 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) // disabled coco end // the last "test" item is the item just before the complete state. // UI doesn't care about the the complete or fail state in Single post messages, // and that is the result of the Final post message. CONSTANT(quint32 , itemCount , GuiHDPOSTStates::POST_STATE_COMPLETED - 1 ) PROPERTY(bool , start , 0) PROPERTY(quint32 , itemIndex , 0) PROPERTY(bool , itemResult , 0) PROPERTY(bool , doneResult , 0) PROPERTY(bool , done , 0) VIEW_DEC_CLASS(VHDPOSTData) VIEW_DEC_SLOT (HDPostSingleResultData) VIEW_DEC_SLOT (HDPostFinalResultData ) public slots: /*! * \brief reset * \details In a very unlikely scenario of going back to the init state (it only happened during testing and demo) * the UI should be able to reset the states of itself * since the HD is not sending the messages when changing the states until the end of the POST process. */ void reset() { doneResult (false); done (false); } }; }