/** *@RDE_HEADER@ * Gui Plugin for ParticipantManagement - ParticipantInfo * $Id$ * $HeadURL$ * $Author$ * Created by Christian Ehrlicher, SLSE, 2016-02-29 */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include "participant_search_widget.h" namespace LtsNotification { class LtsNotification; } class QShortcut; namespace ParticipantManagement { class ParticipantSearchModal; class GuiPlugin final : public QObject, public GuiPluginBase::Plugin { Q_PLUGIN_METADATA(IID "gui:3:ppm.participantinfo") Q_INTERFACES(GuiPluginBase::Plugin) Q_OBJECT public: GuiPlugin() = default; ~GuiPlugin() = default; QString pluginName() override { return QStringLiteral("ParticipantManagement.GuiPlugin.ParticipantInfo"); } std::shared_ptr createGuiInterface(LtsSession::LtsSession *session) override; bool availableInPartition(IDL::PartitionType partition) const override { return (partition == IDL::PartitionType::Global || partition == IDL::PartitionType::Exercise || partition == IDL::PartitionType::Replay); } }; class InterfaceImpl final : public QObject, public ForeignParticipantInfoGuiInterface, 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 || partition == IDL::PartitionType::Replay; } // ForeignDataInterface void showParticipantInfoWindow(const QVector &entityIds) override; void showParticipantInfoWindow(int entityId, bool hideSituationMapRelatedButtons = false) override; void showBiteWindow(const QJsonObject &detailData) override; void showHitLineInfoWindow(const QVector &hitLineIds) override; void showHitLineInfoWindow(int hitLineId) override; static const QString s_participantInfoScheme; public slots: void onNewFollowEquipment(const int equipmentNumber, const int participantId); void onParticipantPositionChanged(const ParticipantManagement::ParticipantPosition &data, DataModification modType); void onUnitPositionChanged(const ParticipantManagement::UnitPosition &data, DataModification modType); private slots: void onShowSearchParticipant(); private: LtsWidgets::LtsDialog *onShowParticipantInfoTableDialog(QWidget *parent); LtsWidgets::LtsDialog *onShowParticipantConfigDialog(bool isMessage, QWidget *parent); LtsWidgets::LtsDialog *onShowParticipantSearchDialog(QWidget *parent); LtsWidgets::LtsDialog *onShowParticipantFollowDialog(QWidget *parent); bool eventFilter(QObject *obj, QEvent *event) override; // show participant info dialog on clicked link // bool event(QEvent *event) override; // show participant info dialog on clicked link std::shared_ptr m_dtc; std::shared_ptr m_ftc; std::shared_ptr m_pdmDtc; std::shared_ptr m_pdmGuiIfc; std::shared_ptr m_sitmapGuIfc; std::shared_ptr m_asbIfc; std::shared_ptr m_ppmGuiIfc; std::shared_ptr m_ppmOcGuiIfc; std::shared_ptr m_sitMapGuiIfc; std::shared_ptr m_symbolAppearanceSettings; std::shared_ptr m_fltParticipantIfc; QShortcut *m_scSearchParticipant = nullptr; QPointer m_participantShowModalPtr; LtsNotification::LtsNotification *m_noti = nullptr; int m_followEquipmentNumber = 0; int m_followParticipantId = 0; LtsNotification::LtsNotification *m_notiSearchParticipant = nullptr; ParticipantSearchWidget *m_participantSearchWidget = nullptr; }; } // namespace ParticipantManagement