/** * @RDE_HEADER@ * GUI Plugin for ParticipantManagement - Participant Edit * $Id$ * $HeadURL$ * $Author$ * Created by Patric Karwat, SLSE, 2016-10-17 */ #pragma once #include #include #include #include #include #include namespace AdvancedSymbology { class ForeignDataInterface; } namespace ParticipantManagement { class GuiPlugin final : public QObject, public GuiPluginBase::Plugin { Q_PLUGIN_METADATA(IID "gui:3:ppm.participant") Q_INTERFACES(GuiPluginBase::Plugin) Q_OBJECT public: GuiPlugin() = default; ~GuiPlugin() = default; QString pluginName() override { return QStringLiteral("ParticipantManagement.GuiPlugin.ParticipantEdit"); } std::shared_ptr createGuiInterface(LtsSession::LtsSession *session) override; bool availableInPartition(IDL::PartitionType partition) const override { return (partition == IDL::PartitionType::Exercise); } }; class InterfaceImpl final : public QObject, public ForeignGuiParticipantsInterface, public GuiPluginBase::Interface { Q_OBJECT public: explicit InterfaceImpl(LtsSession::LtsSession *session); QVector getActions() override; bool fetchInterfaces() override; void clearInterfaces() override; QString menuGroup() const override; QString menuGroupSup() const; bool availableInPartition(IDL::PartitionType partition) const override { return partition == IDL::PartitionType::Exercise; } private: LtsWidgets::LtsDialog *onParticipantEdit(QWidget *parent, bool asSupportService); LtsWidgets::LtsDialog *onParticipantOrganisation(QWidget *parent, bool asSupportService); LtsWidgets::LtsDialog *onTacticalParticipantOrganisation(QWidget *parent); private: std::shared_ptr m_dtc; std::shared_ptr m_ftc; std::shared_ptr m_ppmGuiTemplateIfc; std::shared_ptr m_ppmGuiCbxIfc; std::shared_ptr m_asb; }; } // namespace ParticipantManagement