Files
qt5-legatus-legacy/Lts/Plugins/CollateralDamageSimulation/Gui/CreateSimulation/cds_pdf_creator.h
T
2026-08-13 18:33:10 +02:00

81 lines
2.0 KiB
C++
Executable File

/**
The PdfCreator class creates a PDF file 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-26
*/
#pragma once
#include <QObject>
#include <memory>
namespace KDReports
{
class Report;
}
namespace FileManagement
{
namespace Interface
{
class Ftc;
}
}
namespace InfrastructureManagement
{
namespace Interface
{
class Dtc;
}
}
namespace ParticipantManagement
{
namespace Interface
{
class Dtc;
}
}
namespace CollateralDamageSimulation
{
class PdfCreator : public QObject
{
Q_OBJECT
public:
explicit PdfCreator(QWidget *parent = nullptr);
~PdfCreator();
void init(const std::shared_ptr<InfrastructureManagement::Interface::Dtc> &ismDtc,
const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc,
const std::shared_ptr<FileManagement::Interface::Ftc> &flmFtc);
void addInformation(const QString &name, const QString &charge, const QString &igniterType, const QString &position);
void addBuildings(const QVector<int> &buildingIds);
void addParticipantsWithProtection(const QVector<int> &participantIds);
void addParticipantsWithoutProtection(const QVector<int> &participantIds);
void save(const QString &name, int folderId, int exerciseId);
void clear();
private: // methods
void warnSafeDidNotWork(const QString &message) const;
void addParticipantTable(const QVector<int> &participantIds, const QString &tableName);
private: // attributes
std::shared_ptr<FileManagement::Interface::Ftc> m_flmFtc;
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
KDReports::Report *m_report { nullptr };
};
} // namespace CollateralDamageSimulation