56 lines
1.5 KiB
C++
Executable File
56 lines
1.5 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* EffectShowClient - Safety Confirmation Widget
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Patric Karwat, NLE, 2020-04-07
|
|
*/
|
|
|
|
#pragma once
|
|
#include <QWidget>
|
|
|
|
#include <Services/EffectShowClient/esc_ftc.h>
|
|
#include <LtsUtilsGuiDds/request_helper.h>
|
|
|
|
namespace Ui {
|
|
class SafetyConfirmationWidget;
|
|
}
|
|
namespace EffectShowClient
|
|
{
|
|
class SafetyConfirmationWidget : public QWidget,
|
|
protected EffectShowClient::Interface::Ftc::SendSafetyRevokeReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit SafetyConfirmationWidget(QWidget *parent = nullptr);
|
|
|
|
~SafetyConfirmationWidget();
|
|
bool init(const std::shared_ptr<EffectShowClient::Interface::Ftc> &ftc);
|
|
bool onOperatingConditionEntityChanged(const EffectShowClient::OperatingConditionEntity &data);
|
|
void setMessage(const QString &message);
|
|
|
|
private:
|
|
void onSendSafetyRevokeReply(const Core::FunctionReplyObject &replyObject) override { m_requestHelper->requestReply(replyObject); }
|
|
void setMessageInternal();
|
|
public slots:
|
|
void setNewSafetyConfirmationDisplay(const EffectShowClient::SafetyConfirmation_e &safetyConfirmation);
|
|
|
|
private slots:
|
|
bool onRevokeClicked();
|
|
void onSafetyConfirmationDisplay();
|
|
|
|
private:
|
|
std::shared_ptr<EffectShowClient::Interface::Ftc> m_ftc;
|
|
EffectShowClient::SafetyConfirmation_e m_currentState;
|
|
LtsUtils::RequestHelper *m_requestHelper;
|
|
QString m_errorString;
|
|
QString m_messageString;
|
|
|
|
Ui::SafetyConfirmationWidget *m_ui;
|
|
|
|
};
|
|
|
|
} //namespace EffectShowClient
|