#pragma once // Qt #include // Project #include "main.h" // Doxygen : do not remove #include "VView.h" #include "MListModel.h" #include "MSettings.h" // namespace namespace View { /*! * \brief The VListModel class * \details View for handling general models used for QML * * \sa View::VListModel * */ class VListModel : public QObject { Q_OBJECT enum { eTreatment = 0, eTrends = 1, eHeparin = 2, eHDF = 3 } TreatmentScreen; enum { eRole_Text = Qt::UserRole +1 , eRole_Visible , eRole_Screen , eRole_StatusColor } DataRole; enum { eWaterSample = 0, eDialysateChecks= 1 } WaterSample; Q_PROPERTY(MListModel* headerbarModel READ headerbarModel NOTIFY didHeaderbarModelChange) Q_PROPERTY(MListModel* waterSampleModel READ waterSampleModel NOTIFY didWaterSampleModelChange) PROPERTY ( int , roWaterMode , 0) PROPERTY ( int , heparinSyringePump , 0) VIEW_DEC_SLOT(SettingsData ) public: explicit VListModel(QObject *parent = nullptr); public slots: void setHeaderbarHeparinStatusColor (QString color); void setHeaderbarHDFStatusColor (QString color); void setHeaderbarHeparinVisible (bool visible); void setHeaderbarHDFVisible (bool visible); private: MListModel* headerbarModel () { return &_headerbarModel; } MListModel _headerbarModel; MListModel* waterSampleModel () { return &_waterSampleModel; } MListModel _waterSampleModel; void initModel(); signals: void didHeaderbarModelChange(); void didWaterSampleModelChange(); }; }