/** * @RDE_HEADER@ * ParticipantManagement - Party Edit Dialog * $Id$ * $HeadURL$ * $Author$ * Created by Patric Karwat, SLSE, 2016-11-11 */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include class QToolButton; namespace Ui { class PartyEdit; } namespace ParticipantManagement { class PartyEdit : public LtsWidgets::LtsDialog, protected ParticipantManagement::Interface::Ftc::ModifyPartyDataReplyHandler ,protected OperatorManagement::Interface::Ftc::OperatorCreateModifyReplyHandler { Q_OBJECT public: explicit PartyEdit(QWidget *parent = nullptr); ~PartyEdit(); bool init(int partyId, LtsSession::LtsSession *session); //virtual functions from ParticipantManagement::Interface::Ftc::StaticMeteoDataModifyReplyHandler void onModifyPartyDataReply(const Core::FunctionReplyObject &replyObject) override { m_requestHelper->requestReply(replyObject); } void onOperatorCreateModifyReply(const Core::FunctionReplyObject &replyObject) override { m_requestHelper->requestReply(replyObject); } void lock() override; public slots: void onColorClicked(); void onFadedColorClicked(); void onResetAdlerConnectionClicked(); void onPartyChanged(const ParticipantManagement::Party &data, DataModification modType); private: void setData(const Party &party); void setColorToButton(QToolButton *button, const QColor &color); bool apply() override; void fillJsonSuppressNotifications( QJsonArray &arr, NotificationManagement::NotificationType notifType); void fillOpmProperties( QJsonObject &opmProperties); int findSuppressNotification( int partyId, NotificationManagement::NotificationType notifType, QJsonArray suppNotif); QCheckBox* findCheckBoxByNotificationType(const NotificationManagement::NotificationType ¬if); void notificationCheck(); void modifyPartyProperties(); private: void retranslate() override; int m_partyId; QColor m_color; QColor m_fadedColor; bool m_isUsed; // if true, only the notifications can be changed -> they depend on the operator bool m_partiallyUnchangeable; std::shared_ptr m_dtc; std::shared_ptr m_ftc; std::shared_ptr m_ppmGuiCbxIfc; std::shared_ptr m_dtcOpm; std::shared_ptr m_ftcOpm; LtsUtils::RequestHelper *m_requestHelper; LtsSession::LtsSession *m_session; Ui::PartyEdit *m_ui; LOGGER_T m_logger; }; } //namespace ParticipantManagement