/** * @RDE_HEADER@ * HMI Plugin for ParticipantManagement - Party Overview Model * $Id$ * $HeadURL$ * $Author$ * Created by Patric Karwat, SLSE, 2016-11-11 */ #pragma once #include #include #include #include #include namespace ParticipantManagement { // -------------------------------------------------------- // PartyModel // -------------------------------------------------------- class PartyModel final : public LtsWidgets::LtsAbstractTableModel { Q_OBJECT public: enum Columns { Id, Name, Color, FadedColor, Role, IsUsedBy, IsSaaConnected, SaaName, SzenarName }; explicit PartyModel(QObject *parent = nullptr); bool initModel(LtsSession::LtsSession *session); QVariant data(const QModelIndex &, int) const override; protected: bool isFiltered(const Party &data, DataModification modType) const override { //no pool and support if (data.id() <= 1) return true; return LtsWidgets::LtsAbstractTableModel::isFiltered(data, modType); } private: bool hasParty(const ParticipantManagement::Party &party) const; bool isPartyHidden(const ParticipantManagement::Party &party) const; private: std::shared_ptr m_ppmDtc; std::shared_ptr m_opmDtc; int m_operatorId; int m_exerciseId; LtsSession::LtsSession *m_session; LOGGER_T m_logger; }; } //namespace ParticipantManagement