Files
qt5-legatus-legacy/Lts/Plugins/Messaging/Gui/Messaging/msg_show_message_dialog.h
T
2026-08-13 18:33:10 +02:00

74 lines
2.2 KiB
C++
Executable File

/**
* @RDE_HEADER@
* HMI Plugin for Messaging - Show Message Dialog
* $Id$
* $HeadURL$
* $Author$
* Created by Patric Karwat, SLSE, 2016-10-05
*/
#pragma once
#include "msg_messaging_model.h"
#include "msg_new_message_dialog.h"
#include <Services/Messaging/msg_ftc.h>
#include <OperatorManagement/opm_gui_combobox_plugin_interface.h>
#include <LtsWidgets/lts_dialog.h>
#include <LtsSession/lts_session.h>
namespace LtsUtils
{
class RequestHelper;
}
namespace Ui
{
class ShowMessageDialog;
}
namespace Messaging
{
class ShowMessageDialog : public LtsWidgets::LtsDialog
, protected Messaging::Interface::Ftc::ModifyOperatorMessageReplyHandler
{
Q_OBJECT
public:
explicit ShowMessageDialog(LtsSession::LtsSession *session, QWidget *parent = nullptr);
~ShowMessageDialog();
bool init(const std::shared_ptr<Messaging::Interface::Dtc> &dtc,
const std::shared_ptr<Messaging::Interface::Ftc> &ftc,
const std::shared_ptr<OperatorManagement::ForeignGuiComboboxInterface> &opmCbxDtc,
const MessagingModel::Box &box,
const Messaging::OperatorMessage &operatorMessage,
const QString &menuGroup);
private:
void retranslate() override;
private slots:
void slotMarkMessageAsRead();
void onAnswerMessage();
void onPrint();
protected:
void onModifyOperatorMessageReply(const Core::FunctionReplyObject &replyObject) override;
void showEvent(QShowEvent *) override;
private:
QString m_menuGroup;
Ui::ShowMessageDialog *m_ui;
std::shared_ptr<Messaging::Interface::Dtc> m_dtc;
std::shared_ptr<Messaging::Interface::Ftc> m_ftc;
std::shared_ptr<OperatorManagement::ForeignGuiComboboxInterface> m_opmCbxDtc;
Messaging::OperatorMessage m_operatorMessage;
LtsUtils::RequestHelper *m_requestHelper;
LtsSession::LtsSession *m_session;
LOGGER_T m_logger;
};
} // namespace Messaging