Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,97 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* ParticipantManagement - Party Edit Dialog
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, SLSE, 2016-11-11
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LtsWidgets/lts_dialog.h>
|
||||
|
||||
#include <Services/ParticipantManagement/ppm_dtc.h>
|
||||
#include <Services/ParticipantManagement/ppm_ftc.h>
|
||||
#include <Services/OperatorManagement/opm_dtc.h>
|
||||
#include <Services/OperatorManagement/opm_ftc.h>
|
||||
#include <NotificationManagement/nom.hpp>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Plugins/ParticipantManagement/ppm_data_plugin_interface.h>
|
||||
#include <Plugins/OperatorManagement/opm_data_plugin_interface.h>
|
||||
#include <Plugins/ParticipantManagement/ppm_party_gui_plugin_interface.h>
|
||||
#include <Plugins/ParticipantManagement/ppm_gui_combobox_plugin_interface.h>
|
||||
|
||||
#include <ParticipantManagement/logger.h>
|
||||
#include <LtsUtilsGuiDds/request_helper.h>
|
||||
#include <LtsSession/lts_session.h>
|
||||
|
||||
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<ParticipantManagement::Interface::Dtc> m_dtc;
|
||||
std::shared_ptr<ParticipantManagement::Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<ParticipantManagement::ForeignGuiComboboxInterface> m_ppmGuiCbxIfc;
|
||||
std::shared_ptr<OperatorManagement::Interface::Dtc> m_dtcOpm;
|
||||
std::shared_ptr<OperatorManagement::Interface::Ftc> m_ftcOpm;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
LtsSession::LtsSession *m_session;
|
||||
Ui::PartyEdit *m_ui;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
} //namespace ParticipantManagement
|
||||
Reference in new issue
Block a user