Migrates residual Lts sources to generated rtiddsgen API
Adds NmeaManagement tests, fixes codegen includes and Qt6 SerialPort CMake target.
This commit is contained in:
1 parent
5485a90385
commit
881d44f4dd
512 files changed
+6887
-6426
No files matched your search
+18
-18
@@ -32,25 +32,25 @@ AirSupportModel::AirSupportModel(const ReportInfo &report, LtsSession::LtsSessio
|
||||
|
||||
resData.chargeTypeId = 371;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::CatastrophicKill;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill;
|
||||
resData.hits = {9, 4, 4, 0};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
resData.chargeTypeId = 371;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::MobilityKill;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_MobilityKill;
|
||||
resData.hits = {9, 4, 3, 1};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
resData.chargeTypeId = 371;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VisibleMobilityKill;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_VisibleMobilityKill;
|
||||
resData.hits = {2, 2, 2, 0};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
resData.chargeTypeId = 371;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::NotReady;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady;
|
||||
resData.hits = {20, 10, 9, 1};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
@@ -63,25 +63,25 @@ AirSupportModel::AirSupportModel(const ReportInfo &report, LtsSession::LtsSessio
|
||||
|
||||
resData.chargeTypeId = 372;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::CatastrophicKill;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill;
|
||||
resData.hits = {14, 4, 4, 0};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
resData.chargeTypeId = 372;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::MobilityKill;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_MobilityKill;
|
||||
resData.hits = {4, 4, 3, 1};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
resData.chargeTypeId = 372;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VisibleMobilityKill;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_VisibleMobilityKill;
|
||||
resData.hits = {2, 2, 2, 0};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
resData.chargeTypeId = 372;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::NotReady;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady;
|
||||
resData.hits = {20, 10, 9, 1};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
@@ -92,7 +92,7 @@ AirSupportModel::AirSupportModel(const ReportInfo &report, LtsSession::LtsSessio
|
||||
|
||||
resData.chargeTypeId = 0;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::NotReady;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady;
|
||||
resData.hits = {40, 20, 18, 2};
|
||||
m_dataTable.append(resData);
|
||||
#else
|
||||
@@ -174,7 +174,7 @@ QVariant AirSupportModel::data(const QModelIndex &index, int role) const
|
||||
boldFont.setBold(true);
|
||||
|
||||
|
||||
if (displayInfo.chargeTypeId == 0 || displayInfo.vulnerabilityState == ProjectDataManagement::VulnerabilityState::NotReady)
|
||||
if (displayInfo.chargeTypeId == 0 || displayInfo.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady)
|
||||
return boldFont;
|
||||
|
||||
return QFont();
|
||||
@@ -192,7 +192,7 @@ QVariant AirSupportModel::data(const QModelIndex &index, int role) const
|
||||
if (displayInfo.chargeTypeId > 0)
|
||||
{
|
||||
QString chargeTypeName = m_pdmDtc->trChargeTypeShortName(displayInfo.chargeTypeId);
|
||||
if (displayInfo.vulnerabilityState == ProjectDataManagement::VulnerabilityState::NotReady)
|
||||
if (displayInfo.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady)
|
||||
displayTypeName = tr("Total [%1]").arg(chargeTypeName);
|
||||
else
|
||||
displayTypeName = chargeTypeName;
|
||||
@@ -202,7 +202,7 @@ QVariant AirSupportModel::data(const QModelIndex &index, int role) const
|
||||
case START_TIME:
|
||||
{
|
||||
QString timeInterval = DTG::toStringMSec(displayInfo.startTime) + QStringLiteral(" - " ) + DTG::toStringMSec(displayInfo.endTime);
|
||||
return (displayInfo.vulnerabilityState != ProjectDataManagement::VulnerabilityState::NotReady ? timeInterval : QVariant());
|
||||
return (displayInfo.vulnerabilityState != ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady ? timeInterval : QVariant());
|
||||
}
|
||||
case IMPACTS:
|
||||
return (displayInfo.hits[4] > 0 ? displayInfo.hits[4] : QVariant());
|
||||
@@ -215,8 +215,8 @@ QVariant AirSupportModel::data(const QModelIndex &index, int role) const
|
||||
case HITS_FRIENDLY:
|
||||
return displayInfo.hits[3];
|
||||
case VULNERABILITY_STATE:
|
||||
return ((displayInfo.vulnerabilityState != ProjectDataManagement::VulnerabilityState::NotReady &&
|
||||
displayInfo.vulnerabilityState != ProjectDataManagement::VulnerabilityState::CombatReady) ?
|
||||
return ((displayInfo.vulnerabilityState != ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady &&
|
||||
displayInfo.vulnerabilityState != ProjectDataManagement::VulnerabilityState::VulnerabilityState_CombatReady) ?
|
||||
ProjectDataManagement::toString(displayInfo.vulnerabilityState): QVariant());
|
||||
default:
|
||||
return QVariant();
|
||||
@@ -344,7 +344,7 @@ void AirSupportModel::fillReportData()
|
||||
resData.startTime = obj[QStringLiteral("start_time")].toDouble();
|
||||
resData.endTime = obj[QStringLiteral("end_time")].toDouble();
|
||||
resData.hits[4] = obj[QStringLiteral("impacts")].toInt();
|
||||
resData.vulnerabilityState = static_cast<ProjectDataManagement::VulnerabilityState::type>(obj[QStringLiteral("vulnerability_state")].toInt());
|
||||
resData.vulnerabilityState = static_cast<ProjectDataManagement::VulnerabilityState>(obj[QStringLiteral("vulnerability_state")].toInt());
|
||||
resData.hits[0] = obj[QStringLiteral("hits_buildings")].toInt();
|
||||
resData.hits[3] = obj[QStringLiteral("hits_friendly_fire")].toInt();
|
||||
resData.hits[2] = obj[QStringLiteral("hits")].toInt();
|
||||
@@ -369,7 +369,7 @@ void AirSupportModel::fillReportData()
|
||||
|
||||
totalChargeTypeId.chargeTypeId = chargeTypeId;
|
||||
totalChargeTypeId.startTime = 0;
|
||||
totalChargeTypeId.vulnerabilityState = ProjectDataManagement::VulnerabilityState::NotReady;
|
||||
totalChargeTypeId.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady;
|
||||
totalChargeTypeId.hits = sums[chargeTypeId];
|
||||
m_dataTable.append(std::move(totalChargeTypeId));
|
||||
|
||||
@@ -394,7 +394,7 @@ void AirSupportModel::fillReportData()
|
||||
resultDataTable totalChargeTypeId;
|
||||
totalChargeTypeId.chargeTypeId = chargeTypeId;
|
||||
totalChargeTypeId.startTime = 0;
|
||||
totalChargeTypeId.vulnerabilityState = ProjectDataManagement::VulnerabilityState::NotReady;
|
||||
totalChargeTypeId.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady;
|
||||
totalChargeTypeId.hits = sums[chargeTypeId];
|
||||
m_dataTable.append(std::move(totalChargeTypeId));
|
||||
|
||||
@@ -404,7 +404,7 @@ void AirSupportModel::fillReportData()
|
||||
resultDataTable total;
|
||||
total.chargeTypeId = 0;
|
||||
total.startTime = 0;
|
||||
total.vulnerabilityState = ProjectDataManagement::VulnerabilityState::NotReady;
|
||||
total.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady;
|
||||
total.hits = bigTotal;
|
||||
m_dataTable.append(std::move(total));
|
||||
}
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ private:
|
||||
struct resultDataTable : public resultDataPie
|
||||
{
|
||||
|
||||
ProjectDataManagement::VulnerabilityState vulnerabilityState = ProjectDataManagement::VulnerabilityState::NotReady;
|
||||
ProjectDataManagement::VulnerabilityState vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady;
|
||||
};
|
||||
|
||||
QVector<resultDataTable> m_dataTable;
|
||||
|
||||
+1
-1
@@ -196,7 +196,7 @@ void ChargeAdministrationModel::fillReportData()
|
||||
|
||||
resultData resData;
|
||||
resData.chargeTypeId = obj[QStringLiteral("charge_type_id")].toInt();
|
||||
resData.effectSourceId = static_cast<ProjectDataManagement::EffectSource::type>(obj[QStringLiteral("effect_source_id")].toInt());
|
||||
resData.effectSourceId = static_cast<ProjectDataManagement::EffectSource>(obj[QStringLiteral("effect_source_id")].toInt());
|
||||
resData.charges[0] = obj[QStringLiteral("charge_start")].toInt();
|
||||
resData.charges[1] = obj[QStringLiteral("charge_resupplied")].toInt();
|
||||
resData.charges[2] = obj[QStringLiteral("charge_end")].toInt();
|
||||
|
||||
+18
-18
@@ -31,25 +31,25 @@ FiringsModel::FiringsModel(const ReportInfo &report, LtsSession::LtsSession *ses
|
||||
|
||||
resData.chargeTypeId = 371;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::CatastrophicKill;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill;
|
||||
resData.hits = {9, 4, 4, 0};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
resData.chargeTypeId = 371;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::MobilityKill;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_MobilityKill;
|
||||
resData.hits = {9, 4, 3, 1};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
resData.chargeTypeId = 371;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VisibleMobilityKill;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_VisibleMobilityKill;
|
||||
resData.hits = {2, 2, 2, 0};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
resData.chargeTypeId = 371;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::NotReady;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady;
|
||||
resData.hits = {20, 10, 9, 1};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
@@ -62,25 +62,25 @@ FiringsModel::FiringsModel(const ReportInfo &report, LtsSession::LtsSession *ses
|
||||
|
||||
resData.chargeTypeId = 372;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::CatastrophicKill;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill;
|
||||
resData.hits = {14, 4, 4, 0};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
resData.chargeTypeId = 372;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::MobilityKill;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_MobilityKill;
|
||||
resData.hits = {4, 4, 3, 1};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
resData.chargeTypeId = 372;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VisibleMobilityKill;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_VisibleMobilityKill;
|
||||
resData.hits = {2, 2, 2, 0};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
resData.chargeTypeId = 372;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::NotReady;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady;
|
||||
resData.hits = {20, 10, 9, 1};
|
||||
m_dataTable.append(resData);
|
||||
|
||||
@@ -91,7 +91,7 @@ FiringsModel::FiringsModel(const ReportInfo &report, LtsSession::LtsSession *ses
|
||||
|
||||
resData.chargeTypeId = 0;
|
||||
resData.startTime = 1513758640000;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::NotReady;
|
||||
resData.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady;
|
||||
resData.hits = {40, 20, 18, 2};
|
||||
m_dataTable.append(resData);
|
||||
#else
|
||||
@@ -167,7 +167,7 @@ QVariant FiringsModel::data(const QModelIndex &index, int role) const
|
||||
boldFont.setBold(true);
|
||||
|
||||
|
||||
if (displayInfo.chargeTypeId == 0 || displayInfo.vulnerabilityState == ProjectDataManagement::VulnerabilityState::NotReady)
|
||||
if (displayInfo.chargeTypeId == 0 || displayInfo.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady)
|
||||
return boldFont;
|
||||
|
||||
return QFont();
|
||||
@@ -185,7 +185,7 @@ QVariant FiringsModel::data(const QModelIndex &index, int role) const
|
||||
if (displayInfo.chargeTypeId > 0)
|
||||
{
|
||||
QString chargeTypeName = m_pdmDtc->trChargeTypeShortName(displayInfo.chargeTypeId);
|
||||
if (displayInfo.vulnerabilityState == ProjectDataManagement::VulnerabilityState::NotReady)
|
||||
if (displayInfo.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady)
|
||||
displayTypeName = tr("Total [%1]").arg(chargeTypeName);
|
||||
else
|
||||
displayTypeName = chargeTypeName;
|
||||
@@ -193,7 +193,7 @@ QVariant FiringsModel::data(const QModelIndex &index, int role) const
|
||||
return (displayInfo.chargeTypeId > 0 ? displayTypeName : tr("TOTAL:"));
|
||||
}
|
||||
case START_TIME:
|
||||
return (displayInfo.vulnerabilityState != ProjectDataManagement::VulnerabilityState::NotReady ? DTG::toStringMSec(displayInfo.startTime) : QVariant());
|
||||
return (displayInfo.vulnerabilityState != ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady ? DTG::toStringMSec(displayInfo.startTime) : QVariant());
|
||||
case FIRINGS:
|
||||
return (displayInfo.hits[0] > 0 ? displayInfo.hits[0] : QVariant());
|
||||
case HITS_TOTAL:
|
||||
@@ -203,8 +203,8 @@ QVariant FiringsModel::data(const QModelIndex &index, int role) const
|
||||
case HITS_FRIENDLY:
|
||||
return displayInfo.hits[3];
|
||||
case VULNERABILITY_STATE:
|
||||
return ((displayInfo.vulnerabilityState != ProjectDataManagement::VulnerabilityState::NotReady &&
|
||||
displayInfo.vulnerabilityState != ProjectDataManagement::VulnerabilityState::CombatReady) ?
|
||||
return ((displayInfo.vulnerabilityState != ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady &&
|
||||
displayInfo.vulnerabilityState != ProjectDataManagement::VulnerabilityState::VulnerabilityState_CombatReady) ?
|
||||
ProjectDataManagement::toString(displayInfo.vulnerabilityState): QVariant());
|
||||
default:
|
||||
return QVariant();
|
||||
@@ -329,7 +329,7 @@ void FiringsModel::fillReportData()
|
||||
resData.chargeTypeId = obj[QStringLiteral("charge_type_id")].toInt();
|
||||
resData.startTime = obj[QStringLiteral("start_time")].toDouble();
|
||||
|
||||
resData.vulnerabilityState = static_cast<ProjectDataManagement::VulnerabilityState::type>(obj[QStringLiteral("vulnerability_state")].toInt());
|
||||
resData.vulnerabilityState = static_cast<ProjectDataManagement::VulnerabilityState>(obj[QStringLiteral("vulnerability_state")].toInt());
|
||||
resData.hits[0] = obj[QStringLiteral("firings")].toInt();
|
||||
resData.hits[3] = obj[QStringLiteral("hits_friendly_fire")].toInt();
|
||||
resData.hits[2] = obj[QStringLiteral("hits")].toInt();
|
||||
@@ -353,7 +353,7 @@ void FiringsModel::fillReportData()
|
||||
|
||||
totalChargeType.chargeTypeId = chargeTypeId;
|
||||
totalChargeType.startTime = 0;
|
||||
totalChargeType.vulnerabilityState = ProjectDataManagement::VulnerabilityState::NotReady;
|
||||
totalChargeType.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady;
|
||||
totalChargeType.hits = sums[chargeTypeId];
|
||||
m_dataTable.append(std::move(totalChargeType));
|
||||
|
||||
@@ -377,7 +377,7 @@ void FiringsModel::fillReportData()
|
||||
resultDataTable totalChargeType;
|
||||
totalChargeType.chargeTypeId = chargeTypeId;
|
||||
totalChargeType.startTime = 0;
|
||||
totalChargeType.vulnerabilityState = ProjectDataManagement::VulnerabilityState::NotReady;
|
||||
totalChargeType.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady;
|
||||
totalChargeType.hits = sums[chargeTypeId];
|
||||
m_dataTable.append(std::move(totalChargeType));
|
||||
|
||||
@@ -387,7 +387,7 @@ void FiringsModel::fillReportData()
|
||||
resultDataTable total;
|
||||
total.chargeTypeId = 0;
|
||||
total.startTime = 0;
|
||||
total.vulnerabilityState = ProjectDataManagement::VulnerabilityState::NotReady;
|
||||
total.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady;
|
||||
total.hits = bigTotal;
|
||||
m_dataTable.append(std::move(total));
|
||||
}
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ private:
|
||||
|
||||
struct resultDataTable : public resultDataPie
|
||||
{
|
||||
ProjectDataManagement::VulnerabilityState vulnerabilityState = ProjectDataManagement::VulnerabilityState::NotReady;
|
||||
ProjectDataManagement::VulnerabilityState vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady;
|
||||
};
|
||||
|
||||
QVector<resultDataTable> m_dataTable;
|
||||
|
||||
+1
-1
@@ -169,7 +169,7 @@ QVariant SanitationMaterialModel::data(const QModelIndex &index, int role) const
|
||||
return tot;
|
||||
}
|
||||
case QUALIFICATION:
|
||||
return (displayInfo.qualification > 0 ? ParticipantManagement::toString(static_cast<ParticipantManagement::Qualification_def::type>(displayInfo.qualification)) : QVariant());
|
||||
return (displayInfo.qualification > 0 ? ParticipantManagement::toString(static_cast<ParticipantManagement::Qualification>(displayInfo.qualification)) : QVariant());
|
||||
case MATERIAL_ID:
|
||||
return (displayInfo.materialId > 0 ? displayInfo.materialId : QVariant());
|
||||
case MATERIAL_NAME:
|
||||
|
||||
+24
-24
@@ -485,18 +485,18 @@ void TreatmentModel::fillReportData()
|
||||
resData.timeTreatmentVulnerability = resData.timeTreatment - resData.timeVulnerability;
|
||||
resData.inbetween10Minutes = false;
|
||||
resData.goldenHour = false;
|
||||
if (resData.sanitationResult >= ParticipantManagement::SanitationResult_def::Insufficient)
|
||||
if (resData.sanitationResult >= ParticipantManagement::SanitationResult::Insufficient)
|
||||
{
|
||||
if (resData.timeTreatmentVulnerability < (10 * 60 * 1000))
|
||||
resData.inbetween10Minutes = true;
|
||||
DEBUG_LOG(m_logger) << "qualification: " << resData.qualification;
|
||||
if (resData.timeTreatmentVulnerability < (60 * 60 * 1000) && resData.qualification == ParticipantManagement::Qualification_def::SANPers)
|
||||
if (resData.timeTreatmentVulnerability < (60 * 60 * 1000) && resData.qualification == ParticipantManagement::Qualification::SANPers)
|
||||
{
|
||||
resData.goldenHour = true;
|
||||
DEBUG_LOG(m_logger) << "golden hour particpantId: " << resData.participantId;
|
||||
}
|
||||
}
|
||||
if (resData.sanitationResult == ParticipantManagement::SanitationResult_def::Optimal)
|
||||
if (resData.sanitationResult == ParticipantManagement::SanitationResult::Optimal)
|
||||
resData.optimalTreated = true;
|
||||
|
||||
if (resData.sanitationResult >= 0)
|
||||
@@ -577,21 +577,21 @@ void TreatmentModel::fillReportData()
|
||||
QMap<int,QSet<int>> tmpVulMap = it.value();
|
||||
|
||||
|
||||
resDataTable.amountLightlyWounded = tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::LightDamage).size();
|
||||
resDataTable.amountLightlyWounded = tmpVulMap.value(ProjectDataManagement::VulnerabilityState::LightDamage).size();
|
||||
resDataTotal.amountLightlyWounded += resDataTable.amountLightlyWounded;
|
||||
for ( int id : tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::LightDamage))
|
||||
for ( int id : tmpVulMap.value(ProjectDataManagement::VulnerabilityState::LightDamage))
|
||||
INFO_LOG(m_logger) << "participantId: lightlyWouned: " << id;
|
||||
|
||||
|
||||
resDataTable.amountMediumWounded = tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::MediumDamage).size();
|
||||
resDataTable.amountMediumWounded = tmpVulMap.value(ProjectDataManagement::VulnerabilityState::MediumDamage).size();
|
||||
resDataTotal.amountMediumWounded += resDataTable.amountMediumWounded;
|
||||
for ( int id : tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::MediumDamage))
|
||||
for ( int id : tmpVulMap.value(ProjectDataManagement::VulnerabilityState::MediumDamage))
|
||||
INFO_LOG(m_logger) << "participantId: mediumWouned: " << id;
|
||||
|
||||
|
||||
resDataTable.amountHeavyWounded = tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::HeavyDamage).size();
|
||||
resDataTable.amountHeavyWounded = tmpVulMap.value(ProjectDataManagement::VulnerabilityState::HeavyDamage).size();
|
||||
resDataTotal.amountHeavyWounded += resDataTable.amountHeavyWounded;
|
||||
for ( int id : tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::HeavyDamage))
|
||||
for ( int id : tmpVulMap.value(ProjectDataManagement::VulnerabilityState::HeavyDamage))
|
||||
INFO_LOG(m_logger) << "participantId: heavyWouned: " << id;
|
||||
|
||||
|
||||
@@ -600,11 +600,11 @@ void TreatmentModel::fillReportData()
|
||||
resDataTotal.amountInjuryTotal += resDataTable.amountInjuryTotal;
|
||||
|
||||
|
||||
resDataTable.amountKIA = tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::CatastrophicKill).size();
|
||||
resDataTable.amountKIA = tmpVulMap.value(ProjectDataManagement::VulnerabilityState::CatastrophicKill).size();
|
||||
resDataTotal.amountKIA += resDataTable.amountKIA;
|
||||
|
||||
|
||||
for ( int id : tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::CatastrophicKill))
|
||||
for ( int id : tmpVulMap.value(ProjectDataManagement::VulnerabilityState::CatastrophicKill))
|
||||
{
|
||||
INFO_LOG(m_logger) << "participantId: KIA: " << id;
|
||||
m_rescueStationTreated[resDataTable.participantId].remove(id);
|
||||
@@ -612,10 +612,10 @@ void TreatmentModel::fillReportData()
|
||||
}
|
||||
|
||||
|
||||
resDataTable.amountKIAAfterWIA = tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::TemporarySeverance).size();
|
||||
resDataTable.amountKIAAfterWIA = tmpVulMap.value(ProjectDataManagement::VulnerabilityState::TemporarySeverance).size();
|
||||
resDataTotal.amountKIAAfterWIA += resDataTable.amountKIAAfterWIA;
|
||||
|
||||
for ( int id : tmpVulMap.value(ProjectDataManagement::VulnerabilityState_def::TemporarySeverance))
|
||||
for ( int id : tmpVulMap.value(ProjectDataManagement::VulnerabilityState::TemporarySeverance))
|
||||
{
|
||||
INFO_LOG(m_logger) << "participantId: kiaAfterWia: " << id;
|
||||
m_rescueStationTreated[resDataTable.participantId].remove(id);
|
||||
@@ -762,12 +762,12 @@ void TreatmentModel::fillParticipantMap()
|
||||
QMap<int,QSet<int>> vulnMap;
|
||||
QSet<int> partIds;
|
||||
|
||||
vulnMap.insert(ProjectDataManagement::VulnerabilityState_def::LightDamage, partIds);
|
||||
vulnMap.insert(ProjectDataManagement::VulnerabilityState_def::MediumDamage, partIds);
|
||||
vulnMap.insert(ProjectDataManagement::VulnerabilityState_def::HeavyDamage, partIds);
|
||||
vulnMap.insert(ProjectDataManagement::VulnerabilityState_def::CatastrophicKill, partIds);
|
||||
vulnMap.insert(ProjectDataManagement::VulnerabilityState::LightDamage, partIds);
|
||||
vulnMap.insert(ProjectDataManagement::VulnerabilityState::MediumDamage, partIds);
|
||||
vulnMap.insert(ProjectDataManagement::VulnerabilityState::HeavyDamage, partIds);
|
||||
vulnMap.insert(ProjectDataManagement::VulnerabilityState::CatastrophicKill, partIds);
|
||||
|
||||
vulnMap.insert(ProjectDataManagement::VulnerabilityState_def::TemporarySeverance, partIds);
|
||||
vulnMap.insert(ProjectDataManagement::VulnerabilityState::TemporarySeverance, partIds);
|
||||
|
||||
m_vulnerabilityMap.insert(it2.key(), vulnMap);
|
||||
m_rescueStationTreated.insert(it2.key(), partIds);
|
||||
@@ -820,9 +820,9 @@ int TreatmentModel::getParticipantKey(int participantId)
|
||||
void TreatmentModel::countVulnerabilityState( int key, const resultData &data)
|
||||
{
|
||||
|
||||
if (data.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CombatReady ||
|
||||
data.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::VisibleWeaponSystemDamage ||
|
||||
data.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::VulnerabilityBitsChanged)
|
||||
if (data.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CombatReady ||
|
||||
data.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VisibleWeaponSystemDamage ||
|
||||
data.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityBitsChanged)
|
||||
return;
|
||||
|
||||
if ( key <= 0)
|
||||
@@ -859,11 +859,11 @@ void TreatmentModel::countVulnerabilityState( int key, const resultData &data)
|
||||
}
|
||||
}
|
||||
|
||||
if (data.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill && data.kiaAfterWia)
|
||||
if (data.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill && data.kiaAfterWia)
|
||||
{
|
||||
vulMapTemp[ProjectDataManagement::VulnerabilityState_def::CatastrophicKill].remove(data.participantId);
|
||||
vulMapTemp[ProjectDataManagement::VulnerabilityState::CatastrophicKill].remove(data.participantId);
|
||||
|
||||
vulMapTemp[ProjectDataManagement::VulnerabilityState_def::TemporarySeverance].insert(data.participantId);
|
||||
vulMapTemp[ProjectDataManagement::VulnerabilityState::TemporarySeverance].insert(data.participantId);
|
||||
}
|
||||
|
||||
m_vulnerabilityMap[key] = vulMapTemp;
|
||||
|
||||
+3
-3
@@ -214,9 +214,9 @@ QVariant TreatmentTimelineModel::data(const QModelIndex &index, int role) const
|
||||
}
|
||||
case VULNERABILITY:
|
||||
{
|
||||
QString vbg = ProjectDataManagement::toString(static_cast<ProjectDataManagement::VulnerabilityState::type>(displayInfo.vulnerabilityState));
|
||||
QString vbg = ProjectDataManagement::toString(static_cast<ProjectDataManagement::VulnerabilityState>(displayInfo.vulnerabilityState));
|
||||
if (displayInfo.vulnerability > 0)
|
||||
vbg += QStringLiteral("\n") + m_pdmDtc->trVulnerabilityKindName(displayInfo.vulnerability, ProjectDataManagement::VulnerabilityClass::SoldierInjuries);
|
||||
vbg += QStringLiteral("\n") + m_pdmDtc->trVulnerabilityKindName(displayInfo.vulnerability, ProjectDataManagement::VulnerabilityClass::VulnerabilityClass_SoldierInjuries);
|
||||
return vbg;
|
||||
}
|
||||
case AREA_NAME:
|
||||
@@ -325,7 +325,7 @@ void TreatmentTimelineModel::fillReportData()
|
||||
resData.vulnerability = obj[QStringLiteral("vulnerability")].toInt();
|
||||
resData.vulnerabilityState = obj[QStringLiteral("vulnerability_state")].toInt();
|
||||
resData.eventTime = obj[QStringLiteral("event_time")].toDouble();
|
||||
resData.eventTypeId = static_cast<ReportManagement::EventType::type>(obj[QStringLiteral("event_type_id")].toInt());
|
||||
resData.eventTypeId = static_cast<ReportManagement::EventType>(obj[QStringLiteral("event_type_id")].toInt());
|
||||
resData.properties = obj[QStringLiteral("properties")].toString();
|
||||
|
||||
DEBUG_LOG(m_logger) << "Participant type id = " << resData.participantTypeId;
|
||||
|
||||
+13
-13
@@ -134,31 +134,31 @@ QVariant UnitPowerModel::headerData(int section, Qt::Orientation orientation, in
|
||||
switch (section)
|
||||
{
|
||||
case COMBAT_READY:
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::CombatReady);
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::VulnerabilityState_CombatReady);
|
||||
case NOT_READY:
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::NotReady);
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::VulnerabilityState_NotReady);
|
||||
case LIGHT_DAMAGE:
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::LightDamage);
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::VulnerabilityState_LightDamage);
|
||||
case MEDIUM_DAMAGE:
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::MediumDamage);
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::VulnerabilityState_MediumDamage);
|
||||
case HEAVY_DAMAGE:
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::HeavyDamage);
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::VulnerabilityState_HeavyDamage);
|
||||
case MOBILITY_KILL:
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::MobilityKill);
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::VulnerabilityState_MobilityKill);
|
||||
case VISIBLE_MOBILITY_KILL:
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::VisibleMobilityKill);
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::VulnerabilityState_VisibleMobilityKill);
|
||||
case WEAPON_SYSTEM_DAMAGE:
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::WeaponSystemDamage);
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::VulnerabilityState_WeaponSystemDamage);
|
||||
case VISIBLE_WEAPON_SYSTEM_DAMAGE:
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::VisibleWeaponSystemDamage);
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::VulnerabilityState_VisibleWeaponSystemDamage);
|
||||
case CATASTROPHIC_KILL:
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::CatastrophicKill);
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill);
|
||||
case TEMPORARY_SEVERANCE:
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::TemporarySeverance);
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::VulnerabilityState_TemporarySeverance);
|
||||
case NEAR_MISS:
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::NearMiss);
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::VulnerabilityState_NearMiss);
|
||||
case HIT_WITH_NO_EFFECT:
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::HitWithNoEffect);
|
||||
return ProjectDataManagement::toString(ProjectDataManagement::VulnerabilityState::VulnerabilityState_HitWithNoEffect);
|
||||
case START_TIME:
|
||||
return tr("Time");
|
||||
default:
|
||||
|
||||
+3
-3
@@ -125,7 +125,7 @@ ReportEdit::ReportEdit(LtsSession::LtsSession *session, QWidget *parent)
|
||||
{
|
||||
for (QAction *action : m_ui->pbEffectSource->menu()->actions())
|
||||
{
|
||||
const ProjectDataManagement::EffectSource effectSourceId = static_cast<ProjectDataManagement::EffectSource::type>(action->data().toInt());
|
||||
const ProjectDataManagement::EffectSource effectSourceId = static_cast<ProjectDataManagement::EffectSource>(action->data().toInt());
|
||||
auto it = std::find(m_activeEffectSources.begin(), m_activeEffectSources.end(), effectSourceId);
|
||||
if (it != m_activeEffectSources.end())
|
||||
return true;
|
||||
@@ -274,7 +274,7 @@ bool ReportEdit::init(const ReportInfo &currReport, LtsSession::LtsSession *sess
|
||||
connect(action,
|
||||
&QAction::toggled,
|
||||
this,
|
||||
[=](bool checked) { onEffectSourceToggled(static_cast<ProjectDataManagement::EffectSource::type>(action->data().toInt()), checked); });
|
||||
[=](bool checked) { onEffectSourceToggled(static_cast<ProjectDataManagement::EffectSource>(action->data().toInt()), checked); });
|
||||
}
|
||||
m_ui->pbEffectSource->setMenu(effectSourceMenu);
|
||||
}
|
||||
@@ -1084,7 +1084,7 @@ bool ReportEdit::initInputs()
|
||||
QStringList toolTip;
|
||||
for (QAction *action : m_ui->pbEffectSource->menu()->actions())
|
||||
{
|
||||
const ProjectDataManagement::EffectSource effectSourceId = static_cast<ProjectDataManagement::EffectSource::type>(action->data().toInt());
|
||||
const ProjectDataManagement::EffectSource effectSourceId = static_cast<ProjectDataManagement::EffectSource>(action->data().toInt());
|
||||
auto it = std::find(m_report.effectSources().begin(), m_report.effectSources().end(), effectSourceId.underlying());
|
||||
if (it != m_report.effectSources().end())
|
||||
{
|
||||
|
||||
+5
-5
@@ -489,7 +489,7 @@ void ReportPreview::collectHeaderData()
|
||||
addToHeaderData(tr("Area: "), tr("not specified"));
|
||||
}
|
||||
|
||||
if ( m_report.reportType() == ReportType_def::Treatment && m_report.visualisationType() == VisualisationType_def::Pie)
|
||||
if ( m_report.reportType() == ReportType::Treatment && m_report.visualisationType() == VisualisationType::Pie)
|
||||
{
|
||||
TreatmentModel *tm = dynamic_cast<TreatmentModel*>(m_dataModel);
|
||||
addToHeaderData(tr("Injury Total: "), QString::number(tm->getAmountInjuryTotal()));
|
||||
@@ -544,7 +544,7 @@ bool ReportPreview::displayReportAsTable()
|
||||
KDReports::AutoTableElement autoTable(proxyModel);
|
||||
autoTable.setVerticalHeaderVisible(false);
|
||||
|
||||
if (m_report.reportType() == ReportType_def::Treatment || m_report.reportType() == ReportType_def::AirSupport)
|
||||
if (m_report.reportType() == ReportType::Treatment || m_report.reportType() == ReportType::AirSupport)
|
||||
m_reportDisplay->setOrientation(QPrinter::Landscape);
|
||||
|
||||
m_reportDisplay->setReportMode(KDReports::Report::WordProcessing);
|
||||
@@ -1054,7 +1054,7 @@ KDChart::Chart *ReportPreview::createNewChart(const ChartType &chartType, bool h
|
||||
|
||||
|
||||
|
||||
eventsLegend->setBrush(index, m_eventsModel->eventColor(static_cast<ReportManagement::EventType::type>(index+1)));
|
||||
eventsLegend->setBrush(index, m_eventsModel->eventColor(static_cast<ReportManagement::EventType>(index+1)));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1122,7 +1122,7 @@ KDChart::Chart *ReportPreview::createNewChart(const ChartType &chartType, bool h
|
||||
for ( int iRow = 0; iRow < rowCount; ++iRow )
|
||||
{
|
||||
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));
|
||||
QColor eventColor = m_eventsModel->eventColor(static_cast<ReportManagement::EventType>(eventTypeId));
|
||||
|
||||
DEBUG_LOG(m_logger) << "Row " << iRow << ", eventTypeId " << eventTypeId;
|
||||
DEBUG_LOG(m_logger) << "Event color " << eventColor.name();
|
||||
@@ -1322,7 +1322,7 @@ QVariant EventTypeModel::headerData(int section, Qt::Orientation orientation, in
|
||||
{
|
||||
if (orientation == Qt::Horizontal)
|
||||
{
|
||||
const ReportManagement::EventType &et = static_cast<EventType::type>(section+1);
|
||||
const ReportManagement::EventType &et = static_cast<EventType>(section+1);
|
||||
if (role == Qt::DisplayRole)
|
||||
return ReportManagement::toString(et);
|
||||
if (role == Qt::BackgroundRole)
|
||||
|
||||
Reference in new issue
Block a user