/** *@RDE_HEADER@ * Gui Plugin for AreaEffectSimulation - Info * $Id$ * $HeadURL$ * $Author$ * Created by hjl, SLSE, 2017-03-22 */ #pragma once #include #include #include #include #include namespace AreaEffectSimulation { class GuiPlugin final : public QObject, public GuiPluginBase::Plugin { Q_PLUGIN_METADATA(IID "gui:3:aes.info") Q_INTERFACES(GuiPluginBase::Plugin) Q_OBJECT public: GuiPlugin() = default; ~GuiPlugin() = default; QString pluginName() override { return QLatin1String("AreaEffectSimulationInfoGui"); } std::shared_ptr createGuiInterface(LtsSession::LtsSession *session) override; bool availableInPartition(IDL::PartitionType partition) const override { return partition == IDL::PartitionType::Exercise || partition == IDL::PartitionType::Replay; } }; //----------------------------------------------------------------------------- class InterfaceImpl final : public QObject, public ForeignInfoGuiInterface, public GuiPluginBase::Interface { Q_OBJECT public: explicit InterfaceImpl(LtsSession::LtsSession *session); QVector getActions() override; bool fetchInterfaces() override; void clearInterfaces() override; QString menuGroup() const override; bool availableInPartition(IDL::PartitionType partition) const override { return partition == IDL::PartitionType::Exercise; } // ForeignDataInterface void showInfoWindow(const QVector &aesEntityIds, AreaEffectSimulation::AesType aesType) override; void showInfoWindow(int aesEntityId, AreaEffectSimulation::AesType aesType) override; LtsWidgets::LtsDialog* showDangerAreaAesItemInfo(const QSet &dangerAreaIds, const QSet &aesItemIds) override; virtual void showChargeEffectInfoWindow(int chargeEffectId) override; private: std::shared_ptr m_dtc; std::shared_ptr m_ftc; std::shared_ptr m_pdmDtc; }; } // namespace AreaEffectSimulation