/*! * * 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 vview.h * date 3/9/2020 * author Behrouz NematiPour * */ #pragma once /*! * \brief Denali Message UI usage instruction * \details This comment explains how to use a Denali Message populated data in Denali UI Application * * 1 - Look at the message structure in the "message list.xlsx" * * 2 - View Implementation : * Implement a view like VPressureOcclusion by copy/paste the closest model .h/.cpp file * and adding it to project and modify to fit the new model. * * 3 - Register View : * Add the required lines like the other models in the vview.h file. * * 4 - Usage in UI : * Import : import VTreatmentPressureOcclusion 0.1; * Instantiate : VTreatmentPressureOcclusion { id: vTreatmentPressureOcclusion } * Access : value: vTreatmentPressureOcclusion.pressureocclusion_ArterialPressure * */ //--------------------------------------------------------------------------------// //--------------------------------------------------------------------------------// // The child declaration in header #define VIEW_DEC(vCLASS, vDATATYPE) \ private: \ void initConnections(); \ public: \ explicit vCLASS(QObject *parent = nullptr); \ private Q_SLOTS: \ void onActionReceive (const vDATATYPE &vData); \ private: //--------------------------------------------------------------------------------// // The child definition in cpp #define VIEW_DEF(vCLASS, vDATATYPE) \ using namespace Gui ; \ using namespace View; \ vCLASS::vCLASS(QObject *parent) : QObject(parent) { \ initConnections(); \ } \ void vCLASS::initConnections() { \ ACTION_RECEIVE_BRIDGE_CONNECTION( \ _GuiController, vDATATYPE); \ } //--------------------------------------------------------------------------------// //--------- Please add the view type to the lists below to register them ---------// //--------------------------------------------------------------------------------// #include "vtreatmentbloodflow.h" #include "vtreatmentdialysateflow.h" #include "vtreatmentultrafiltration.h" #include "vtreatmentpressureocclusion.h" #include "vtreatmenttime.h" #include "valarmstatus.h" #include "vpoweroff.h" //--------------------------------------------------------------------------------// #define REGISTER_VIEW_TYPES \ REGISTER_TYPE( VTreatmentBloodFlow ) \ REGISTER_TYPE( VTreatmentDialysateFlow ) \ REGISTER_TYPE( VTreatmentUltrafiltration ) \ REGISTER_TYPE( VTreatmentPressureOcclusion ) \ REGISTER_TYPE( VTreatmentTime ) \ REGISTER_TYPE( VAlarmStatus ) \ REGISTER_TYPE( VPowerOff )