/** The PlanCreator class creates a tactical plan with the information given by a collateral damage simulation * @RDE_HEADER@ * $Id: ppm_msdl_edit.h 52239 2020-10-05 11:33:12Z thoden $ * $HeadURL: svn://192.168.133.21/TDS/branches/product/features/3dws_devel/Lts/Plugins/ParticipantManagement/Gui/MSDL/ppm_msdl_edit.h $ * $Author: thoden $ * Created by Hannes Fritsche, ESZS, 2024-08-20 */ #pragma once #include #include #include #include #include #include #include #include namespace FileManagement { namespace Interface { class Ftc; } } namespace InfrastructureManagement { namespace Interface { class Dtc; } } namespace CollateralDamageSimulation { enum class ProtectionState { WithProtection = 2, WithoutProtection = 4, Underground = 5, }; class PlanCreator : public QObject { Q_OBJECT public: explicit PlanCreator(QWidget *parent = nullptr); ~PlanCreator(); void init(const std::shared_ptr &ismDtc, const std::shared_ptr &ppmDtc, const std::shared_ptr &flmFtc); void addBuildings(const QHash &buildingFootprints, const QVector &directlyHitBuildings); void addProtectionAreas(const QVector &protectionAreas); void addDetonationArea(const QPointF &impactPosition, double lethalRadius, double nonLethalRadius = 0.0); void addParticipantsWithProtection(const QVector &participantIds); void addParticipantsWithoutProtection(const QVector &participantIds); void addParticipantsInUnderground(const QVector &participantIds); void save(const QString &name, int folderId, int exerciseId); void clear(); private: // methods void warnSafeDidNotWork(const QString &message); void addBuilding(const QPolygonF &footprint, bool isDirectlyHit); void addParticipants(const QVector &participantIds, ProtectionState protectionState); void addParticipant(int participantId, ProtectionState protectionState); void addProtectionArea(const QPolygonF &areaPolygon); SymbologyXML::SymbolTypes::t_affil partyRoleToSymbolAffiliation(const ParticipantManagement::Role &partyRole) const; private: // attributes QList m_protectionAreas; QList m_directlyHitBuildings; SituationMap::GeometryModel *m_geometryModel { nullptr }; std::shared_ptr m_flmFtc; std::shared_ptr m_ismDtc; std::shared_ptr m_ppmDtc; QMap m_partyCache; }; } // namespace CollateralDamageSimulation