/** * @RDE_HEADER@ * Tactical Organisation of Parties (during exercise execution) * $Id$ * $HeadURL$ * $Author$ * Created by Patric Karwat, SLSE, 2016-10-05 */ #pragma once #include #include #include #include #include #include class QTreeView; namespace AdvancedSymbology { class ForeignDataInterface; } namespace LtsSession { class LtsSession; } namespace Core { namespace Interface { class Ftc; } } namespace Ui { class TacticalOrganisation; } namespace ParticipantManagement { class ParticipantEditItem; class ParticipantEditModel; class ParticipantTreeFilterProxyModel; class TacticalOrganisation final : public LtsWidgets::LtsDialog , protected ParticipantManagement::Interface::Ftc::ModifyParticipantDataReplyHandler { Q_OBJECT public: explicit TacticalOrganisation(LtsSession::LtsSession *session, QWidget *parent = nullptr); ~TacticalOrganisation(); bool init(const std::shared_ptr &dtc, const std::shared_ptr &ftc, const std::shared_ptr &ppmGuiCbxIfc, const std::shared_ptr &asbIfc); void retranslate() override; protected: bool apply() override; void onModifyParticipantDataReply(const Core::FunctionReplyObject &replyObject) override; private Q_SLOTS: void onReinitLeft(); void onReinitRight(); void onAddParticipant(); void onParticipantSelected(int participantId); void showContextMenu(const QPoint position); private: void expandNodeChildren(QTreeView *pTreeView, const QModelIndex &index, bool expand); void editParticipant(const QModelIndex &idx); ParticipantTreeFilterProxyModel *modelForParty(int partyId, bool bLeftSide); ParticipantEditModel *editModelForParty(int partyId); void initLockedState(); void tableColumnOrganiserSetting() override; private: std::shared_ptr m_dtc; std::shared_ptr m_ftc; std::shared_ptr m_ppmGuiCbxIfc; std::shared_ptr m_asbIfc; std::shared_ptr m_coreFtc; QHash m_participantModels; QHash m_participantProxyModels; LtsSession::LtsSession *m_session; LtsUtils::RequestHelper *m_requestHelper; QAction *m_addEquipmentNumberAction; QTreeView *m_tvContextMenu; ParticipantEditItem *m_newItemDlg; static int s_preselectedPartyLeft; static int s_preselectedPartyRight; // used for topic locking static const qint64 m_entityId { 12345678901 }; int32_t m_unlockId {0}; Ui::TacticalOrganisation *m_ui; NGL::INGLLogger &m_logger; }; } // namespace ParticipantManagement