72 lines
2.0 KiB
C++
Executable File
72 lines
2.0 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* HMI Plugin for OperatorPartyAssignment
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Steve Kemayou, ESZS, 2025-07-22
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Services/ParticipantManagement/ppm_dtc.h>
|
|
#include <Services/ParticipantManagement/ppm_ftc.h>
|
|
#include <OperatorManagement/opm_dtc.h>
|
|
#include <ParticipantManagement/logger.h>
|
|
#include <LtsSession/lts_session.h>
|
|
#include <LtsWidgets/lts_dialog.h>
|
|
#include <LtsUtilsGuiDds/request_helper.h>
|
|
#include "operator_party_assignment_model.h"
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
namespace Ui
|
|
{
|
|
class OperatorPartyAssignment;
|
|
}
|
|
|
|
namespace ParticipantManagement
|
|
{
|
|
class OperatorPartyAssignment : public LtsWidgets::LtsDialog
|
|
, protected ParticipantManagement::Interface::Ftc::ModifyPartyDataReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit OperatorPartyAssignment(const QString &menuGroup, QWidget *parent = nullptr);
|
|
~OperatorPartyAssignment();
|
|
bool init(LtsSession::LtsSession *session);
|
|
|
|
QMap<int, bool> getPartyStatesForOpertator() const;
|
|
|
|
private slots:
|
|
void onOperatorChanged(const OperatorManagement::User &data, DataModification modType);
|
|
void onSelectionOperatorChanged(const int index);
|
|
private:
|
|
void retranslate() override;
|
|
bool apply() override;
|
|
void onModifyPartyDataReply(const Core::FunctionReplyObject &replyObject) override { m_requestHelper->requestReply(replyObject); }
|
|
void enaDisa();
|
|
private:
|
|
QString m_menuGroup;
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
|
std::shared_ptr<ParticipantManagement::Interface::Ftc> m_ppmFtc;
|
|
std::shared_ptr<OperatorManagement::Interface::Dtc> m_opmDtc;
|
|
LtsSession::LtsSession *m_session;
|
|
LtsUtils::RequestHelper *m_requestHelper;
|
|
int m_operatorId; //!< currently displayed operator
|
|
QMap<int, QString> m_operatorMap;
|
|
|
|
OPeratorPartyAssignmentModel *m_model;
|
|
LOGGER_T m_logger;
|
|
|
|
Ui::OperatorPartyAssignment *m_ui;
|
|
};
|
|
|
|
}// namespace ParticipantManagement
|
|
|