/** *@RDE_HEADER@ * Gui Plugin for SituationReplayManagement - Replay Management * $Id$ * $HeadURL$ * $Author$ * Created by Patric Karwat, SLSE, 2016-07-19 */ #pragma once #include #include #include #include #include #include #include #include namespace SituationReplayManagement { class GuiPlugin final : public QObject, public GuiPluginBase::Plugin { Q_PLUGIN_METADATA(IID "gui:3:srm") Q_INTERFACES(GuiPluginBase::Plugin) Q_OBJECT public: GuiPlugin() = default; ~GuiPlugin() = default; QString pluginName() override { return QStringLiteral("SituationReplayManagement"); } std::shared_ptr createGuiInterface(LtsSession::LtsSession *session) override; bool availableInPartition(IDL::PartitionType partition) const override { return partition == IDL::PartitionType::Exercise || partition == IDL::PartitionType::Global; } }; class InterfaceImpl final : public QObject, public GuiPluginBase::Interface , protected SituationReplayManagement::Interface::Ftc::ReplayPartitionCreateReplyHandler , private FilterManagement::Interface::Ftc::AesFilterUpdateReplyHandler , private FilterManagement::Interface::Ftc::SymbolAppearanceUpdateReplyHandler { Q_OBJECT public: explicit InterfaceImpl(LtsSession::LtsSession *session); ~InterfaceImpl(); QVector getActions() override; QString menuGroup() const override; bool fetchInterfaces() override; void clearInterfaces() override; bool availableInPartition(IDL::PartitionType partition) const override { return partition == IDL::PartitionType::Exercise || partition == IDL::PartitionType::Global; } private: void startReplay(); void startReplayApp(const Core::ReplayPartition &data); void startReplayAppInternal(); private: void onReplayPartitionCreateReply(const Core::FunctionReplyObject &reply) override { m_requestHelper->requestReply(reply); } void onAesFilterUpdateReply(const Core::FunctionReplyObject &replyObject) override; void onSymbolAppearanceUpdateReply(const Core::FunctionReplyObject &replyObject) override; bool transferFilter(const Core::ReplayPartition &data); private: std::shared_ptr m_coreDtc; std::shared_ptr m_sitRepIfc; std::shared_ptr m_fltParticipantIfc; std::shared_ptr m_fltAesIfc; std::shared_ptr m_fltFtc; LtsUtils::RequestHelper *m_requestHelper; int m_replayPartitionId; bool m_aesTransfered = false; bool m_symbolAppearanceTransfered = false; Core::ReplayPartition m_data; }; } // namespace SituationReplayManagement