Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen

- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung
- 44 Export-Header Include-Pfade korrigiert (_export.h)
- 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h)
- INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros
- Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits)
- FATAL_LOG Makro hinzugefügt
- InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h)
- FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h)
- AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp)
- SymbolAppearance Klasse vollständig definiert mit content() Methode
- BuildingComponentFilter Klasse definiert mit Copy-Konstruktor
- Ftc Factory: nullptr Return (abstract class)
- AesFilter Klasse in aes.hpp hinzugefügt
- Dtc Klasse in ppm.hpp mit participantChanged Signal
- AesType Enum: alle 15 At* Werte definiert
- AesEffectState_def: EsReceived hinzugefügt
- DataModification Enum: eAdded/eModified/eRemoved
- function_reply_object.h → core_types.h Include-Pfad (72 Dateien)
- Enum-Class-Streaming Template-Operator in INGLLogger.h
- ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen
- ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge
- QRegExp → QRegularExpression in tpm_js_parser.cpp
- .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert
- Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-08-19 06:06:24 +02:00
1 parent 010f91928a
commit b774f4035c
2785 files changed
+18754 -18316

No files matched your search

@@ -21,7 +21,6 @@ ReportAesModel::ReportAesModel(const ReportType &reportType,
, m_aesDtc(aesDtc)
, m_pdmDtc(pdmDtc)
, m_reportType(reportType)
, m_logger(getLogger("ReportAesModel"))
{
}
@@ -57,8 +57,6 @@ private:
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> m_aesDtc;
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_pdmDtc;
ReportType m_reportType;
LOGGER_T m_logger;
friend class ReportAesProxyModel;
};
@@ -18,7 +18,6 @@ ReportBuildingModel::ReportBuildingModel(LtsSession::LtsSession *session,
, m_session(session)
, m_ismDtc(ismDtc)
, m_reportType(reportType)
, m_logger(getLogger("ReportBuildingModel"))
{
connect(m_ismDtc.get(), &InfrastructureManagement::Interface::Dtc::mainStructureElementChanged,
this, &ReportBuildingModel::onDataChanged);
@@ -33,7 +33,6 @@ private:
LtsSession::LtsSession *m_session;
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
ReportType m_reportType;
LOGGER_T m_logger;
};
}
@@ -20,7 +20,6 @@ ReportChargeModel::ReportChargeModel(const ReportManagement::ReportType &reportT
parent)
, m_pdmDtc(pdmDtc)
, m_reportType(reportType)
, m_logger(getLogger("ReportChargeModel"))
{
connect(m_pdmDtc.get(), &ProjectDataManagement::Interface::Dtc::chargeTypeChanged,
this, &ReportChargeModel::onDataChanged);
@@ -36,7 +36,6 @@ protected:
private:
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_pdmDtc;
ReportType m_reportType;
LOGGER_T m_logger;
};
class ReportChargeProxyModel final : public QSortFilterProxyModel
@@ -18,7 +18,6 @@ ReportSanitationMaterialModel::ReportSanitationMaterialModel(const ReportManagem
parent)
, m_pdmDtc(pdmDtc)
, m_reportType(reportType)
, m_logger(getLogger("ReportSanitationMaterialModel"))
{
connect(m_pdmDtc.get(), &ProjectDataManagement::Interface::Dtc::sanitationMaterialChanged,
this, &ReportSanitationMaterialModel::onDataChanged);
@@ -31,7 +31,6 @@ public:
private:
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_pdmDtc;
ReportType m_reportType;
LOGGER_T m_logger;
};
}
@@ -17,7 +17,6 @@ ReportTypeModel::ReportTypeModel(const ReportType &reportType,
parent)
, m_ppmDtc(ppmDtc)
, m_reportType(reportType)
, m_logger(getLogger("ReportTypeModel"))
{
connect(m_ppmDtc.get(), &ParticipantManagement::Interface::Dtc::typeChanged,
this, &ReportTypeModel::onDataChanged);
@@ -35,7 +35,6 @@ protected:
private:
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
ReportType m_reportType;
LOGGER_T m_logger;
};
}
@@ -21,7 +21,6 @@ using namespace ReportManagement;
AirSupportModel::AirSupportModel(const ReportInfo &report, LtsSession::LtsSession *session, QObject *parent)
: AbstractModel(report, session, parent)
, m_pdmDtc(nullptr)
, m_logger(getLogger("AirSupportModel"))
{
if (!fetchInterfaces())
return;
@@ -110,12 +109,12 @@ bool AirSupportModel::fetchInterfaces()
{
if (!m_session->getDtc<ProjectDataManagement::DataInterface>(m_pdmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PDM DTC Interface";
ERROR_LOG() << "Could not fetch PDM DTC Interface";
return false;
}
if (!m_session->getDtc<AreaEffectSimulation::DataInterface>(m_aesDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PDM DTC Interface";
ERROR_LOG() << "Could not fetch PDM DTC Interface";
return false;
}
return true;
@@ -329,7 +328,7 @@ QVariant AirSupportModel::headerData(int section, Qt::Orientation orientation, i
void AirSupportModel::fillReportData()
{
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
DEBUG_LOG() << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
int chargeTypeId = -1;
QMap<int, QVector<int> > sums;
@@ -351,10 +350,10 @@ void AirSupportModel::fillReportData()
resData.hits[2] = obj[QStringLiteral("hits")].toInt();
resData.hits[1] = resData.hits[2] + resData.hits[3] + resData.hits[0];
INFO_LOG(m_logger) << "Charge type id = " << resData.chargeTypeId;
INFO_LOG(m_logger) << "Start time = " << resData.startTime;
INFO_LOG(m_logger) << "VulnerabilityState = " << resData.vulnerabilityState;
INFO_LOG(m_logger) << "Hits = ("
INFO_LOG() << "Charge type id = " << resData.chargeTypeId;
INFO_LOG() << "Start time = " << resData.startTime;
INFO_LOG() << "VulnerabilityState = " << resData.vulnerabilityState;
INFO_LOG() << "Hits = ("
<< resData.hits[0] << ", "
<< resData.hits[1] << ", "
<< resData.hits[2] << ", "
@@ -363,7 +362,7 @@ void AirSupportModel::fillReportData()
if (chargeTypeId != resData.chargeTypeId)
{
DEBUG_LOG(m_logger) << "New chargeTypeId: " << resData.chargeTypeId;
DEBUG_LOG() << "New chargeTypeId: " << resData.chargeTypeId;
if (chargeTypeId != -1)
{
resultDataTable totalChargeTypeId;
@@ -381,7 +380,7 @@ void AirSupportModel::fillReportData()
}
else
{
DEBUG_LOG(m_logger) << "Adding values to chargeType id: " << chargeTypeId;
DEBUG_LOG() << "Adding values to chargeType id: " << chargeTypeId;
resData.hits[4] = 0;
sumUp(sums[chargeTypeId], resData.hits, resData.hits.size());
}
@@ -415,7 +414,7 @@ void AirSupportModel::fillReportData()
void AirSupportModel::fillPieData()
{
DEBUG_LOG(m_logger) << "fillPieData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
DEBUG_LOG() << "fillPieData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
QMap<QPair<int,double>, QVector<int> > sums;
@@ -431,9 +430,9 @@ void AirSupportModel::fillPieData()
resPieData.hits[2] = obj[QStringLiteral("hits")].toInt();
resPieData.hits[1] = resPieData.hits[2] + resPieData.hits[3];
INFO_LOG(m_logger) << "Charge type id = " << resPieData.chargeTypeId;
INFO_LOG(m_logger) << "Start time = " << resPieData.startTime;
INFO_LOG(m_logger) << "Hits = ("
INFO_LOG() << "Charge type id = " << resPieData.chargeTypeId;
INFO_LOG() << "Start time = " << resPieData.startTime;
INFO_LOG() << "Hits = ("
<< resPieData.hits[0] << ", "
<< resPieData.hits[1] << ", "
<< resPieData.hits[2] << ", "
@@ -459,10 +458,10 @@ void AirSupportModel::fillPieData()
resPie.startTime = key.second;
resPie.hits = sums[key];
INFO_LOG(m_logger) << "ChargeType: " << resPie.chargeTypeId;
INFO_LOG(m_logger) << "StartTime: " << resPie.startTime;
INFO_LOG() << "ChargeType: " << resPie.chargeTypeId;
INFO_LOG() << "StartTime: " << resPie.startTime;
for(int i = 0; i < resPie.hits.size(); ++i)
INFO_LOG(m_logger) << "Hits = ("
INFO_LOG() << "Hits = ("
<< resPie.hits[0] << ", "
<< resPie.hits[1] << ", "
<< resPie.hits[2] << ", "
@@ -19,7 +19,6 @@ using namespace ReportManagement;
BuildingDamageModel::BuildingDamageModel(const ReportInfo &report, LtsSession::LtsSession *session, QObject *parent)
: AbstractModel(report, session, parent)
, m_ismDtc(nullptr)
, m_logger(getLogger("BuildingDamageModel"))
{
if (!fetchInterfaces())
return;
@@ -161,7 +160,7 @@ QVariant BuildingDamageModel::headerData(int section, Qt::Orientation orientatio
void BuildingDamageModel::fillReportData()
{
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
DEBUG_LOG() << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
{
@@ -177,10 +176,10 @@ void BuildingDamageModel::fillReportData()
resData.damages[4] = obj[QStringLiteral("damage_100")].toInt();
resData.buildingDamagePercent = obj[QStringLiteral("damage_percent")].toInt();
INFO_LOG(m_logger) << "Building Id = " << resData.buildingId;
INFO_LOG(m_logger) << "Time point = " << resData.timePoint;
INFO_LOG(m_logger) << "Damages = " << resData.damages;
INFO_LOG(m_logger) << "Building Damage Percent = " << resData.buildingDamagePercent;
INFO_LOG() << "Building Id = " << resData.buildingId;
INFO_LOG() << "Time point = " << resData.timePoint;
INFO_LOG() << "Damages = " << resData.damages;
INFO_LOG() << "Building Damage Percent = " << resData.buildingDamagePercent;
m_data.append(std::move(resData));
}
@@ -191,7 +190,7 @@ bool BuildingDamageModel::fetchInterfaces()
{
if (!m_session->getDtc<InfrastructureManagement::DataInterface>(m_ismDtc))
{
ERROR_LOG(m_logger) << "Could not fetch ISM DTC Interface";
ERROR_LOG() << "Could not fetch ISM DTC Interface";
return false;
}
return true;
@@ -19,7 +19,6 @@ using namespace ReportManagement;
ChargeAdministrationModel::ChargeAdministrationModel(const ReportInfo &report, LtsSession::LtsSession *session, QObject *parent)
: AbstractModel(report, session, parent)
, m_pdmDtc(nullptr)
, m_logger(getLogger("ChargeAdministrationModel"))
{
if (!fetchInterfaces())
return;
@@ -58,7 +57,7 @@ bool ChargeAdministrationModel::fetchInterfaces()
{
if (!m_session->getDtc<ProjectDataManagement::DataInterface>(m_pdmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PDM DTC Interface";
ERROR_LOG() << "Could not fetch PDM DTC Interface";
return false;
}
return true;
@@ -185,7 +184,7 @@ QVariant ChargeAdministrationModel::headerData(int section, Qt::Orientation orie
void ChargeAdministrationModel::fillReportData()
{
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
DEBUG_LOG() << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
int sums[6] = {0, 0, 0, 0, 0, 0};
int bigTotal[6] = {0, 0, 0, 0, 0, 0};
@@ -205,15 +204,15 @@ void ChargeAdministrationModel::fillReportData()
resData.charges[4] = obj[QStringLiteral("charge_planned")].toInt();
resData.charges[5] = obj[QStringLiteral("charge_available")].toInt();
INFO_LOG(m_logger) << "Charge type id = " << resData.chargeTypeId;
INFO_LOG(m_logger) << "Effect Source id = " << resData.effectSourceId;
INFO_LOG(m_logger) << "Charges = (" << resData.charges[0] << ", " << resData.charges[1] << ", " << resData.charges[2] << ", " << resData.charges[3] << ", "
INFO_LOG() << "Charge type id = " << resData.chargeTypeId;
INFO_LOG() << "Effect Source id = " << resData.effectSourceId;
INFO_LOG() << "Charges = (" << resData.charges[0] << ", " << resData.charges[1] << ", " << resData.charges[2] << ", " << resData.charges[3] << ", "
<< resData.charges[4] << ", " << resData.charges[5] << ")";
if (effectSourceId != resData.effectSourceId)
{
DEBUG_LOG(m_logger) << "New effectSourceId: " << resData.effectSourceId;
DEBUG_LOG() << "New effectSourceId: " << resData.effectSourceId;
if (effectSourceId != ProjectDataManagement::EffectSource::ES_Unknown)
{
resultData totalEffectSource;
@@ -54,7 +54,6 @@ class ChargeAdministrationModel final : public AbstractModel
QVector<resultData> m_data;
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_pdmDtc;
LOGGER_T m_logger;
};
}
@@ -18,7 +18,6 @@ using namespace ReportManagement;
ChargeResupplyModel::ChargeResupplyModel(const ReportInfo &report, LtsSession::LtsSession *session, QObject *parent)
: AbstractModel(report, session, parent)
, m_logger(getLogger("ChargeResupplyModel"))
{
if (!fetchInterfaces())
return;
@@ -100,12 +99,12 @@ bool ChargeResupplyModel::fetchInterfaces()
{
if (!m_session->getDtc<ProjectDataManagement::DataInterface>(m_pdmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PDM DTC Interface";
ERROR_LOG() << "Could not fetch PDM DTC Interface";
return false;
}
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PPM DTC Interface";
ERROR_LOG() << "Could not fetch PPM DTC Interface";
return false;
}
return true;
@@ -252,7 +251,7 @@ QVariant ChargeResupplyModel::headerData(int section, Qt::Orientation orientatio
void ChargeResupplyModel::fillReportData()
{
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
DEBUG_LOG() << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
int participantTypeId = -1;
QMap<int, QVector<int> > sums;
@@ -272,9 +271,9 @@ void ChargeResupplyModel::fillReportData()
resData.charges[3] = obj[QStringLiteral("charge_end")].toInt();
resData.charges[4] = obj[QStringLiteral("charge_fired")].toInt();
INFO_LOG(m_logger) << "Participant type id = " << resData.participantTypeId;
INFO_LOG(m_logger) << "Charge type id = " << resData.chargeTypeId;
INFO_LOG(m_logger) << "Charges = ("
INFO_LOG() << "Participant type id = " << resData.participantTypeId;
INFO_LOG() << "Charge type id = " << resData.chargeTypeId;
INFO_LOG() << "Charges = ("
<< resData.charges[0] << ", "
<< resData.charges[1] << ", "
<< resData.charges[2] << ", "
@@ -283,7 +282,7 @@ void ChargeResupplyModel::fillReportData()
if (participantTypeId != resData.participantTypeId)
{
DEBUG_LOG(m_logger) << "New participant type id: " << resData.participantTypeId;
DEBUG_LOG() << "New participant type id: " << resData.participantTypeId;
if (participantTypeId != -1)
{
resultData totalType;
@@ -300,7 +299,7 @@ void ChargeResupplyModel::fillReportData()
}
else
{
DEBUG_LOG(m_logger) << "Adding values to participant type id: " << participantTypeId;
DEBUG_LOG() << "Adding values to participant type id: " << participantTypeId;
sumUp(sums[participantTypeId], resData.charges, resData.charges.size());
}
@@ -20,7 +20,6 @@ using namespace ReportManagement;
FiringsModel::FiringsModel(const ReportInfo &report, LtsSession::LtsSession *session, QObject *parent)
: AbstractModel(report, session, parent)
, m_pdmDtc(nullptr)
, m_logger(getLogger("FiringsModel"))
{
if (!fetchInterfaces())
return;
@@ -109,7 +108,7 @@ bool FiringsModel::fetchInterfaces()
{
if (!m_session->getDtc<ProjectDataManagement::DataInterface>(m_pdmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PDM DTC Interface";
ERROR_LOG() << "Could not fetch PDM DTC Interface";
return false;
}
return true;
@@ -315,7 +314,7 @@ QVariant FiringsModel::headerData(int section, Qt::Orientation orientation, int
void FiringsModel::fillReportData()
{
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
DEBUG_LOG() << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
int chargeTypeId = -1;
QMap<int, QVector<int> > sums;
@@ -336,10 +335,10 @@ void FiringsModel::fillReportData()
resData.hits[2] = obj[QStringLiteral("hits")].toInt();
resData.hits[1] = resData.hits[2] + resData.hits[3];
INFO_LOG(m_logger) << "Charge type id = " << resData.chargeTypeId;
INFO_LOG(m_logger) << "Start time = " << resData.startTime;
INFO_LOG(m_logger) << "VulnerabilityState = " << resData.vulnerabilityState;
INFO_LOG(m_logger) << "Hits = ("
INFO_LOG() << "Charge type id = " << resData.chargeTypeId;
INFO_LOG() << "Start time = " << resData.startTime;
INFO_LOG() << "VulnerabilityState = " << resData.vulnerabilityState;
INFO_LOG() << "Hits = ("
<< resData.hits[0] << ", "
<< resData.hits[1] << ", "
<< resData.hits[2] << ", "
@@ -347,7 +346,7 @@ void FiringsModel::fillReportData()
if (chargeTypeId != resData.chargeTypeId)
{
DEBUG_LOG(m_logger) << "New charge type id: " << resData.chargeTypeId;
DEBUG_LOG() << "New charge type id: " << resData.chargeTypeId;
if (chargeTypeId != -1)
{
resultDataTable totalChargeType;
@@ -365,7 +364,7 @@ void FiringsModel::fillReportData()
}
else
{
DEBUG_LOG(m_logger) << "Adding values to charge type id: " << chargeTypeId;
DEBUG_LOG() << "Adding values to charge type id: " << chargeTypeId;
sumUp(sums[chargeTypeId], resData.hits, resData.hits.size());
}
@@ -398,7 +397,7 @@ void FiringsModel::fillReportData()
void FiringsModel::fillPieData()
{
DEBUG_LOG(m_logger) << "fillPieData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
DEBUG_LOG() << "fillPieData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
QMap<QPair<int,double>, QVector<int> > sums;
@@ -415,9 +414,9 @@ void FiringsModel::fillPieData()
resPieData.hits[2] = obj[QStringLiteral("hits")].toInt();
resPieData.hits[1] = resPieData.hits[2] + resPieData.hits[3];
INFO_LOG(m_logger) << "Charge type id = " << resPieData.chargeTypeId;
INFO_LOG(m_logger) << "Start time = " << resPieData.startTime;
INFO_LOG(m_logger) << "Hits = ("
INFO_LOG() << "Charge type id = " << resPieData.chargeTypeId;
INFO_LOG() << "Start time = " << resPieData.startTime;
INFO_LOG() << "Hits = ("
<< resPieData.hits[0] << ", "
<< resPieData.hits[1] << ", "
<< resPieData.hits[2] << ", "
@@ -441,10 +440,10 @@ void FiringsModel::fillPieData()
resPie.startTime = key.second;
resPie.hits = sums[key];
INFO_LOG(m_logger) << "ChargeType: " << resPie.chargeTypeId;
INFO_LOG(m_logger) << "StartTime: " << resPie.startTime;
INFO_LOG() << "ChargeType: " << resPie.chargeTypeId;
INFO_LOG() << "StartTime: " << resPie.startTime;
for(int i = 0; i < resPie.hits.size(); ++i)
INFO_LOG(m_logger) << "Hits = ("
INFO_LOG() << "Hits = ("
<< resPie.hits[0] << ", "
<< resPie.hits[1] << ", "
<< resPie.hits[2] << ", "
@@ -19,7 +19,6 @@ using namespace ReportManagement;
MaintenanceModel::MaintenanceModel(const ReportInfo &report, LtsSession::LtsSession *session, QObject *parent)
: AbstractModel(report, session, parent)
, m_ppmDtc(nullptr)
, m_logger(getLogger("ReportMaintenanceModel"))
{
if (!fetchInterfaces())
return;
@@ -69,7 +68,7 @@ bool MaintenanceModel::fetchInterfaces()
{
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PPM DTC Interface";
ERROR_LOG() << "Could not fetch PPM DTC Interface";
return false;
}
return true;
@@ -198,7 +197,7 @@ QVariant MaintenanceModel::headerData(int section, Qt::Orientation orientation,
void MaintenanceModel::fillReportData()
{
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
DEBUG_LOG() << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
{
@@ -213,11 +212,11 @@ void MaintenanceModel::fillReportData()
resData.time_position = obj[QStringLiteral("time_position_changed")].toDouble();
resData.time_vulnerability = obj[QStringLiteral("time_vulnerability")].toDouble();
INFO_LOG(m_logger) << "Participant id = " << resData.participantId;
INFO_LOG(m_logger) << "Participant type id = " << resData.participantTypeId;
INFO_LOG(m_logger) << "Time event = " << resData.time_event;
INFO_LOG(m_logger) << "Time pos = " << resData.time_position;
INFO_LOG(m_logger) << "Time vulnerability = " << resData.time_vulnerability;
INFO_LOG() << "Participant id = " << resData.participantId;
INFO_LOG() << "Participant type id = " << resData.participantTypeId;
INFO_LOG() << "Time event = " << resData.time_event;
INFO_LOG() << "Time pos = " << resData.time_position;
INFO_LOG() << "Time vulnerability = " << resData.time_vulnerability;
m_data.append(std::move(resData));
}
@@ -20,7 +20,6 @@ using namespace ReportManagement;
MedevacNineLinerModel::MedevacNineLinerModel(const ReportInfo &report, LtsSession::LtsSession *session, QObject *parent)
: AbstractModel(report, session, parent)
, m_evlDtc(nullptr)
, m_logger(getLogger("MedevacNineLinerModel"))
{
if (!fetchInterfaces())
return;
@@ -53,7 +52,7 @@ bool MedevacNineLinerModel::fetchInterfaces()
{
if (!m_session->getDtc<Evaluations::DataInterface>(m_evlDtc))
{
ERROR_LOG(m_logger) << "Could not fetch EVL DTC Interface";
ERROR_LOG() << "Could not fetch EVL DTC Interface";
return false;
}
return true;
@@ -163,7 +162,7 @@ QVariant MedevacNineLinerModel::headerData(int section, Qt::Orientation orientat
void MedevacNineLinerModel::fillReportData()
{
ERROR_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
ERROR_LOG() << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
{
@@ -171,7 +170,7 @@ void MedevacNineLinerModel::fillReportData()
resultData resData;
resData.nineLinerId = obj[QStringLiteral("nine_liner_id")].toInt();
DEBUG_LOG(m_logger) << "Nine Liner id = " << resData.nineLinerId;
DEBUG_LOG() << "Nine Liner id = " << resData.nineLinerId;
Evaluations::SanNineLiner crtNineLiner = m_evlDtc->sanNineLiner(resData.nineLinerId);
if (crtNineLiner.id() <= 0 )
@@ -185,7 +184,7 @@ void MedevacNineLinerModel::fillReportData()
QVector<Evaluations::Database::SanCategoryLine> linesCategory = Evaluations::SanCategoryLine::fromJson(crtNineLiner.lines(), crtNineLiner.id());
INFO_LOG(m_logger) << "linesCategory size: " << linesCategory.size();
INFO_LOG() << "linesCategory size: " << linesCategory.size();
for (const Evaluations::Database::SanCategoryLine &cl : std::as_const(linesCategory))
{
@@ -19,7 +19,6 @@ using namespace ReportManagement;
MineAreaModel::MineAreaModel(const ReportInfo &report, LtsSession::LtsSession *session, QObject *parent)
: AbstractModel(report, session, parent)
, m_ppmDtc(nullptr)
, m_logger(getLogger("MineAreaModel"))
{
if (!fetchInterfaces())
return;
@@ -73,7 +72,7 @@ bool MineAreaModel::fetchInterfaces()
{
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PPM DTC Interface";
ERROR_LOG() << "Could not fetch PPM DTC Interface";
return false;
}
return true;
@@ -204,7 +203,7 @@ QVariant MineAreaModel::headerData(int section, Qt::Orientation orientation, int
void MineAreaModel::fillReportData()
{
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
DEBUG_LOG() << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
int mineAreaId = -1;
QString mineAreaName;
@@ -224,10 +223,10 @@ void MineAreaModel::fillReportData()
resData.hits[2] = obj[QStringLiteral("hit_friendly_fire")].toInt();
resData.hits[1] = resData.hits[0] - resData.hits[2];
INFO_LOG(m_logger) << "Mine area id = " << resData.mineAreaId;
INFO_LOG(m_logger) << "Mine area name = " << resData.mineAreaName;
INFO_LOG(m_logger) << "Participant type id = " << resData.participantTypeId;
INFO_LOG(m_logger) << "Hits = ("
INFO_LOG() << "Mine area id = " << resData.mineAreaId;
INFO_LOG() << "Mine area name = " << resData.mineAreaName;
INFO_LOG() << "Participant type id = " << resData.participantTypeId;
INFO_LOG() << "Hits = ("
<< resData.hits[0] << ", "
<< resData.hits[1] << ", "
<< resData.hits[2] << ")" ;
@@ -21,7 +21,6 @@ NbcModel::NbcModel(const ReportInfo &report, LtsSession::LtsSession *session, QO
: AbstractModel(report, session, parent)
, m_ppmDtc(nullptr)
, m_pdmDtc(nullptr)
, m_logger(getLogger("NbcModel"))
{
if (!fetchInterfaces())
return;
@@ -106,12 +105,12 @@ bool NbcModel::fetchInterfaces()
{
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PPM DTC Interface";
ERROR_LOG() << "Could not fetch PPM DTC Interface";
return false;
}
if (!m_session->getDtc<ProjectDataManagement::DataInterface>(m_pdmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PDM DTC Interface";
ERROR_LOG() << "Could not fetch PDM DTC Interface";
return false;
}
return true;
@@ -257,7 +256,7 @@ QVariant NbcModel::headerData(int section, Qt::Orientation orientation, int role
void NbcModel::fillReportData()
{
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
DEBUG_LOG() << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
int nbcId = -1;
QString nbcName;
@@ -279,10 +278,10 @@ void NbcModel::fillReportData()
resData.hits[0] = obj[QStringLiteral("hit")].toInt();
resData.hits[1] = obj[QStringLiteral("protection")].toInt();
INFO_LOG(m_logger) << "Nbc id = " << resData.nbcId;
INFO_LOG(m_logger) << "Nbc name = " << resData.nbcName;
INFO_LOG(m_logger) << "Participant type id = " << resData.participantTypeId;
INFO_LOG(m_logger) << "Hits = ("
INFO_LOG() << "Nbc id = " << resData.nbcId;
INFO_LOG() << "Nbc name = " << resData.nbcName;
INFO_LOG() << "Participant type id = " << resData.participantTypeId;
INFO_LOG() << "Hits = ("
<< resData.hits[0] << ", "
<< resData.hits[1];
@@ -18,7 +18,6 @@ using namespace ReportManagement;
ParticipantDistanceModel::ParticipantDistanceModel(const ReportInfo &report, LtsSession::LtsSession *session, QObject *parent)
: AbstractModel(report, session, parent)
, m_ppmDtc(nullptr)
, m_logger(getLogger("ParticipantDistanceModel"))
{
if (!fetchInterfaces())
return;
@@ -72,7 +71,7 @@ bool ParticipantDistanceModel::fetchInterfaces()
{
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PPM DTC Interface";
ERROR_LOG() << "Could not fetch PPM DTC Interface";
return false;
}
return true;
@@ -200,7 +199,7 @@ QVariant ParticipantDistanceModel::headerData(int section, Qt::Orientation orien
void ParticipantDistanceModel::fillReportData()
{
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
DEBUG_LOG() << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
int participantTypeId = -1;
long bigTotal = 0;
@@ -217,9 +216,9 @@ void ParticipantDistanceModel::fillReportData()
resData.participantEqNo = obj[QStringLiteral("participant_equipment_number")].toInt();
resData.distance = obj[QStringLiteral("distance")].toDouble();
INFO_LOG(m_logger) << "Participant id = " << resData.participantId;
INFO_LOG(m_logger) << "Participant type id = " << resData.participantTypeId;
INFO_LOG(m_logger) << "Participant distance = " << resData.distance;
INFO_LOG() << "Participant id = " << resData.participantId;
INFO_LOG() << "Participant type id = " << resData.participantTypeId;
INFO_LOG() << "Participant distance = " << resData.distance;
if (participantTypeId != resData.participantTypeId)
{
@@ -19,7 +19,6 @@ using namespace ReportManagement;
SanitationMaterialModel::SanitationMaterialModel(const ReportInfo &report, LtsSession::LtsSession *session, QObject *parent)
: AbstractModel(report, session, parent)
, m_pdmDtc(nullptr)
, m_logger(getLogger("SanitationMaterialModel"))
{
if (!fetchInterfaces())
return;
@@ -94,7 +93,7 @@ bool SanitationMaterialModel::fetchInterfaces()
{
if (!m_session->getDtc<ProjectDataManagement::DataInterface>(m_pdmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PDM DTC Interface";
ERROR_LOG() << "Could not fetch PDM DTC Interface";
return false;
}
return true;
@@ -236,7 +235,7 @@ QVariant SanitationMaterialModel::headerData(int section, Qt::Orientation orient
void SanitationMaterialModel::fillReportData()
{
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
DEBUG_LOG() << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
@@ -257,11 +256,11 @@ void SanitationMaterialModel::fillReportData()
resData.amounts[3] = obj[QStringLiteral("amount_used")].toInt();
resData.duration = obj[QStringLiteral("duration")].toDouble();
ERROR_LOG(m_logger) << "Unique id = " << resData.uniqueId;
ERROR_LOG(m_logger) << "qualification = " << resData.qualification;
ERROR_LOG(m_logger) << "Material id = " << resData.materialId;
ERROR_LOG(m_logger) << "Duration with no stock = " << resData.duration;
ERROR_LOG(m_logger) << "Amounts = ("
ERROR_LOG() << "Unique id = " << resData.uniqueId;
ERROR_LOG() << "qualification = " << resData.qualification;
ERROR_LOG() << "Material id = " << resData.materialId;
ERROR_LOG() << "Duration with no stock = " << resData.duration;
ERROR_LOG() << "Amounts = ("
<< resData.amounts[0] << ", "
<< resData.amounts[1] << ", "
<< resData.amounts[2] << ", "
@@ -292,7 +291,7 @@ void SanitationMaterialModel::fillReportData()
totalMatId.qualification = 0;
totalMatId.amounts = totals[matId];
DEBUG_LOG(m_logger) << "Totals per material id = " << matId << " : "
DEBUG_LOG() << "Totals per material id = " << matId << " : "
<< totalMatId.amounts[0] << ", "
<< totalMatId.amounts[1] << ", "
<< totalMatId.amounts[2] << ", "
@@ -24,7 +24,6 @@ TreatmentModel::TreatmentModel(const ReportInfo &report, LtsSession::LtsSession
: AbstractModel(report, session, parent)
, m_ppmDtc(nullptr)
, m_pdmDtc(nullptr)
, m_logger(getLogger("ReportTreatmentModel"))
{
if (!fetchInterfaces())
return;
@@ -116,12 +115,12 @@ bool TreatmentModel::fetchInterfaces()
{
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PPM DTC Interface";
ERROR_LOG() << "Could not fetch PPM DTC Interface";
return false;
}
if (!m_session->getDtc<ProjectDataManagement::DataInterface>(m_pdmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PDM DTC Interface";
ERROR_LOG() << "Could not fetch PDM DTC Interface";
return false;
}
return true;
@@ -253,7 +252,7 @@ QVariant TreatmentModel::data(const QModelIndex &index, int role) const
if (m_report.visualisationType() == VisualisationType::Bar && m_report.reportType() == ReportType::Treatment)
{
int sanResult = index.row();
DEBUG_LOG(m_logger) << "SanRes = " << sanResult;
DEBUG_LOG() << "SanRes = " << sanResult;
const resultDataPieEvaluation &pieInfo = m_bars[sanResult];
if (role == Qt::EditRole)
return pieInfo.groupId;
@@ -429,7 +428,7 @@ QVariant TreatmentModel::headerData(int section, Qt::Orientation orientation, in
void TreatmentModel::fillReportData()
{
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
DEBUG_LOG() << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
resultDataPie pie;
@@ -491,11 +490,11 @@ void TreatmentModel::fillReportData()
{
if (resData.timeTreatmentVulnerability < (10 * 60 * 1000))
resData.inbetween10Minutes = true;
DEBUG_LOG(m_logger) << "qualification: " << resData.qualification;
DEBUG_LOG() << "qualification: " << resData.qualification;
if (resData.timeTreatmentVulnerability < (60 * 60 * 1000) && resData.qualification == ParticipantManagement::Qualification_def::SANPers)
{
resData.goldenHour = true;
DEBUG_LOG(m_logger) << "golden hour particpantId: " << resData.participantId;
DEBUG_LOG() << "golden hour particpantId: " << resData.participantId;
}
}
if (resData.sanitationResult == ParticipantManagement::SanitationResult_def::Optimal)
@@ -506,7 +505,7 @@ void TreatmentModel::fillReportData()
int key = getParticipantKey(resData.participantId);
DEBUG_LOG(m_logger) << "getParticipantKey: " << key;
DEBUG_LOG() << "getParticipantKey: " << key;
countVulnerabilityState(key, resData);
@@ -534,12 +533,12 @@ void TreatmentModel::fillReportData()
if (resData.timeEnterArea <= 0)
{
DEBUG_LOG(m_logger) << "1. not entered RS: " << resData.participantId;
DEBUG_LOG() << "1. not entered RS: " << resData.participantId;
if (!m_rescueStationNotTreated[key].contains(resData.participantId) &&
!m_rescueStationTreated[key].contains(resData.participantId))
{
m_treatmentIntervalMap[key][PIE_notEnteredRecueArea].insert(resData.participantId);
DEBUG_LOG(m_logger) << "2. not entered RS: " << resData.participantId;
DEBUG_LOG() << "2. not entered RS: " << resData.participantId;
}
}
@@ -582,19 +581,19 @@ void TreatmentModel::fillReportData()
resDataTable.amountLightlyWounded = tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::LightDamage).size();
resDataTotal.amountLightlyWounded += resDataTable.amountLightlyWounded;
for ( int id : tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::LightDamage))
INFO_LOG(m_logger) << "participantId: lightlyWouned: " << id;
INFO_LOG() << "participantId: lightlyWouned: " << id;
resDataTable.amountMediumWounded = tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::MediumDamage).size();
resDataTotal.amountMediumWounded += resDataTable.amountMediumWounded;
for ( int id : tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::MediumDamage))
INFO_LOG(m_logger) << "participantId: mediumWouned: " << id;
INFO_LOG() << "participantId: mediumWouned: " << id;
resDataTable.amountHeavyWounded = tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::HeavyDamage).size();
resDataTotal.amountHeavyWounded += resDataTable.amountHeavyWounded;
for ( int id : tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::HeavyDamage))
INFO_LOG(m_logger) << "participantId: heavyWouned: " << id;
INFO_LOG() << "participantId: heavyWouned: " << id;
resDataTable.amountInjuryTotal = resDataTable.amountLightlyWounded + resDataTable.amountMediumWounded
@@ -608,7 +607,7 @@ void TreatmentModel::fillReportData()
for ( int id : tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::CatastrophicKill))
{
INFO_LOG(m_logger) << "participantId: KIA: " << id;
INFO_LOG() << "participantId: KIA: " << id;
m_rescueStationTreated[resDataTable.participantId].remove(id);
m_rescueStationNotTreated[resDataTable.participantId].remove(id);
}
@@ -619,7 +618,7 @@ void TreatmentModel::fillReportData()
for ( int id : tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::TemporarySeverance))
{
INFO_LOG(m_logger) << "participantId: kiaAfterWia: " << id;
INFO_LOG() << "participantId: kiaAfterWia: " << id;
m_rescueStationTreated[resDataTable.participantId].remove(id);
m_rescueStationNotTreated[resDataTable.participantId].remove(id);
}
@@ -628,7 +627,7 @@ void TreatmentModel::fillReportData()
resDataTable.amountTreated = m_treatmentAmount.value(resDataTable.participantId).size();
resDataTotal.amountTreated += resDataTable.amountTreated;
for ( int id : m_treatmentAmount.value(resDataTable.participantId))
INFO_LOG(m_logger) << "participantId: treated " << id;
INFO_LOG() << "participantId: treated " << id;
resDataTable.amountPlatin = m_treatmentIntervalMap[resDataTable.participantId][PIE_platin].size();
resDataTable.amountGoldenHour = m_treatmentIntervalMap[resDataTable.participantId][PIE_goldenHour].size();
@@ -646,13 +645,13 @@ void TreatmentModel::fillReportData()
resDataTable.amountEnterRescueStationNotTreated = m_rescueStationNotTreated.value(resDataTable.participantId).size();
resDataTotal.amountEnterRescueStationNotTreated += resDataTable.amountEnterRescueStationNotTreated;
for ( int id : m_rescueStationNotTreated.value(resDataTable.participantId))
INFO_LOG(m_logger) << "participantId: in RescueStation - not treated: " << id;
INFO_LOG() << "participantId: in RescueStation - not treated: " << id;
resDataTable.amountEnterRescueStationTreated = m_rescueStationTreated.value(resDataTable.participantId).size();
resDataTotal.amountEnterRescueStationTreated += resDataTable.amountEnterRescueStationTreated;
for ( int id : m_rescueStationTreated.value(resDataTable.participantId))
INFO_LOG(m_logger) << "participantId: in RescueStation - treated: " << id;
INFO_LOG() << "participantId: in RescueStation - treated: " << id;
m_dataTable.append(std::move(resDataTable));
}
@@ -665,7 +664,7 @@ void TreatmentModel::fillReportData()
for ( const QMap<int,QSet<int>> &map : std::as_const(m_treatmentIntervalMap))
{
INFO_LOG(m_logger) << "not entered RS: " << map[PIE_notEnteredRecueArea].size();
INFO_LOG() << "not entered RS: " << map[PIE_notEnteredRecueArea].size();
pie.results[PIE_platin] += map[PIE_platin].size();
pie.results[PIE_goldenHour] += map[PIE_goldenHour].size();
pie.results[PIE_notEnteredRecueArea] += map[PIE_notEnteredRecueArea].size();
@@ -683,28 +682,28 @@ void TreatmentModel::fillReportData()
for (auto it = m_bars.begin(); it != m_bars.end(); ++it)
{
resultDataPieEvaluation data = it.value();
DEBUG_LOG(m_logger) << it.key() << ", GroupId = " << data.groupId << ", results = {" << data.results[0] << "," << data.results[1] << "," << data.results[2] << "}";
DEBUG_LOG() << it.key() << ", GroupId = " << data.groupId << ", results = {" << data.results[0] << "," << data.results[1] << "," << data.results[2] << "}";
}
INFO_LOG(m_logger) << "Pie Results: ";
INFO_LOG(m_logger) << "Inbetween 10 min: " << pie.results[PIE_platin];
INFO_LOG(m_logger) << "Golden Hour: " << pie.results[PIE_goldenHour];
INFO_LOG(m_logger) << "KIA: " << pie.results[PIE_KIA];
INFO_LOG(m_logger) << "Enter RS: " << pie.results[PIE_enterRescueArea];
INFO_LOG(m_logger) << "Not Enter RS: " << pie.results[PIE_notEnteredRecueArea];
INFO_LOG(m_logger) << "Total: " << pie.results[PIE_total];
INFO_LOG() << "Pie Results: ";
INFO_LOG() << "Inbetween 10 min: " << pie.results[PIE_platin];
INFO_LOG() << "Golden Hour: " << pie.results[PIE_goldenHour];
INFO_LOG() << "KIA: " << pie.results[PIE_KIA];
INFO_LOG() << "Enter RS: " << pie.results[PIE_enterRescueArea];
INFO_LOG() << "Not Enter RS: " << pie.results[PIE_notEnteredRecueArea];
INFO_LOG() << "Total: " << pie.results[PIE_total];
for (auto it = m_vulnerabilityMap.begin(); it != m_vulnerabilityMap.end(); ++it)
{
INFO_LOG(m_logger) << "UnitId: " << it.key();
INFO_LOG() << "UnitId: " << it.key();
for (auto it2 = it.value().begin(); it2 != it.value().end(); ++it2)
INFO_LOG(m_logger) << "VulnerabilityState: " << it2.key() << ", Count: " << it2.value().size();
INFO_LOG() << "VulnerabilityState: " << it2.key() << ", Count: " << it2.value().size();
}
for (auto it = m_rescueStationTreated.begin(); it != m_rescueStationTreated.end(); ++it)
INFO_LOG(m_logger) << "troupId: " << it.key() << ", amount RescueStation - treated: " << it.value().size();
INFO_LOG() << "troupId: " << it.key() << ", amount RescueStation - treated: " << it.value().size();
for (auto it = m_rescueStationNotTreated.begin(); it != m_rescueStationNotTreated.end(); ++it)
INFO_LOG(m_logger) << "troupId: " << it.key() << ", amount RescueStation - not treated: " << it.value().size();
INFO_LOG() << "troupId: " << it.key() << ", amount RescueStation - not treated: " << it.value().size();
m_dataPie.append(std::move(pie));
@@ -717,7 +716,7 @@ void TreatmentModel::fillParticipantMap()
for (const Superior &sup : m_report.superiorIds())
m_partSuperiorMap.insert(sup.participantId(), sup.superiorId());
DEBUG_LOG(m_logger) << "size m_partSuperiorMap: " << m_partSuperiorMap.size();
DEBUG_LOG() << "size m_partSuperiorMap: " << m_partSuperiorMap.size();
QMapIterator<int,int> it(m_partSuperiorMap);
QList<int> unitIdsNull;
@@ -728,7 +727,7 @@ void TreatmentModel::fillParticipantMap()
if (it.value() == 0)
{
unitIdsNull.append(it.key());
DEBUG_LOG(m_logger) << "unitId: " << it.key();
DEBUG_LOG() << "unitId: " << it.key();
}
}
@@ -741,10 +740,10 @@ void TreatmentModel::fillParticipantMap()
m_participantMap.insert(it.key(), QSet<int>());
}
DEBUG_LOG(m_logger) << "size m_participantMap: " << m_participantMap.size();
DEBUG_LOG() << "size m_participantMap: " << m_participantMap.size();
const auto &ids = m_participantMap.keys();
for (int id : ids)
DEBUG_LOG(m_logger) << "TroupId: " << id;
DEBUG_LOG() << "TroupId: " << id;
it.toFront();
@@ -760,7 +759,7 @@ void TreatmentModel::fillParticipantMap()
while(it2.hasNext())
{
it2.next();
DEBUG_LOG(m_logger) << "TroupId: " << it2.key();
DEBUG_LOG() << "TroupId: " << it2.key();
QMap<int,QSet<int>> vulnMap;
QSet<int> partIds;
@@ -776,7 +775,7 @@ void TreatmentModel::fillParticipantMap()
m_rescueStationNotTreated.insert(it2.key(), partIds);
for (int participantId : it2.value())
DEBUG_LOG(m_logger) << " Participants: " << participantId;
DEBUG_LOG() << " Participants: " << participantId;
}
}
@@ -809,7 +808,7 @@ int TreatmentModel::getParticipantKey(int participantId)
while(it.hasNext())
{
it.next();
DEBUG_LOG(m_logger) << "it.key: " << it.key() << ", participantId: " << participantId;
DEBUG_LOG() << "it.key: " << it.key() << ", participantId: " << participantId;
if (it.value().contains(participantId) || it.key() == participantId)
{
key = it.key();
@@ -830,7 +829,7 @@ void TreatmentModel::countVulnerabilityState( int key, const resultData &data)
if ( key <= 0)
return;
DEBUG_LOG(m_logger) << "key: " << key << ", participantId: " << data.participantId;
DEBUG_LOG() << "key: " << key << ", participantId: " << data.participantId;
QMap<int,QSet<int>> vulMapTemp = m_vulnerabilityMap.value(key);
QMapIterator<int,QSet<int>> itVul(vulMapTemp);
@@ -22,7 +22,6 @@ TreatmentTimelineModel::TreatmentTimelineModel(const ReportInfo &report, LtsSess
: AbstractModel(report, session, parent)
, m_ppmDtc(nullptr)
, m_pdmDtc(nullptr)
, m_logger(getLogger("ReportTreatmentTimelineModel"))
{
if (!fetchInterfaces())
return;
@@ -138,12 +137,12 @@ bool TreatmentTimelineModel::fetchInterfaces()
{
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PPM DTC Interface";
ERROR_LOG() << "Could not fetch PPM DTC Interface";
return false;
}
if (!m_session->getDtc<ProjectDataManagement::DataInterface>(m_pdmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PDM DTC Interface";
ERROR_LOG() << "Could not fetch PDM DTC Interface";
return false;
}
return true;
@@ -312,7 +311,7 @@ QVariant TreatmentTimelineModel::headerData(int section, Qt::Orientation orienta
void TreatmentTimelineModel::fillReportData()
{
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
DEBUG_LOG() << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
{
@@ -330,11 +329,11 @@ void TreatmentTimelineModel::fillReportData()
resData.eventTypeId = static_cast<ReportManagement::EventType::type>(obj[QStringLiteral("event_type_id")].toInt());
resData.properties = obj[QStringLiteral("properties")].toString();
DEBUG_LOG(m_logger) << "Participant type id = " << resData.participantTypeId;
DEBUG_LOG(m_logger) << "Participant id = " << resData.participantId;
DEBUG_LOG(m_logger) << "Event type = " << resData.eventTypeId;
DEBUG_LOG(m_logger) << "Event time = " << resData.eventTime;
DEBUG_LOG(m_logger) << "Properties = " << resData.properties;
DEBUG_LOG() << "Participant type id = " << resData.participantTypeId;
DEBUG_LOG() << "Participant id = " << resData.participantId;
DEBUG_LOG() << "Event type = " << resData.eventTypeId;
DEBUG_LOG() << "Event time = " << resData.eventTime;
DEBUG_LOG() << "Properties = " << resData.properties;
m_data.append(std::move(resData));
}
@@ -343,7 +342,7 @@ void TreatmentTimelineModel::fillReportData()
QString TreatmentTimelineModel::getAreaName(const QString& properties) const
{
DEBUG_LOG(m_logger) << "getAreaName from " << properties;
DEBUG_LOG() << "getAreaName from " << properties;
QJsonDocument doc = QJsonDocument::fromJson(properties.toUtf8());
const QJsonObject obj = doc.object();
@@ -357,7 +356,7 @@ QString TreatmentTimelineModel::getAreaName(const QString& properties) const
QColor TreatmentTimelineModel::eventColor(ReportManagement::EventType eventTypeId) const
{
DEBUG_LOG(m_logger) << "eventColor for event type " << eventTypeId;
DEBUG_LOG() << "eventColor for event type " << eventTypeId;
switch (eventTypeId.underlying())
{
case ReportManagement::EventType::VBGChanged: return QColor(Qt::red);
@@ -377,7 +376,7 @@ QColor TreatmentTimelineModel::eventColor(ReportManagement::EventType eventTypeI
QString TreatmentTimelineModel::getSanProcs(const QString& properties) const
{
DEBUG_LOG(m_logger) << "getSanProcs from " << properties;
DEBUG_LOG() << "getSanProcs from " << properties;
QString sanProcs;
@@ -18,7 +18,6 @@ using namespace ReportManagement;
UnitPowerModel::UnitPowerModel(const ReportInfo &report, LtsSession::LtsSession *session, QObject *parent)
: AbstractModel(report, session, parent)
, m_ppmDtc(nullptr)
, m_logger(getLogger("UnitPowerModel"))
{
if (!fetchInterfaces())
return;
@@ -51,7 +50,7 @@ bool UnitPowerModel::fetchInterfaces()
{
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
ERROR_LOG(m_logger) << "Could not fetch PPM DTC Interface";
ERROR_LOG() << "Could not fetch PPM DTC Interface";
return false;
}
return true;
@@ -180,7 +179,7 @@ QVariant UnitPowerModel::headerData(int section, Qt::Orientation orientation, in
void UnitPowerModel::fillReportData()
{
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
DEBUG_LOG() << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
{
const QJsonObject obj = arrVal.toObject();
@@ -203,10 +202,10 @@ void UnitPowerModel::fillReportData()
resData.notReadyVbgs[9] = obj[QStringLiteral("vulnerability_state10")].toInt();
resData.notReadyVbgs[10] = obj[QStringLiteral("vulnerability_state11")].toInt();
INFO_LOG(m_logger) << "Group id = " << resData.groupId;
INFO_LOG(m_logger) << "Ready = " << resData.ready;
INFO_LOG(m_logger) << "Not ready = " << resData.notReady;
INFO_LOG(m_logger) << "Start time = " << resData.startTime;
INFO_LOG() << "Group id = " << resData.groupId;
INFO_LOG() << "Ready = " << resData.ready;
INFO_LOG() << "Not ready = " << resData.notReady;
INFO_LOG() << "Start time = " << resData.startTime;
m_data.append(std::move(resData));
}
@@ -25,7 +25,6 @@ ReportTopicEditor::ReportTopicEditor(
: TopicEditorBase::TopicEditor(parent)
, m_reportModel(new ReportModel(this))
, m_ui(new Ui::ReportTopicEditor)
, m_logger(getLogger("ReportTopicEditor"))
{
m_ui->setupUi(this);
@@ -67,7 +66,7 @@ ReportTopicEditor::~ReportTopicEditor()
void ReportTopicEditor::updateInternalData()
{
DEBUG_LOG(m_logger) << LOGFUNCTION;
DEBUG_LOG() << Q_FUNC_INFO;
if (m_topicData.x < 0 && m_topicData.y < 0 && m_topicData.h < 0 && m_topicData.w < 0)
{
@@ -82,7 +81,7 @@ void ReportTopicEditor::updateInternalData()
if (m_reportId > 0)
{
DEBUG_LOG(m_logger) << LOGFUNCTION << " report id = " << m_reportId;
DEBUG_LOG() << Q_FUNC_INFO << " report id = " << m_reportId;
QModelIndex idx = m_reportModel->findIndexForId(m_reportId);
const ReportManagement::ReportInfo report = m_reportModel->getRowData(idx.row());
@@ -92,7 +91,7 @@ void ReportTopicEditor::updateInternalData()
m_ui->reportsDataView->selectRow(idx);
m_ui->lblName->setText(QString::fromStdString(report.name()));
m_reportInfo = m_reportModel->getRowData(idx.row());
DEBUG_LOG(m_logger) << LOGFUNCTION << " selected report: " << m_reportInfo.name();
DEBUG_LOG() << Q_FUNC_INFO << " selected report: " << m_reportInfo.name();
}
else
{
@@ -51,7 +51,6 @@ private:
ReportModel *m_reportModel{nullptr};
Ui::ReportTopicEditor *m_ui{nullptr};
NGL::INGLLogger &m_logger;
};
}
@@ -51,7 +51,6 @@ ReportEdit::ReportEdit(LtsSession::LtsSession *session, QWidget *parent)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_ui(new Ui::ReportEdit)
, m_ftcTimer(new QTimer(this))
, m_logger(getLogger("ReportEditDialog"))
{
m_ui->setupUi(this);
@@ -284,8 +283,8 @@ bool ReportEdit::init(const ReportInfo &currReport, LtsSession::LtsSession *sess
m_minDateTime -= m_minDateTime % 1000;
m_maxDateTime -= m_maxDateTime % 1000;
DEBUG_LOG(m_logger) << "m_minDateTime = " << m_minDateTime;
DEBUG_LOG(m_logger) << "m_maxDateTime = " << m_maxDateTime;
DEBUG_LOG() << "m_minDateTime = " << m_minDateTime;
DEBUG_LOG() << "m_maxDateTime = " << m_maxDateTime;
m_ui->dteStart->setRetrieveCurrentTimeCallback([this]() { return m_session->partitionTime(); });
m_ui->dteEnd->setRetrieveCurrentTimeCallback([this]() { return m_session->partitionTime(); });
@@ -1079,7 +1078,7 @@ bool ReportEdit::initInputs()
});
}
DEBUG_LOG(m_logger) << "m_report effectSources size: " << m_report.effectSources().size();
DEBUG_LOG() << "m_report effectSources size: " << m_report.effectSources().size();
if (!m_report.effectSources().empty())
{
QStringList toolTip;
@@ -1089,7 +1088,7 @@ bool ReportEdit::initInputs()
auto it = std::find(m_report.effectSources().begin(), m_report.effectSources().end(), effectSourceId.underlying());
if (it != m_report.effectSources().end())
{
DEBUG_LOG(m_logger) << "To be checked: effectSourceId: " << effectSourceId;
DEBUG_LOG() << "To be checked: effectSourceId: " << effectSourceId;
action->setChecked(true);
toolTip.append(ProjectDataManagement::toString(effectSourceId));
}
@@ -1114,7 +1113,7 @@ void ReportEdit::fillCbInterval()
else
{
int mins = m_report.intervalTime() / (1000 * 60);
DEBUG_LOG(m_logger) << "Report interval mins " << mins;
DEBUG_LOG() << "Report interval mins " << mins;
m_ui->cbInterval->setCurrentIndex(m_ui->cbInterval->findData(mins));
if (m_report.visualisationType() == VisualisationType::Pie || m_report.visualisationType() == VisualisationType::Table)
m_ui->cbInterval->setCurrentIndex(0);
@@ -1129,7 +1128,7 @@ void ReportEdit::getParticipantSuperiorAndUnitIds(std::vector<int> &participantI
if (!m_ui->treeViewParticipants->selectionModel())
return;
DEBUG_LOG(m_logger) << "getParticipantAndUnitIds";
DEBUG_LOG() << "getParticipantAndUnitIds";
const QModelIndexList &selIndexs = m_ui->treeViewParticipants->selectionModel()->selectedRows();
@@ -1180,7 +1179,7 @@ void ReportEdit::recursiveGetParticipant(int participantId, std::vector<int> &pa
const int superiorId = part.superiorModId();
ERROR_LOG(m_logger) << "participantId: " << participantId << ", superiorId: " << superiorId;
ERROR_LOG() << "participantId: " << participantId << ", superiorId: " << superiorId;
Superior sup;
sup.participantId(participantId);
sup.superiorId(superiorId);
@@ -1422,47 +1421,47 @@ bool ReportEdit::fetchInterfaces()
{
if (!m_session->getDtc<ReportManagement::DataInterface>(m_dtc))
{
ERROR_LOG(m_logger) << "Cannot retrieve ReportManagament Dtc interface!";
ERROR_LOG() << "Cannot retrieve ReportManagament Dtc interface!";
return false;
}
if (!m_session->getFtc<ReportManagement::DataInterface>(m_ftc))
{
ERROR_LOG(m_logger) << "Cannot retrieve ReportManagament Ftc interface!";
ERROR_LOG() << "Cannot retrieve ReportManagament Ftc interface!";
return false;
}
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
ERROR_LOG(m_logger) << "Cannot retrieve ParticipantManagament Dtc interface!";
ERROR_LOG() << "Cannot retrieve ParticipantManagament Dtc interface!";
return false;
}
if (!m_session->getFtc<ParticipantManagement::DataInterface>(m_ppmFtc))
{
ERROR_LOG(m_logger) << "Cannot retrieve ParticipantManagament Ftc interface!";
ERROR_LOG() << "Cannot retrieve ParticipantManagament Ftc interface!";
return false;
}
if (!m_session->getDtc<AreaEffectSimulation::DataInterface>(m_aesDtc))
{
ERROR_LOG(m_logger) << "Cannot retrieve AreaEffectSimulation Dtc interface!";
ERROR_LOG() << "Cannot retrieve AreaEffectSimulation Dtc interface!";
return false;
}
if (!m_session->getDtc<ProjectDataManagement::DataInterface>(m_pdmDtc))
{
ERROR_LOG(m_logger) << "Cannot retrieve ProjectDataManagement Dtc interface!";
ERROR_LOG() << "Cannot retrieve ProjectDataManagement Dtc interface!";
return false;
}
if (!m_session->getForeignGuiInterface<ParticipantManagement::ForeignGuiComboboxInterface>(m_ppmGuiCbxIfc))
{
ERROR_LOG(m_logger) << "Cannot retrieve ParticipantManagement ForeignGuiCombobox interface!";
ERROR_LOG() << "Cannot retrieve ParticipantManagement ForeignGuiCombobox interface!";
return false;
}
if (!m_session->getDtc<InfrastructureManagement::DataInterface>(m_ismDtc))
{
ERROR_LOG(m_logger) << "Cannot retrieve InfrastructureManagement Dtc interface!";
ERROR_LOG() << "Cannot retrieve InfrastructureManagement Dtc interface!";
return false;
}
if (!m_session->getDtc<ExerciseManagement::DataInterface>(m_exmDtc))
{
ERROR_LOG(m_logger) << "Cannot retrieve ExerciseManagement Dtc interface!";
ERROR_LOG() << "Cannot retrieve ExerciseManagement Dtc interface!";
return false;
}
m_session->getForeignGuiInterface<SituationMap::ForeignGuiInterface>(m_sitMapGuiIfc);
@@ -1512,7 +1511,7 @@ bool ReportEdit::apply()
break;
}
}
WARNING_LOG(m_logger) << "Too many samples to be generated, max = " << MAX_SAMPLES_KDAB;
WARNING_LOG() << "Too many samples to be generated, max = " << MAX_SAMPLES_KDAB;
LtsWidgets::LtsMessageDialog::showMessage(this,
tr("Please limit time period and save again the report. Interval was changed to minimum value %1.")
.arg(m_ui->cbInterval->currentText().toInt()));
@@ -1604,7 +1603,7 @@ void ReportEdit::onCheck()
if ((m_ui->pbEffectSource->isVisible() && m_activeEffectSources.size() == 0))
enabled = false;
}
DEBUG_LOG(m_logger) << "onCheck() : " << enabled;
DEBUG_LOG() << "onCheck() : " << enabled;
m_buttonBox->getButton(LtsWidgets::DialogButton::Ok)->setEnabled(enabled);
if (enabled)
@@ -1692,13 +1691,13 @@ void ReportEdit::onCreateModifyReportReply(const CreateModifyReportReply &replyO
switch (replyObject.replyState().underlying())
{
case Core::FtReplyState::InProgress:
DEBUG_LOG(m_logger) << "onCreateModifyReportReply InProgress";
DEBUG_LOG() << "onCreateModifyReportReply InProgress";
m_ftcTimer->start();
break;
case Core::FtReplyState::Completed:
{
m_ftcTimer->stop();
DEBUG_LOG(m_logger) << "onCreateModifyReportReply Completed";
DEBUG_LOG() << "onCreateModifyReportReply Completed";
m_requestHelper->requestReply(replyObject);
if (!m_requestHelper->failed())
{
@@ -1716,12 +1715,12 @@ void ReportEdit::onCreateModifyReportReply(const CreateModifyReportReply &replyO
}
case Core::FtReplyState::NotStarted:
{
DEBUG_LOG(m_logger) << "onCreateModifyReportReply NotStarted";
DEBUG_LOG() << "onCreateModifyReportReply NotStarted";
break;
}
case Core::FtReplyState::Error:
{
DEBUG_LOG(m_logger) << "onCreateModifyReportReply Error";
DEBUG_LOG() << "onCreateModifyReportReply Error";
m_ftcTimer->stop();
m_requestHelper->requestReply(replyObject);
break;
@@ -1732,7 +1731,7 @@ void ReportEdit::onCreateModifyReportReply(const CreateModifyReportReply &replyO
void ReportEdit::onFtcTimerTimeout()
{
ERROR_LOG(m_logger) << "onFtcTimerTimeout";
ERROR_LOG() << "onFtcTimerTimeout";
m_requestHelper->failure();
m_ftcTimer->stop();
}
@@ -1740,13 +1739,13 @@ void ReportEdit::onFtcTimerTimeout()
void ReportEdit::onPreviewReport()
{
DEBUG_LOG(m_logger) << "onPreviewReport";
DEBUG_LOG() << "onPreviewReport";
ReportPreview *dialog = new ReportPreview(m_session, this);
if (dialog->init(m_report))
dialog->previewReport();
else
ERROR_LOG(m_logger) << "Can not preview report!";
ERROR_LOG() << "Can not preview report!";
}
@@ -1869,11 +1868,11 @@ void ReportEdit::onSelectInterval()
if (res != QDialog::Accepted)
{
delete dialog;
DEBUG_LOG(m_logger) << "Select dialog closed by user";
DEBUG_LOG() << "Select dialog closed by user";
return;
}
DEBUG_LOG(m_logger) << "Set new values for start time = " << dialog->getStartTime();
DEBUG_LOG() << "Set new values for start time = " << dialog->getStartTime();
m_ui->dteStart->setMsecsSinceEpoch(dialog->getStartTime());
m_ui->dteEnd->setMsecsSinceEpoch(dialog->getEndTime());
@@ -154,8 +154,6 @@ class ReportEdit
qint64 m_maxDateTime{0};
QTimer *m_ftcTimer{nullptr};
LOGGER_T m_logger;
};
}
@@ -16,7 +16,6 @@ ReportIntervalDialog::ReportIntervalDialog(QWidget *parent)
, m_ui(new Ui::ReportIntervalDialog)
, m_session(nullptr)
, m_phaseModel(nullptr)
, m_logger(getLogger("ReportIntervalDialog"))
{
m_ui->setupUi(this);
@@ -35,7 +34,7 @@ bool ReportIntervalDialog::init(LtsSession::LtsSessionDataDds *session, const st
m_session = session;
m_exmDtc = exmDtc;
DEBUG_LOG(m_logger) << "Exercise id = " << m_session->exerciseId();
DEBUG_LOG() << "Exercise id = " << m_session->exerciseId();
m_phaseModel = new ReportIntervalModel(this);
m_phaseModel->initModel(m_session->exerciseId(), m_exmDtc);
@@ -64,8 +63,8 @@ void ReportIntervalDialog::selectPhase()
m_startTime = phase.beginTime();
m_endTime = phase.endTime();
ERROR_LOG(m_logger) << "Start time: " << m_startTime;
ERROR_LOG(m_logger) << "End time: " << m_endTime;
ERROR_LOG() << "Start time: " << m_startTime;
ERROR_LOG() << "End time: " << m_endTime;
accept();
close();
@@ -17,7 +17,6 @@ ReportIntervalModel::ReportIntervalModel(QObject *parent)
tr("Exercise-Id")},
parent)
, m_exmDtc(nullptr)
, m_logger(getLogger("ReportIntervalModel"))
{}
@@ -31,7 +30,7 @@ bool ReportIntervalModel::initModel(int exerciseId, const std::shared_ptr<Exerci
m_exmDtc->exercisePhases([this](const ExerciseManagement::ExercisePhase &item) { insertRow(item); });
INFO_LOG(m_logger) << "initModel - #exercise phases: " << m_vecData.size();
INFO_LOG() << "initModel - #exercise phases: " << m_vecData.size();
return true;
}
@@ -43,9 +43,6 @@ private:
int m_exerciseId{0};
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_exmDtc;
LOGGER_T m_logger;
friend class ReportIntervalProxyModel;
};
@@ -25,7 +25,6 @@ ReportList::ReportList(const QString &menuGroup, LtsSession::LtsSession *session
, m_session(session)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_ui(new Ui::ReportList)
, m_logger(getLogger("ReportManagementDialog"))
{
m_ui->setupUi(this);
m_ui->widget->setSelectionMode(QAbstractItemView::SingleSelection);
@@ -144,14 +143,14 @@ void ReportList::onSelectionChanged()
void ReportList::onEditReport()
{
DEBUG_LOG(m_logger) << "onEditReport";
DEBUG_LOG() << "onEditReport";
QModelIndex selIndex = m_ui->widget->currentIndex();
if (!selIndex.isValid())
return;
ReportManagement::ReportInfo data = m_model->getRowData(m_ui->widget->currentIndex().row());
DEBUG_LOG(m_logger) << "onEditReport Id = " << data.id();
DEBUG_LOG() << "onEditReport Id = " << data.id();
ReportEdit *dialog = new ReportEdit(m_session, this);
if (!dialog->init(data, m_session))
@@ -166,14 +165,14 @@ void ReportList::onEditReport()
void ReportList::onShowReport()
{
DEBUG_LOG(m_logger) << "onShowReport";
DEBUG_LOG() << "onShowReport";
QModelIndex selIndex = m_ui->widget->currentIndex();
if (!selIndex.isValid())
return;
ReportManagement::ReportInfo data = m_model->getRowData(m_ui->widget->currentIndex().row());
DEBUG_LOG(m_logger) << "onShowReport Id = " << data.id();
DEBUG_LOG() << "onShowReport Id = " << data.id();
ReportPreview *dialog = new ReportPreview(m_session, this);
if (dialog->init(data))
@@ -187,10 +186,10 @@ void ReportList::onRemoveReport()
if (!selIndex.isValid())
return;
DEBUG_LOG(m_logger) << "onRemoveReport";
DEBUG_LOG() << "onRemoveReport";
ReportManagement::ReportInfo data = m_model->getRowData(m_ui->widget->currentIndex().row());
INFO_LOG(m_logger) << "Removing report with id = " << data.id();
INFO_LOG() << "Removing report with id = " << data.id();
Core::RemoveElementRequest req(data.id());
m_requestHelper->startSingleRequest([req, this]()
{
@@ -198,20 +197,20 @@ void ReportList::onRemoveReport()
});
if (m_requestHelper->failed())
ERROR_LOG(m_logger) << "Failed to remove report";
ERROR_LOG() << "Failed to remove report";
}
void ReportList::slotDelete()
{
DEBUG_LOG(m_logger) << "ReportList::slotDelete";
DEBUG_LOG() << "ReportList::slotDelete";
changeStatus(FileStatus::Deleted);
}
void ReportList::slotRestore()
{
DEBUG_LOG(m_logger) << "ReportList::slotRestore";
DEBUG_LOG() << "ReportList::slotRestore";
changeStatus(FileStatus::Valid);
}
@@ -225,39 +224,39 @@ void ReportList::onPrint()
void ReportList::onPreviewReport()
{
DEBUG_LOG(m_logger) << "onPreviewReport";
DEBUG_LOG() << "onPreviewReport";
QModelIndex selIndex = m_ui->widget->currentIndex();
if (!selIndex.isValid())
return;
ReportManagement::ReportInfo data = m_model->getRowData(m_ui->widget->currentIndex().row());
DEBUG_LOG(m_logger) << "onPreviewReport Id = " << data.id();
DEBUG_LOG() << "onPreviewReport Id = " << data.id();
ReportPreview *dialog = new ReportPreview(m_session, this);
if (dialog->init(data))
dialog->previewReport();
else
ERROR_LOG(m_logger) << "Can not preview report with id = " << data.id();
ERROR_LOG() << "Can not preview report with id = " << data.id();
}
void ReportList::onExportReport()
{
DEBUG_LOG(m_logger) << "onExportReport";
DEBUG_LOG() << "onExportReport";
QModelIndex selIndex = m_ui->widget->currentIndex();
if (!selIndex.isValid())
return;
ReportManagement::ReportInfo data = m_model->getRowData(m_ui->widget->currentIndex().row());
DEBUG_LOG(m_logger) << "onExportReport Id = " << data.id();
DEBUG_LOG() << "onExportReport Id = " << data.id();
ReportPreview *dialog = new ReportPreview(m_session, this);
if (dialog->init(data))
dialog->onExport();
else
ERROR_LOG(m_logger) << "Can not export report with id = " << data.id();
ERROR_LOG() << "Can not export report with id = " << data.id();
}
@@ -275,7 +274,7 @@ void ReportList::changeStatus(const FileStatus &fs)
m_requestHelper->startSingleRequest([ = ]()
{
DEBUG_LOG(m_logger) << "Changing status for report id = " << rep.id();
DEBUG_LOG() << "Changing status for report id = " << rep.id();
ReportChangeStatusRequest req;
req.id(rep.id());
@@ -288,7 +287,7 @@ void ReportList::changeStatus(const FileStatus &fs)
});
if (m_requestHelper->failed())
ERROR_LOG(m_logger) << "Failed to change status for report with id = " << rep.id();
ERROR_LOG() << "Failed to change status for report with id = " << rep.id();
}
@@ -303,37 +302,37 @@ bool ReportList::fetchInterfaces()
{
if (!m_session->getDtc<ReportManagement::DataInterface>(m_dtc))
{
ERROR_LOG(m_logger) << "Cannot retrieve ReportManagament Dtc interface!";
ERROR_LOG() << "Cannot retrieve ReportManagament Dtc interface!";
return false;
}
if (!m_session->getFtc<ReportManagement::DataInterface>(m_ftc))
{
ERROR_LOG(m_logger) << "Cannot retrieve ReportManagament Ftc interface!";
ERROR_LOG() << "Cannot retrieve ReportManagament Ftc interface!";
return false;
}
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
ERROR_LOG(m_logger) << "Cannot retrieve ParticipantManagament Dtc interface!";
ERROR_LOG() << "Cannot retrieve ParticipantManagament Dtc interface!";
return false;
}
if (!m_session->getDtc<AreaEffectSimulation::DataInterface>(m_aesDtc))
{
ERROR_LOG(m_logger) << "Cannot retrieve AreaEffectSimulation Dtc interface!";
ERROR_LOG() << "Cannot retrieve AreaEffectSimulation Dtc interface!";
return false;
}
if (!m_session->getDtc<ProjectDataManagement::DataInterface>(m_pdmDtc))
{
ERROR_LOG(m_logger) << "Cannot retrieve ProjectDataManagement Dtc interface!";
ERROR_LOG() << "Cannot retrieve ProjectDataManagement Dtc interface!";
return false;
}
if (!m_session->getForeignGuiInterface<ParticipantManagement::ForeignGuiComboboxInterface>(m_ppmGuiCbxIfc))
{
ERROR_LOG(m_logger) << "Cannot retrieve ParticipantManagement ForeignGuiCombobox interface!";
ERROR_LOG() << "Cannot retrieve ParticipantManagement ForeignGuiCombobox interface!";
return false;
}
if (!m_session->getDtc<OperatorManagement::DataInterface>(m_opmDtc))
{
ERROR_LOG(m_logger) << "Cannot retrieve OperatorManagement Dtc interface!";
ERROR_LOG() << "Cannot retrieve OperatorManagement Dtc interface!";
return false;
}
return true;
@@ -73,9 +73,6 @@ private:
LtsSession::LtsSession *m_session;
LtsUtils::RequestHelper *m_requestHelper;
Ui::ReportList *m_ui;
LOGGER_T m_logger;
};
}
@@ -49,7 +49,6 @@ ReportModel::ReportModel(QObject *parent)
#endif
},
parent)
, m_logger(getLogger("ReportModel"))
{}
bool ReportModel::initModel(const std::shared_ptr<ReportManagement::Interface::Dtc> &dtc,
@@ -66,8 +66,6 @@ private:
std::shared_ptr<OperatorManagement::Interface::Dtc> m_opmDtc;
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
std::shared_ptr<ParticipantManagement::ForeignGuiComboboxInterface> m_ppmGuiCbxIfc;
LOGGER_T m_logger;
friend class ReportProxyModel;
};
@@ -70,7 +70,6 @@ ReportPreview::ReportPreview(LtsSession::LtsSession *session, QWidget *parent)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_ui(new Ui::ReportPreview)
, m_settings(new NGL::Settings(NGL::findProjectConfigFile()))
, m_logger(getLogger("ReportPreview"))
{
m_ui->setupUi(this);
@@ -117,7 +116,7 @@ bool ReportPreview::init(const ReportManagement::ReportInfo &report)
(m_useAes && m_report.mineAreaIds().size() == 0 && m_report.nbcIds().size() == 0) ||
(m_useCharge && m_report.chargeTypeIds().size() == 0))
{
ERROR_LOG(m_logger) << "Empty selection for report: m_report.id() = " << m_report.id();
ERROR_LOG() << "Empty selection for report: m_report.id() = " << m_report.id();
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Not possible to preview this report! No elements selected!"));
return false;
}
@@ -127,8 +126,8 @@ bool ReportPreview::init(const ReportManagement::ReportInfo &report)
m_dataModel = AbstractModel::create(m_report, m_session, this);
DEBUG_LOG(m_logger) << "m_dataModel.rowCount() = " << m_dataModel->rowCount(QModelIndex());
DEBUG_LOG(m_logger) << "m_dataModel.columnCount() = " << m_dataModel->columnCount();
DEBUG_LOG() << "m_dataModel.rowCount() = " << m_dataModel->rowCount(QModelIndex());
DEBUG_LOG() << "m_dataModel.columnCount() = " << m_dataModel->columnCount();
m_headerDataModel = new QStandardItemModel(this);
@@ -180,7 +179,7 @@ bool ReportPreview::displayReport()
displayReportAsTable();
break;
default:
ERROR_LOG(m_logger) << "Unknown visualisation type for report id = " << m_report.id()
ERROR_LOG() << "Unknown visualisation type for report id = " << m_report.id()
<< ": " << m_report.visualisationType().underlying();
return false;
}
@@ -204,17 +203,17 @@ void ReportPreview::onExport()
fileName += reportName;
fileName += QStringLiteral(".jpg");
DEBUG_LOG(m_logger) << "Trying to export Report to " << fileName;
DEBUG_LOG() << "Trying to export Report to " << fileName;
bool ret = m_reportDisplay->exportToImage(QSize(1200, 1600), fileName, "jpg");
INFO_LOG(m_logger) << "Exported to " << fileName << " - " << ret;
INFO_LOG() << "Exported to " << fileName << " - " << ret;
if (ret)
{
QFile file(fileName);
if (!file.open(QIODevice::ReadOnly))
{
ERROR_LOG(m_logger) << "Cannot read file " << fileName;
ERROR_LOG() << "Cannot read file " << fileName;
return;
}
@@ -223,8 +222,8 @@ void ReportPreview::onExport()
int exeFolderId = m_flmDtc->getExerciseFolderId(m_session->exerciseId());
int folderId = m_flmDtc->findFolder(exeFolderId,QStringLiteral("Reports"));
DEBUG_LOG(m_logger) << "ExeFolderId = " << exeFolderId;
DEBUG_LOG(m_logger) << "FolderId = " << folderId;
DEBUG_LOG() << "ExeFolderId = " << exeFolderId;
DEBUG_LOG() << "FolderId = " << folderId;
FileManagement::FileContentModifyRequest req;
req.id(0);
@@ -248,19 +247,19 @@ void ReportPreview::onExport()
if (m_requestHelper->failed())
{
ERROR_LOG(m_logger) << "Failed to save file content";
ERROR_LOG() << "Failed to save file content";
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Failed to save report image into library."));
}
else
{
INFO_LOG(m_logger) << "Successfully exported to FLM (folderId, fileId, fileName) = (" << folderId << ", " << m_requestHelper->getRepliedId() << ", " << reportName;
INFO_LOG() << "Successfully exported to FLM (folderId, fileId, fileName) = (" << folderId << ", " << m_requestHelper->getRepliedId() << ", " << reportName;
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Successfully saved report image into library."));
}
}
}
else
WARNING_LOG(m_logger) << "Failed to create report content";
WARNING_LOG() << "Failed to create report content";
}
@@ -268,49 +267,49 @@ bool ReportPreview::fetchInterfaces()
{
if (!m_session->getFtc<ReportManagement::DataInterface>(m_ftc))
{
DEBUG_LOG(m_logger) << "Failed to fetch Report Management FTC interface";
DEBUG_LOG() << "Failed to fetch Report Management FTC interface";
return false;
}
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
DEBUG_LOG(m_logger) << "Failed to fetch Participant Management DTC interface";
DEBUG_LOG() << "Failed to fetch Participant Management DTC interface";
return false;
}
if (!m_session->getDtc<ExerciseManagement::DataInterface>(m_exmDtc))
{
DEBUG_LOG(m_logger) << "Failed to fetch Exercise Management DTC interface";
DEBUG_LOG() << "Failed to fetch Exercise Management DTC interface";
return false;
}
if (!m_session->getDtc<ProjectDataManagement::DataInterface>(m_pdmDtc))
{
DEBUG_LOG(m_logger) << "Failed to fetch ProjectDataManagement DTC interface";
DEBUG_LOG() << "Failed to fetch ProjectDataManagement DTC interface";
return false;
}
if (!m_session->getDtc<AreaEffectSimulation::DataInterface>(m_aesDtc))
{
DEBUG_LOG(m_logger) << "Failed to fetch AreaEffectSimulation DTC interface";
DEBUG_LOG() << "Failed to fetch AreaEffectSimulation DTC interface";
return false;
}
if (!m_session->getDtc<InfrastructureManagement::DataInterface>(m_ismDtc))
{
DEBUG_LOG(m_logger) << "Failed to fetch InfrastructureManagement DTC interface";
DEBUG_LOG() << "Failed to fetch InfrastructureManagement DTC interface";
return false;
}
if (!m_session->getFtc<FileManagement::DataInterface>(m_flmFtc))
{
DEBUG_LOG(m_logger) << "Failed to fetch FileManagement FTC interface";
DEBUG_LOG() << "Failed to fetch FileManagement FTC interface";
return false;
}
if (!m_session->getDtc<FileManagement::DataInterface>(m_flmDtc))
{
DEBUG_LOG(m_logger) << "Failed to fetch FileManagement DTC interface";
DEBUG_LOG() << "Failed to fetch FileManagement DTC interface";
return false;
}
@@ -509,7 +508,7 @@ bool ReportPreview::displayReportAsTable()
{
int groupId = m_dataModel->data(m_dataModel->index(i, 0), Qt::EditRole).toInt();
QString title = m_dataModel->data(m_dataModel->index(i, 0), Qt::UserRole).toString();
DEBUG_LOG(m_logger) << "Group Id = " << groupId << ", title = " << title;
DEBUG_LOG() << "Group Id = " << groupId << ", title = " << title;
if (!m_groupIds.contains(groupId))
{
@@ -564,7 +563,7 @@ bool ReportPreview::displayReportAsPie()
for (int i = 0; i < m_dataModel->rowCount(QModelIndex()); ++i)
{
int groupId = m_dataModel->data(m_dataModel->index(i, 0), Qt::EditRole).toInt();
DEBUG_LOG(m_logger) << "Group Id = " << groupId;
DEBUG_LOG() << "Group Id = " << groupId;
if (!m_groupIds.contains(groupId))
{
@@ -594,14 +593,14 @@ bool ReportPreview::displayReportAsLine()
for (int i = 0; i < m_dataModel->rowCount(QModelIndex()); ++i)
{
int groupId = m_dataModel->data(m_dataModel->index(i, 0), Qt::EditRole).toInt();
DEBUG_LOG(m_logger) << "displayReportAsLine: Group Id = " << groupId;
DEBUG_LOG() << "displayReportAsLine: Group Id = " << groupId;
if (!m_groupIds.contains(groupId))
{
m_groupIds.append(groupId);
QString title = m_dataModel->data(m_dataModel->index(i, 0), Qt::UserRole).toString();
DEBUG_LOG(m_logger) << "displayReportAsLine: Group title = " << title;
DEBUG_LOG() << "displayReportAsLine: Group title = " << title;
AbstractProxyModel *proxyModel = new AbstractProxyModel(this);
proxyModel->setSourceModel(m_dataModel);
@@ -630,7 +629,7 @@ bool ReportPreview::displayReportAsBar()
for (int i = 0; i < m_dataModel->rowCount(QModelIndex()); ++i)
{
int groupId = m_dataModel->data(m_dataModel->index(i, 0), Qt::EditRole).toInt();
DEBUG_LOG(m_logger) << "Group Id = " << groupId;
DEBUG_LOG() << "Group Id = " << groupId;
if (!m_groupIds.contains(groupId))
{
@@ -674,7 +673,7 @@ void ReportPreview::addToHeaderData(const QString &strLeft, const QString &strRi
item = new QStandardItem(strRight);
itemList += item;
DEBUG_LOG(m_logger) << "Added to header: " << strRight;
DEBUG_LOG() << "Added to header: " << strRight;
m_headerDataModel->appendRow(itemList);
}
@@ -984,7 +983,7 @@ KDChart::Chart *ReportPreview::createNewChart(const ChartType &chartType, bool h
if (!diagram)
{
ERROR_LOG(m_logger) << "Got unkown chart type. Aborting.";
ERROR_LOG() << "Got unkown chart type. Aborting.";
return result;
}
@@ -1125,8 +1124,8 @@ KDChart::Chart *ReportPreview::createNewChart(const ChartType &chartType, bool h
int eventTypeId = diagram->model()->data(diagram->model()->index(iRow, 0), Qt::UserRole + 1).toInt();
QColor eventColor = m_eventsModel->eventColor(static_cast<ReportManagement::EventType::type>(eventTypeId));
DEBUG_LOG(m_logger) << "Row " << iRow << ", eventTypeId " << eventTypeId;
DEBUG_LOG(m_logger) << "Event color " << eventColor.name();
DEBUG_LOG() << "Row " << iRow << ", eventTypeId " << eventTypeId;
DEBUG_LOG() << "Event color " << eventColor.name();
for (int iColumn = 0; iColumn < colCount; ++iColumn )
{
QModelIndex mi = diagram->model()->index(iRow, iColumn);
@@ -1245,7 +1244,6 @@ bool ReportPreview::previewReport()
EventTypeModel::EventTypeModel(QObject *parent)
: LtsWidgets::LtsAbstractTableModel<ReportManagement::EventType>({}, parent)
, m_logger(getLogger("EventTypeModel"))
{
}
@@ -1283,7 +1281,7 @@ void EventTypeModel::initModel()
QColor EventTypeModel::eventColor(ReportManagement::EventType eventTypeId) const
{
DEBUG_LOG(m_logger) << "eventColor for event type " << eventTypeId;
DEBUG_LOG() << "eventColor for event type " << eventTypeId;
switch (eventTypeId.underlying())
{
case ReportManagement::EventType::VBGChanged: return QColor(Qt::red);
@@ -67,8 +67,6 @@ public:
int columnCount(const QModelIndex &parent) const override final;
private:
LOGGER_T m_logger;
};
class ReportPreview : public LtsWidgets::LtsFramelessDialog
@@ -142,8 +140,6 @@ private:
LtsUtils::RequestHelper *m_requestHelper;
Ui::ReportPreview *m_ui;
NGL::Settings *m_settings;
LOGGER_T m_logger;
};
}
@@ -47,12 +47,12 @@ bool InterfaceImpl::fetchInterfaces()
{
if (!m_session->getDtc<ReportManagement::DataInterface>(m_dtc))
{
DEBUG_LOG(m_logger) << "Failed to fetch ReportManagement DTC interface!";
DEBUG_LOG() << "Failed to fetch ReportManagement DTC interface!";
return false;
}
if (!m_session->getFtc<ReportManagement::DataInterface>(m_ftc))
{
DEBUG_LOG(m_logger) << "Failed to fetch ReportManagement FTC interface!";
DEBUG_LOG() << "Failed to fetch ReportManagement FTC interface!";
return false;
}
@@ -60,22 +60,22 @@ bool InterfaceImpl::fetchInterfaces()
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
DEBUG_LOG(m_logger) << "Failed to fetch ParticipantManagement DTC interface!";
DEBUG_LOG() << "Failed to fetch ParticipantManagement DTC interface!";
return false;
}
if (!m_session->getForeignGuiInterface<ParticipantManagement::ForeignGuiComboboxInterface>(m_ppmGuiCbxIfc))
{
DEBUG_LOG(m_logger) << "Failed to fetch ParticipantManagement ForeignGuiComboboxInterface!";
DEBUG_LOG() << "Failed to fetch ParticipantManagement ForeignGuiComboboxInterface!";
return false;
}
if (!m_session->getDtc<AreaEffectSimulation::DataInterface>(m_aesDtc))
{
DEBUG_LOG(m_logger) << "Failed to fetch AreaEffectSimulation DTC interface!";
DEBUG_LOG() << "Failed to fetch AreaEffectSimulation DTC interface!";
return false;
}
if (!m_session->getDtc<ProjectDataManagement::DataInterface>(m_pdmDtc))
{
DEBUG_LOG(m_logger) << "Failed to fetch ProjectDataManagement DTC interface!";
DEBUG_LOG() << "Failed to fetch ProjectDataManagement DTC interface!";
return false;
}
@@ -85,7 +85,7 @@ bool InterfaceImpl::fetchInterfaces()
if (!m_session->getDtc<OperatorManagement::DataInterface>(m_opmDtc))
{
DEBUG_LOG(m_logger) << "Failed to fetch OperatorManagement DTC interface!";
DEBUG_LOG() << "Failed to fetch OperatorManagement DTC interface!";
return false;
}
return true;
@@ -478,29 +478,29 @@ bool InterfaceImpl::TopicReplayInterface::playbackInit(const QJsonObject &attrib
if (reportId > 0)
ri = m_dtc->reportInfo(reportId);
DEBUG_LOG(m_logger) << "Report Id = " << ri.id();
DEBUG_LOG() << "Report Id = " << ri.id();
if (!m_previewDialog)
{
ERROR_LOG(m_logger) << "Widgets1 not available, playback not possible for report id = "<< ri.id();
ERROR_LOG() << "Widgets1 not available, playback not possible for report id = "<< ri.id();
return false;
}
if ( !m_previewReport)
{
ERROR_LOG(m_logger) << "Widgets2 not available, playback not possible for report id = "<< ri.id();
ERROR_LOG() << "Widgets2 not available, playback not possible for report id = "<< ri.id();
return false;
}
if (!m_previewWidget)
{
ERROR_LOG(m_logger) << "Widgets3 not available, playback not possible for report id = "<< ri.id();
ERROR_LOG() << "Widgets3 not available, playback not possible for report id = "<< ri.id();
return false;
}
if (!m_previewDialog->init(ri))
{
ERROR_LOG(m_logger) << "Preview dialog could not be initialized!";
ERROR_LOG() << "Preview dialog could not be initialized!";
return false;
}
m_previewDialog->getReportDisplay()->exportToFile(QStringLiteral("/tmp/rep.pdf"));
@@ -549,7 +549,7 @@ bool InterfaceImpl::TopicReplayInterface::exportTopic(const QJsonObject &attribu
const int reportId = attributes.value(QStringLiteral("ReportId")).toInt(0);
if (reportId < 1)
{
ERROR_LOG(m_logger) << "No valid report id given";
ERROR_LOG() << "No valid report id given";
pExportNotifier->setExportFailed();
return false;
}
@@ -563,14 +563,14 @@ bool InterfaceImpl::TopicReplayInterface::exportTopic(const QJsonObject &attribu
ReportManagement::ReportInfo ri = m_dtc->reportInfo(reportId);
if (ri.fileStatus() != ReportManagement::FileStatus::Valid)
{
ERROR_LOG(m_logger) << "Report with id " << reportId << " was deleted";
ERROR_LOG() << "Report with id " << reportId << " was deleted";
pExportNotifier->setExportFailed();
return false;
}
if (!m_previewDialog->init(ri))
{
ERROR_LOG(m_logger) << "Could not init preview for report id = " << reportId;
ERROR_LOG() << "Could not init preview for report id = " << reportId;
pExportNotifier->setExportFailed();
return false;
}
@@ -578,14 +578,14 @@ bool InterfaceImpl::TopicReplayInterface::exportTopic(const QJsonObject &attribu
KDReports::Report* rp = m_previewDialog->getReportDisplay();
if (rp == nullptr)
{
ERROR_LOG(m_logger) << "Could not retrieve KDReport for report id = " << reportId;
ERROR_LOG() << "Could not retrieve KDReport for report id = " << reportId;
pExportNotifier->setExportFailed();
return false;
}
rp->exportToFile(strPathToFile + strFileName);
pExportNotifier->setExportSuccessful(strFileName);
INFO_LOG(m_logger) << "Successfully exported topic for report with id " << reportId;
INFO_LOG() << "Successfully exported topic for report with id " << reportId;
rp->deleteLater();
return true;
@@ -100,8 +100,6 @@ private:
ReportManagement::ReportPreview *m_previewDialog;
LtsWidgets::LtsReportDisplayWidget *m_previewReport;
NGL::PDFWidget *m_previewWidget;
NGL::INGLLogger &m_logger;
};
TopicReplay::Interface *createInterface(TopicEditorBase::TopicType) override