/** * @RDE_HEADER@ * Pairing of IED-objects * $Id$ * $HeadURL$ * $Author$ * Created by Philipp Dassow, SLEA, 2017-07-28 */ #pragma once #include #include #include #include #include #include #include #include namespace ParticipantManagement { class ParticipantEditModel; } namespace Ui { class IedPairingEditDialog; } namespace LtsSession { class LtsSession; } namespace GuezIedManagement { class PairingEditDialog : public LtsWidgets::LtsDialog , protected GuezIedManagement::Interface::Ftc::PairIedReplyHandler { Q_OBJECT public: explicit PairingEditDialog(LtsSession::LtsSession * session, QWidget *parent = nullptr); bool init (LtsSession::LtsSessionDataDds *session); ~PairingEditDialog(); void onPairIedReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); } private slots: void onIedSelected(int idx); void onPairingStateSelected(int idx); void onIedChanged(const Ied &data, DataModification modType); void onParticipantSelected(const QModelIndex &idx); void onReInitModel(); void onPrint(); private: void retranslate() override; bool apply() override final; bool applyPairingStateCheck(); bool applyParticipantSelectionCheck(); bool checkSelectedParticipantType(); void fillIedCbx(); void fillPairingState(); void fillPartyCbx(); void fillAllCbx(); void enDisableUiElements(); LtsSession::LtsSession *m_session; Ui::IedPairingEditDialog *m_ui; LtsSession::LtsSessionDataDds *m_sessionData; std::shared_ptr m_dtc; std::shared_ptr m_ftc; std::shared_ptr m_ppmDtc; std::shared_ptr m_ppmGuiCbxIfc; ParticipantManagement::ParticipantEditModel *m_participantModel; LtsUtils::RequestHelper *m_requestHelper; LOGGER_T m_logger; }; } // namespace GuezIedManagement