Index: denali.pro =================================================================== diff -u -r51936e788b311fec39d28c387e5026f50e06c165 -rd66466bb093fc8806d76fc8b8bdfbd7852d0da98 --- denali.pro (.../denali.pro) (revision 51936e788b311fec39d28c387e5026f50e06c165) +++ denali.pro (.../denali.pro) (revision d66466bb093fc8806d76fc8b8bdfbd7852d0da98) @@ -42,7 +42,7 @@ sources/view \ sources/view/hd/adjustment \ sources/view/hd/data \ - sources/view/dg/adjustment \ + #sources/view/dg/adjustment \ sources/view/dg/data HEADERS += \ @@ -77,7 +77,7 @@ sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationEditResponse.h \ sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationConfirmResponse.h \ sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.h \ - sources/model/hd/adjustment/MTreatmentAdjustHDVersionsResponse.h \ + sources/model/hd/adjustment/MTreatmentAdjustVersionsResponse.h \ \ # ---------- Models - HD - Data sources/model/hd/data/MTreatmentTimeData.h \ sources/model/hd/data/MTreatmentFlowsData.h \ @@ -89,7 +89,7 @@ sources/model/hd/data/MTreatmentSalineData.h \ sources/model/hd/data/MHDAccelerometerData.h \ \ # ---------- Models - DG - Adjustment - sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.h \ + #sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.h \ \ # ---------- Models - DG - Data sources/model/dg/data/MDGDrainPumpData.h \ sources/model/dg/data/MDGHeatersData.h \ @@ -128,7 +128,7 @@ sources/view/vtreatmentadjustmentultrafiltrationedit.h \ sources/view/vtreatmentadjustmentultrafiltrationconfirm.h \ sources/view/hd/adjustment/VTreatmentAdjustmentSaline.h \ - sources/view/hd/adjustment/VTreatmentAdjustmentHDVersions.h \ + sources/view/hd/adjustment/VTreatmentAdjustmentVersions.h \ \ # ---------- Views - HD - Data sources/view/vtreatmenttime.h \ sources/view/vtreatmentbloodflow.h \ @@ -141,7 +141,6 @@ sources/view/hd/data/VHDAccelerometerData.h \ sources/view/hd/data/VHDTreatmentStatesData.h \ \ # ---------- Views - DG - Adjustment - sources/view/dg/adjustment/VTreatmentAdjustmentDGVersions.h \ \ # ---------- Views - DG - Data sources/view/dg/data/VDGDrainPumpData.h \ sources/view/dg/data/VDGHeatersData.h \ @@ -253,7 +252,6 @@ sources/view/hd/data/VHDAccelerometerData.cpp \ sources/view/hd/data/VHDTreatmentStatesData.cpp \ \ # ---------- Views - DG - Adjustment - sources/view/dg/adjustment/VTreatmentAdjustmentDGVersions.cpp \ \ # ---------- Views - DG - Data sources/view/dg/data/VDGDrainPumpData.cpp \ sources/view/dg/data/VDGHeatersData.cpp \ Index: sources/gui/guiglobals.cpp =================================================================== diff -u -r242ef09c059eac13b036989147f5e2314df54a30 -rd66466bb093fc8806d76fc8b8bdfbd7852d0da98 --- sources/gui/guiglobals.cpp (.../guiglobals.cpp) (revision 242ef09c059eac13b036989147f5e2314df54a30) +++ sources/gui/guiglobals.cpp (.../guiglobals.cpp) (revision d66466bb093fc8806d76fc8b8bdfbd7852d0da98) @@ -57,8 +57,7 @@ #include "vtreatmentadjustmentultrafiltrationedit.h" #include "vtreatmentadjustmentultrafiltrationconfirm.h" #include "VTreatmentAdjustmentSaline.h" -#include "VTreatmentAdjustmentHDVersions.h" -#include "VTreatmentAdjustmentDGVersions.h" +#include "VTreatmentAdjustmentVersions.h" namespace Gui { MainView *_viewer = nullptr; Index: sources/model/hd/adjustment/MTreatmentAdjustHDVersionsResponse.h =================================================================== diff -u -reb7ad1e0f313a526873aff6ce67930b453bc3dfa -rd66466bb093fc8806d76fc8b8bdfbd7852d0da98 --- sources/model/hd/adjustment/MTreatmentAdjustHDVersionsResponse.h (.../MTreatmentAdjustHDVersionsResponse.h) (revision eb7ad1e0f313a526873aff6ce67930b453bc3dfa) +++ sources/model/hd/adjustment/MTreatmentAdjustHDVersionsResponse.h (.../MTreatmentAdjustHDVersionsResponse.h) (revision d66466bb093fc8806d76fc8b8bdfbd7852d0da98) @@ -36,14 +36,14 @@ * * | Payload || * | || - * | #1:(U08) | \ref Data::mMajor | - * | #2:(U08) | \ref Data::mMinor | - * | #3:(U08) | \ref Data::mMicro | - * | #4:(U16) | \ref Data::mBuild | - * | #5:(U08) | \ref Data::mFPGAId | - * | #6:(U08) | \ref Data::mFPGAMajor | - * | #7:(U08) | \ref Data::mFPGAMinor | - * | #8:(U08) | \ref Data::mFPGALab | + * | #1:(U08) | \ref Data::mHDMajor | + * | #2:(U08) | \ref Data::mHDMinor | + * | #3:(U08) | \ref Data::mHDMicro | + * | #4:(U16) | \ref Data::mHDBuild | + * | #5:(U08) | \ref Data::mHDFPGAId | + * | #6:(U08) | \ref Data::mHDFPGAMajor | + * | #7:(U08) | \ref Data::mHDFPGAMinor | + * | #8:(U08) | \ref Data::mHDFPGALab | * * \sa Data * \sa MAdjustHDVersionsResponse : HD Versions Response Data Fisheye: Tag d66466bb093fc8806d76fc8b8bdfbd7852d0da98 refers to a dead (removed) revision in file `sources/view/dg/adjustment/VTreatmentAdjustmentDGVersions.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag d66466bb093fc8806d76fc8b8bdfbd7852d0da98 refers to a dead (removed) revision in file `sources/view/dg/adjustment/VTreatmentAdjustmentDGVersions.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/view/hd/adjustment/VTreatmentAdjustmentHDVersions.cpp =================================================================== diff -u -r242ef09c059eac13b036989147f5e2314df54a30 -rd66466bb093fc8806d76fc8b8bdfbd7852d0da98 --- sources/view/hd/adjustment/VTreatmentAdjustmentHDVersions.cpp (.../VTreatmentAdjustmentHDVersions.cpp) (revision 242ef09c059eac13b036989147f5e2314df54a30) +++ sources/view/hd/adjustment/VTreatmentAdjustmentHDVersions.cpp (.../VTreatmentAdjustmentHDVersions.cpp) (revision d66466bb093fc8806d76fc8b8bdfbd7852d0da98) @@ -5,37 +5,56 @@ * 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 VTreatmentAdjustmentHDVersions.cpp + * \file VTreatmentAdjustmentVersions.cpp * \author (last) Peman Montazemi * \date (last) 6-Nov-2020 * \author (original) Peman Montazemi * \date (original) 6-Nov-2020 * */ -#include "VTreatmentAdjustmentHDVersions.h" +#include "VTreatmentAdjustmentVersions.h" // Project #include "guicontroller.h" -VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentHDVersions, AdjustHDVersionsResponseData) +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentVersions, AdjustVersionsResponseData) -void VTreatmentAdjustmentHDVersions::initConnections() { +void VTreatmentAdjustmentVersions::initConnections() { ACTION_VIEW_CONNECTION(AdjustHDVersionsResponseData); + ACTION_VIEW_CONNECTION(AdjustDGVersionsResponseData); ADJUST_VIEW_CONNECTION( AdjustVersionsRequestData); } -void VTreatmentAdjustmentHDVersions::onActionReceive(const AdjustHDVersionsResponseData &vData) +void VTreatmentAdjustmentVersions::onActionReceive(const AdjustHDVersionsResponseData &vData) { - verMajor (vData.mMajor ); - verMinor (vData.mMinor ); - verMicro (vData.mMicro ); - verBuild (vData.mBuild ); - verFPGAId (vData.mFPGAId ); - verFPGAMajor (vData.mFPGAMajor); - verFPGAMinor (vData.mFPGAMinor); - verFPGALab (vData.mFPGALab ); + // HD versions + HDVerMajor (vData.mHDMajor ); + HDVerMinor (vData.mHDMinor ); + HDVerMicro (vData.mHDMicro ); + HDVerBuild (vData.mHDBuild ); + HDVerFPGAId (vData.mHDFPGAId ); + HDVerFPGAMajor (vData.mHDFPGAMajor); + HDVerFPGAMinor (vData.mHDFPGAMinor); + HDVerFPGALab (vData.mHDFPGALab ); // *** has to be the last to let the information to be set and then emit the signal *** // *** otherwise will use the previous values before being set. *** adjustment(true); // set here only because adjustment parent needs it, but HD Versions does not } + +void VTreatmentAdjustmentVersions::onActionReceive(const AdjustDGVersionsResponseData &vData) +{ + // DG versions + DGVerMajor (vData.mDGMajor ); + DGVerMinor (vData.mDGMinor ); + DGVerMicro (vData.mDGMicro ); + DGVerBuild (vData.mDGBuild ); + DGVerFPGAId (vData.mDGFPGAId ); + DGVerFPGAMajor (vData.mDGFPGAMajor); + DGVerFPGAMinor (vData.mDGFPGAMinor); + DGVerFPGALab (vData.mDGFPGALab ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment(true); // set here only because adjustment parent needs it, but HD Versions does not +} Fisheye: Tag d66466bb093fc8806d76fc8b8bdfbd7852d0da98 refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentHDVersions.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/view/hd/adjustment/VTreatmentAdjustmentVersions.h =================================================================== diff -u --- sources/view/hd/adjustment/VTreatmentAdjustmentVersions.h (revision 0) +++ sources/view/hd/adjustment/VTreatmentAdjustmentVersions.h (revision d66466bb093fc8806d76fc8b8bdfbd7852d0da98) @@ -0,0 +1,78 @@ +/*! + * + * 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 VTreatmentAdjustmentVersions.h + * \author (last) Peman Montazemi + * \date (last) 6-Nov-2020 + * \author (original) Peman Montazemi + * \date (original) 6-Nov-2020 + * + */ +#pragma once + +#include + +// Project +#include "vtreatmentadjustmentresponsebase.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentVersions class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustVersionsResponse + * + */ +class VTreatmentAdjustmentVersions : public VTreatmentAdjustmentResponseBase { + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustVersionsRequestData _data; + + // 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) + // coco end + + // HD Versions data + PROPERTY( quint8 , HDVerMajor , 0) + PROPERTY( quint8 , HDVerMinor , 0) + PROPERTY( quint8 , HDVerMicro , 0) + PROPERTY( quint16 , HDVerBuild , 0) + PROPERTY( quint8 , HDVerFPGAId , 0) + PROPERTY( quint8 , HDVerFPGAMajor , 0) + PROPERTY( quint8 , HDVerFPGAMinor , 0) + PROPERTY( quint8 , HDVerFPGALab , 0) + + // DG Versions data + PROPERTY( quint8 , DGVerMajor , 0) + PROPERTY( quint8 , DGVerMinor , 0) + PROPERTY( quint8 , DGVerMicro , 0) + PROPERTY( quint16 , DGVerBuild , 0) + PROPERTY( quint8 , DGVerFPGAId , 0) + PROPERTY( quint8 , DGVerFPGAMajor , 0) + PROPERTY( quint8 , DGVerFPGAMinor , 0) + PROPERTY( quint8 , DGVerFPGALab , 0) + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentVersions, AdjustVersionsResponseData) + +// ---------- HD Version +public slots: + void doAdjustment() { + AdjustVersionsRequestData data; + emit didAdjustment(data); + } + +signals: + void didAdjustment(const AdjustVersionsRequestData &vData); +}; +} Index: sources/view/vview.h =================================================================== diff -u -r242ef09c059eac13b036989147f5e2314df54a30 -rd66466bb093fc8806d76fc8b8bdfbd7852d0da98 --- sources/view/vview.h (.../vview.h) (revision 242ef09c059eac13b036989147f5e2314df54a30) +++ sources/view/vview.h (.../vview.h) (revision d66466bb093fc8806d76fc8b8bdfbd7852d0da98) @@ -124,6 +124,5 @@ REGISTER_TYPE( VTreatmentAdjustmentUltrafiltrationEdit ) \ REGISTER_TYPE( VTreatmentAdjustmentUltrafiltrationConfirm ) \ REGISTER_TYPE( VTreatmentAdjustmentSaline ) \ - REGISTER_TYPE( VTreatmentAdjustmentHDVersions ) \ - REGISTER_TYPE( VTreatmentAdjustmentDGVersions ) + REGISTER_TYPE( VTreatmentAdjustmentVersions ) //--------------------------------------------------------------------------------//