Index: sources/view/VView.h =================================================================== diff -u -r00d9bb06ec2bad14f6dc2db678b750c244f694ef -rc503f43840024e18650c1ac558448dd0f3b70427 --- sources/view/VView.h (.../VView.h) (revision 00d9bb06ec2bad14f6dc2db678b750c244f694ef) +++ sources/view/VView.h (.../VView.h) (revision c503f43840024e18650c1ac558448dd0f3b70427) @@ -15,42 +15,52 @@ #pragma once /*! - * \brief Denali Message UI usage instruction + * \page MessageView Denali Message UI usage instruction * \details This comment explains how to use a Denali Message populated data in Denali UI Application - * + * \verbatim * 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 + * Implement a view like VDGPressures 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. - * Also add the #include in the guiglobals.cpp + * - Add the required lines like the other models in the VView.h file. + * - Also add the #include in the GuiGlobals.cpp * * 4 - Usage in UI : - * Import : import VTreatmentPressureOcclusion 0.1; - * Instantiate : VTreatmentPressureOcclusion { id: vTreatmentPressureOcclusion } - * Access : value: vTreatmentPressureOcclusion.pressureocclusion_ArterialPressure - * + * Import : import VDGPressures 0.1; + * Instantiate : VDGPressures { id: vDGPressures } + * Access : value: vDGPressures.drainInletPSI + * \endverbatim */ //--------------------------------------------------------------------------------// //--------------------------------------------------------------------------------// // The child declaration in header #define VIEW_DEC_CLASS(vCLASS) \ private: \ + /*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. + */\ void initConnections(); \ public: \ - explicit vCLASS(QObject *parent = nullptr); + /*! \brief Class Constructor + \details Only call initConnections to initialize the signal/slot connections. + \param parent - The QObject parent pointer which is passed as nullptr and is not set. + */\ + explicit vCLASS(QObject *parent = nullptr); \ //--------------------------------------------------------------------------------// #define VIEW_DEC_SLOT(vDATATYPE) \ private Q_SLOTS: \ - void onActionReceive (const vDATATYPE &vData); + /*! \brief Model data received message handler. + \details When signal received this method is called to update the view properties. + \param vData - Model data + */\ + void onActionReceive (const vDATATYPE &vData); \ //--------------------------------------------------------------------------------// #define VIEW_DEC(vCLASS, vDATATYPE) \ VIEW_DEC_CLASS(vCLASS) \ VIEW_DEC_SLOT(vDATATYPE) \ -private: //--------------------------------------------------------------------------------// //--------------------------------------------------------------------------------// @@ -59,31 +69,30 @@ using namespace View; \ vCLASS::vCLASS(QObject *parent) : QObject(parent) { \ initConnections(); \ -} +} \ //--------------------------------------------------------------------------------// #define VIEW_DEF_CONNECTION(vCLASS, vDATATYPE) \ void vCLASS::initConnections() { \ ACTION_RECEIVE_BRIDGE_CONNECTION( \ Gui::_GuiController, vDATATYPE); \ -} +} \ //--------------------------------------------------------------------------------// #define VIEW_DEF(vCLASS, vDATATYPE) \ VIEW_DEF_CLASS(vCLASS) \ - VIEW_DEF_CONNECTION(vCLASS, vDATATYPE) + VIEW_DEF_CONNECTION(vCLASS, vDATATYPE) \ //--------------------------------------------------------------------------------// //--------------------------------------------------------------------------------// // The Adjustment child definition in cpp -#define VIEW_DEC_CLASS_ADJUSTMENT(vCLASS, vDATATYPE) \ - VIEW_DEC_CLASS(vCLASS) \ - VIEW_DEC_SLOT (vDATATYPE) +#define VIEW_DEC_CLASS_ADJUSTMENT(vCLASS, vDATATYPE)\ + VIEW_DEC_CLASS(vCLASS) \ + VIEW_DEC_SLOT(vDATATYPE) \ //--------------------------------------------------------------------------------// #define VIEW_DEF_CLASS_ADJUSTMENT(vCLASS, vDATATYPE) \ using namespace View; \ vCLASS::vCLASS(QObject *parent) : VTreatmentAdjustmentResponseBase(parent) { \ initConnections(); \ - } - + } \ //--------------------------------------------------------------------------------// //--------------------------------------------------------------------------------//