Complete Qt6 migration: full clean build green across groups G1-G12 incl. runtime plugin set
new_docker_build.sh gains Group 12 (212 GUI/Data plugins); fixes LtsUtilsGuiDds visibility (LTO-stripped exports), LtsProjectionWorkstation unity name shadow, 6 unity-off dirs (dup file-scope statics, ddsftc INTERFACE sources) and reconfigures BUILD_FILTERMANAGEMENT/BUILD_PLUGINS_SERVICEMONITOR=ON
This commit is contained in:
1718 files changed
+126739
-18495
No files matched your search
+107
-106
@@ -20,10 +20,11 @@ OcParticipantInfo::OcParticipantInfo(int participantId, LtsSession::LtsSession *
|
||||
, m_roomId(0)
|
||||
, m_session(session)
|
||||
, m_ui(new Ui::OcParticipantInfo)
|
||||
, m_logger(getLogger("OcOcParticipantInfo"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_participant.id(participantId);
|
||||
m_participant.partyId(-1);
|
||||
m_participant.id = participantId;
|
||||
m_participant.partyId = -1;
|
||||
m_symbolWatcher = new AdvancedSymbology::SymbolResultWatcherLabel(m_ui->lblIcon);
|
||||
|
||||
|
||||
@@ -107,7 +108,7 @@ void OcParticipantInfo::updateIcon(const QColor &color, const QString &sidc)
|
||||
|
||||
bool OcParticipantInfo::setUiValues()
|
||||
{
|
||||
if (!m_ppmDtc || m_participant.id() < 0)
|
||||
if (!m_ppmDtc || m_participant.id < 0)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -115,29 +116,29 @@ bool OcParticipantInfo::setUiValues()
|
||||
m_ui->tbNbc->setVisible(false);
|
||||
|
||||
|
||||
const ParticipantManagement::Participant participantData = m_ppmDtc->participant(m_participant.id());
|
||||
m_typeClass = m_ppmDtc->type(participantData.typeId()).typeClass();
|
||||
const ParticipantManagement::Participant participantData = m_ppmDtc->participant(m_participant.id);
|
||||
m_typeClass = m_ppmDtc->type(participantData.typeId).typeClass;
|
||||
|
||||
bool bUpdateDynamicParticipantData = true;
|
||||
switch (m_typeClass.underlying())
|
||||
switch (static_cast<int>(m_typeClass))
|
||||
{
|
||||
case ParticipantManagement::TypeClass::Human:
|
||||
case ParticipantManagement::TypeClass::GroundVehicle:
|
||||
case ParticipantManagement::TypeClass::VehicleWithGear:
|
||||
case ParticipantManagement::TypeClass::WeaponSystem:
|
||||
case ParticipantManagement::TypeClass::Aircraft:
|
||||
case ParticipantManagement::TypeClass::SupportEntity:
|
||||
case static_cast<int>(ParticipantManagement::TypeClass::Human):
|
||||
case static_cast<int>(ParticipantManagement::TypeClass::GroundVehicle):
|
||||
case static_cast<int>(ParticipantManagement::TypeClass::VehicleWithGear):
|
||||
case static_cast<int>(ParticipantManagement::TypeClass::WeaponSystem):
|
||||
case static_cast<int>(ParticipantManagement::TypeClass::Aircraft):
|
||||
case static_cast<int>(ParticipantManagement::TypeClass::SupportEntity):
|
||||
{
|
||||
onParticipantChanged(participantData);
|
||||
connect(m_ppmDtc.get(), &ParticipantManagement::Interface::Dtc::participantChanged,
|
||||
this, &OcParticipantInfo::onParticipantChanged);
|
||||
connect(m_ppmDtc.get(), &ParticipantManagement::Interface::Dtc::participantPositionChanged,
|
||||
this, &OcParticipantInfo::onPositionChanged);
|
||||
onPositionChanged(m_ppmDtc->participantPosition(participantData.id()));
|
||||
onPositionChanged(m_ppmDtc->participantPosition(participantData.id));
|
||||
|
||||
if (m_sitMapGuiIfc)
|
||||
{
|
||||
const int32_t participantId = participantData.id();
|
||||
const int32_t participantId = participantData.id;
|
||||
|
||||
m_ui->pbFindOnMap->setVisible(true);
|
||||
|
||||
@@ -158,26 +159,26 @@ bool OcParticipantInfo::setUiValues()
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ParticipantManagement::TypeClass::Unit:
|
||||
case ParticipantManagement::TypeClass::SupportUnit:
|
||||
case ParticipantManagement::TypeClass::Vessel:
|
||||
case ParticipantManagement::TypeClass::Unknown:
|
||||
case static_cast<int>(ParticipantManagement::TypeClass::Unit):
|
||||
case static_cast<int>(ParticipantManagement::TypeClass::SupportUnit):
|
||||
case static_cast<int>(ParticipantManagement::TypeClass::Vessel):
|
||||
case static_cast<int>(ParticipantManagement::TypeClass::Unknown):
|
||||
return false;
|
||||
}
|
||||
|
||||
if (bUpdateDynamicParticipantData)
|
||||
{
|
||||
const auto dpd = m_ppmDtc->dynamicParticipantData(participantData.id());
|
||||
if (dpd.participantId() || participantData.id())
|
||||
const auto dpd = m_ppmDtc->dynamicParticipantData(participantData.id);
|
||||
if (dpd.participantId || participantData.id)
|
||||
{
|
||||
onDynamicParticipantDataChanged(dpd);
|
||||
}
|
||||
else
|
||||
{
|
||||
const ParticipantManagement::Party party = m_ppmDtc->party(m_participant.partyId());
|
||||
const QColor color = QColor::fromRgb(QRgb(party.color()));
|
||||
const ParticipantManagement::Party party = m_ppmDtc->party(m_participant.partyId);
|
||||
const QColor color = QColor::fromRgb(QRgb(party.color));
|
||||
|
||||
updateIcon(color, QString::fromStdString(m_participant.symbol()));
|
||||
updateIcon(color, QString::fromStdString(m_participant.symbol));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,22 +220,22 @@ void OcParticipantInfo::setKindVisible(bool vis)
|
||||
|
||||
void OcParticipantInfo::onDynamicParticipantDataChanged(const ParticipantManagement::DynamicParticipantData &data)
|
||||
{
|
||||
if (data.participantId() != m_participant.id() && data.participantId() != 0)
|
||||
if (data.participantId != m_participant.id && data.participantId != 0)
|
||||
return;
|
||||
|
||||
|
||||
if (data.stateHistory().size() > 0)
|
||||
if (data.stateHistory.size() > 0)
|
||||
{
|
||||
const ProjectDataManagement::VulnerabilityClass vc = m_typeClass == ParticipantManagement::TypeClass::Human ?
|
||||
ProjectDataManagement::VulnerabilityClass::SoldierInjuries :
|
||||
ProjectDataManagement::VulnerabilityClass::VehicleDamages;
|
||||
ProjectDataManagement::VulnerabilityClass::VulnerabilityClass_SoldierInjuries :
|
||||
ProjectDataManagement::VulnerabilityClass::VulnerabilityClass_VehicleDamages;
|
||||
|
||||
const ParticipantManagement::StateInformation &lastState = m_ppmDtc->youngestStateInformation(data.stateHistory());
|
||||
m_ui->lblStatus->setText(ProjectDataManagement::toString(lastState.vulnerabilityState(), vc));
|
||||
const ParticipantManagement::StateInformation &lastState = m_ppmDtc->youngestStateInformation(data.stateHistory);
|
||||
m_ui->lblStatus->setText(ProjectDataManagement::toString(lastState.vulnerabilityState, vc));
|
||||
|
||||
|
||||
setKindVisible(lastState.vulnerabilityKindId() > 0);
|
||||
m_ui->lblKind->setText(m_pdmDtc->trVulnerabilityKindName(lastState.vulnerabilityKindId(), vc));
|
||||
setKindVisible(lastState.vulnerabilityKindId > 0);
|
||||
m_ui->lblKind->setText(m_pdmDtc->trVulnerabilityKindName(lastState.vulnerabilityKindId, vc));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -242,35 +243,35 @@ void OcParticipantInfo::onDynamicParticipantDataChanged(const ParticipantManagem
|
||||
m_ui->lblKind->setText(QStringLiteral("-"));
|
||||
}
|
||||
|
||||
setRed(m_ui->lblEquipNr, data.manipulation().size());
|
||||
setRed(m_ui->lblEquipNr, data.manipulation.size());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!data.specialSensorDataState() || m_typeClass == ParticipantManagement::TypeClass::Aircraft)
|
||||
if (!data.specialSensorDataState || m_typeClass == ParticipantManagement::TypeClass::Aircraft)
|
||||
{
|
||||
m_ui->lblSpecialSensorState->hide();
|
||||
m_ui->lbSpecialSensorState->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
showSpecialSensorData(data.specialSensorDataState());
|
||||
showSpecialSensorData(data.specialSensorDataState);
|
||||
m_ui->lbSpecialSensorState->show();
|
||||
m_ui->lblSpecialSensorState->show();
|
||||
}
|
||||
|
||||
|
||||
if (data.gear().size() == 0)
|
||||
if (data.gear.size() == 0)
|
||||
{
|
||||
m_gearList.clear();
|
||||
m_ui->twGear->clearContents();
|
||||
m_ui->twGear->hide();
|
||||
m_ui->pbGearRanges->hide();
|
||||
}
|
||||
else if (data.gear() != m_gearList)
|
||||
else if (data.gear != m_gearList)
|
||||
{
|
||||
m_gearList = data.gear();
|
||||
m_gearList = data.gear;
|
||||
std::vector<ParticipantManagement::GearInformation> tmpGearList = m_gearList;
|
||||
|
||||
m_ui->twGear->show();
|
||||
@@ -287,20 +288,20 @@ void OcParticipantInfo::onDynamicParticipantDataChanged(const ParticipantManagem
|
||||
for (const ParticipantManagement::GearInformation &gearInfo : m_gearList)
|
||||
{
|
||||
QTableWidgetItem *item = nullptr;
|
||||
if (gearInfo.chargeTypeId() <= 0)
|
||||
if (gearInfo.chargeTypeId <= 0)
|
||||
{
|
||||
rowCount--;
|
||||
continue;
|
||||
}
|
||||
|
||||
const int gearTypeId = gearInfo.gearTypeId();
|
||||
const int gearTypeId = gearInfo.gearTypeId;
|
||||
if ((gearTypeId & unknownTasId) == unknownTasId)
|
||||
item = new QTableWidgetItem(tr("Unknown gear id %1").arg(gearTypeId & ~unknownTasId));
|
||||
else if (gearTypeId == 0)
|
||||
{
|
||||
|
||||
|
||||
switch (gearInfo.gearId())
|
||||
switch (gearInfo.gearId)
|
||||
{
|
||||
case 1:
|
||||
item = new QTableWidgetItem(tr("Tank", "Gear Type"));
|
||||
@@ -317,9 +318,9 @@ void OcParticipantInfo::onDynamicParticipantDataChanged(const ParticipantManagem
|
||||
item = new QTableWidgetItem(m_pdmDtc->trGearTypeName(gearTypeId));
|
||||
m_ui->twGear->setItem(row, 0, item);
|
||||
|
||||
if (gearInfo.chargeTypeId() != 0 && gearInfo.chargeTypeId() != -1)
|
||||
if (gearInfo.chargeTypeId != 0 && gearInfo.chargeTypeId != -1)
|
||||
{
|
||||
int chargeTypeId = gearInfo.chargeTypeId();
|
||||
int chargeTypeId = gearInfo.chargeTypeId;
|
||||
if ((chargeTypeId & unknownTasId) == unknownTasId)
|
||||
item = new QTableWidgetItem(tr("Unknown charge id %1").arg(chargeTypeId & ~unknownTasId));
|
||||
else if (chargeTypeId == 0)
|
||||
@@ -332,7 +333,7 @@ void OcParticipantInfo::onDynamicParticipantDataChanged(const ParticipantManagem
|
||||
m_ui->twGear->setItem(row, 1, item);
|
||||
|
||||
|
||||
item = new QTableWidgetItem((gearInfo.remain() < 0) ? tr("N/A", "Blank Ammunition") : QString::number(gearInfo.remain()));
|
||||
item = new QTableWidgetItem((gearInfo.remain < 0) ? tr("N/A", "Blank Ammunition") : QString::number(gearInfo.remain));
|
||||
m_ui->twGear->setItem(row, 2, item);
|
||||
}
|
||||
row++;
|
||||
@@ -342,7 +343,7 @@ void OcParticipantInfo::onDynamicParticipantDataChanged(const ParticipantManagem
|
||||
|
||||
}
|
||||
|
||||
m_ui->tbNbc->setVisible(data.hasNbcProtectionConfigured() && data.hasNbcProtectionActive());
|
||||
m_ui->tbNbc->setVisible(data.hasNbcProtectionConfigured && data.hasNbcProtectionActive);
|
||||
|
||||
updateIcon(m_participant);
|
||||
}
|
||||
@@ -353,73 +354,73 @@ void OcParticipantInfo::showSpecialSensorData(int specialSensorData)
|
||||
QString strSpecialSensorData;
|
||||
switch (specialSensorDataState)
|
||||
{
|
||||
case ParticipantManagement::SpecialSensorStatus::ChemicalDetectionFunction_NotOperational:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::ChemicalDetectionFunction_NotOperational):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::ChemicalDetectionFunction_NotOperational);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::ChemicalDetectionFunction_Detecting:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::ChemicalDetectionFunction_Detecting):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::ChemicalDetectionFunction_Detecting);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::NBCDetectionAccessory_NotOperational:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::NBCDetectionAccessory_NotOperational):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::NBCDetectionAccessory_NotOperational);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::NBCDetectionAccessory_Test:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::NBCDetectionAccessory_Test):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::NBCDetectionAccessory_Test);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::NBCDetectionAccessory_DetectingAir:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::NBCDetectionAccessory_DetectingAir):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::NBCDetectionAccessory_DetectingAir);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::AVLB_Mounted:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::AVLB_Mounted):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::AVLB_Mounted);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::AVLB_Deployed:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::AVLB_Deployed):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::AVLB_Deployed);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::AVLB_Mounting:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::AVLB_Mounting):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::AVLB_Mounting);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::AVLB_Deploying:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::AVLB_Deploying):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::AVLB_Deploying);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::MineLayer_Operational:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::MineLayer_Operational):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::MineLayer_Operational);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::MineLayer_Laying:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::MineLayer_Laying):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::MineLayer_Laying);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::MineClearingFunction_March:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::MineClearingFunction_March):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::MineClearingFunction_March);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::MineClearingFunction_ReadyToClear:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::MineClearingFunction_ReadyToClear):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::MineClearingFunction_ReadyToClear);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::MineClearingFunction_Clearing:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::MineClearingFunction_Clearing):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::MineClearingFunction_Clearing);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_NotOperational:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_NotOperational):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_NotOperational);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_ParameterInput:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_ParameterInput):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_ParameterInput);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_ReadyToDeploy:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_ReadyToDeploy):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_ReadyToDeploy);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_Deploying:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_Deploying):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_Deploying);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_Resupply:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_Resupply):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_Resupply);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_FinishDeploying:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_FinishDeploying):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::MineTrowingFunction_FinishDeploying);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::ADLER_Operational:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::ADLER_Operational):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::ADLER_Operational);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::ADLER_ConditionallyOperational:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::ADLER_ConditionallyOperational):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::ADLER_ConditionallyOperational);
|
||||
break;
|
||||
case ParticipantManagement::SpecialSensorStatus::ADLER_NotOperational:
|
||||
case static_cast<int>(ParticipantManagement::SpecialSensorStatus::ADLER_NotOperational):
|
||||
strSpecialSensorData = toString(ParticipantManagement::SpecialSensorStatus::ADLER_NotOperational);
|
||||
break;
|
||||
|
||||
@@ -495,39 +496,39 @@ void OcParticipantInfo::showSpecialSensorData(int specialSensorData)
|
||||
|
||||
void OcParticipantInfo::onPositionChanged(const ParticipantManagement::ParticipantPosition &position)
|
||||
{
|
||||
if (position.participantId() != m_participant.id() && position.participantId() != 0)
|
||||
if (position.participantId != m_participant.id && position.participantId != 0)
|
||||
return;
|
||||
|
||||
onUpdatePosition(position.participantId(), position.pos(), position.sampleTime());
|
||||
onUpdatePosition(position.participantId, position.pos, position.sampleTime);
|
||||
|
||||
if (m_ismDtc && m_roomId != position.roomId())
|
||||
if (m_ismDtc && m_roomId != position.roomId)
|
||||
{
|
||||
if (position.roomId() > 0)
|
||||
if (position.roomId > 0)
|
||||
{
|
||||
const auto mse = m_ismDtc->mainStructureElement(position.buildingId());
|
||||
const auto mse = m_ismDtc->mainStructureElement(position.buildingId);
|
||||
QString roomName;
|
||||
for (const auto &room : mse.elements())
|
||||
for (const auto &room : mse.elements)
|
||||
{
|
||||
if (room.id() == position.roomId())
|
||||
if (room.id == position.roomId)
|
||||
{
|
||||
roomName = QString::fromStdString(room.displayName());
|
||||
roomName = QString::fromStdString(room.displayName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
QString buildingName = m_ismDtc->getBuildingDisplayName(mse);
|
||||
|
||||
m_roomId = position.roomId();
|
||||
m_roomId = position.roomId;
|
||||
m_ui->lblBuilding->setText(buildingName);
|
||||
m_ui->lblRoom->setText(roomName);
|
||||
}
|
||||
setBuildingPosVisible(m_roomId > 0);
|
||||
}
|
||||
|
||||
if (position.mountedOn().is_set())
|
||||
if (position.mountedOn.has_value())
|
||||
{
|
||||
const auto mountedOnParticipant = m_ppmDtc->participant(position.mountedOn().get());
|
||||
if (mountedOnParticipant.equipmentNumber().is_set())
|
||||
m_ui->pbMountedOn->setText(QString::number(mountedOnParticipant.equipmentNumber().get()));
|
||||
const auto mountedOnParticipant = m_ppmDtc->participant(position.mountedOn.get());
|
||||
if (mountedOnParticipant.equipmentNumber.has_value())
|
||||
m_ui->pbMountedOn->setText(QString::number(mountedOnParticipant.equipmentNumber.get()));
|
||||
else
|
||||
m_ui->pbMountedOn->setText(QString::number(0));
|
||||
m_ui->pbMountedOn->show();
|
||||
@@ -535,9 +536,9 @@ void OcParticipantInfo::onPositionChanged(const ParticipantManagement::Participa
|
||||
else
|
||||
m_ui->pbMountedOn->hide();
|
||||
|
||||
if (position.mountedParticipants().is_set())
|
||||
if (position.mountedParticipants.has_value())
|
||||
{
|
||||
m_ui->pbMountedParticipants->setText(QString::number(position.mountedParticipants().get().size()));
|
||||
m_ui->pbMountedParticipants->setText(QString::number(position.mountedParticipants.get().size()));
|
||||
m_ui->pbMountedParticipants->show();
|
||||
}
|
||||
else
|
||||
@@ -548,16 +549,16 @@ void OcParticipantInfo::onPositionChanged(const ParticipantManagement::Participa
|
||||
void OcParticipantInfo::onUpdatePosition(int participantId, const Core::GeoPosition &position, qint64 sampleTime)
|
||||
{
|
||||
m_lastPositionMSec = sampleTime;
|
||||
if ((position.lat() == 0 && position.lon() == 0) || participantId == 0 || std::isnan(position.lon()) || std::isnan(position.lat()))
|
||||
if ((position.lat == 0 && position.lon == 0) || participantId == 0 || std::isnan(position.lon) || std::isnan(position.lat))
|
||||
{
|
||||
m_ui->lblPosition->setText(tr("Invalid Position"));
|
||||
}
|
||||
else
|
||||
{
|
||||
QString mgrs = LtsCoordTrans::mgrsFromGeographic(position.lon(), position.lat());
|
||||
QString mgrs = LtsCoordTrans::mgrsFromGeographic(position.lon, position.lat);
|
||||
|
||||
if (!qFuzzyIsNull(position.z()))
|
||||
mgrs += QStringLiteral(" | ") + QString::number(position.z(), 'f', 2);
|
||||
if (!qFuzzyIsNull(position.z))
|
||||
mgrs += QStringLiteral(" | ") + QString::number(position.z, 'f', 2);
|
||||
|
||||
m_ui->lblPosition->setText(mgrs);
|
||||
}
|
||||
@@ -565,45 +566,45 @@ void OcParticipantInfo::onUpdatePosition(int participantId, const Core::GeoPosit
|
||||
|
||||
void OcParticipantInfo::onParticipantChanged(const ParticipantManagement::Participant &participant)
|
||||
{
|
||||
if (participant.id() != m_participant.id())
|
||||
if (participant.id != m_participant.id)
|
||||
return;
|
||||
|
||||
if (m_participant.typeId() != participant.typeId())
|
||||
m_ui->lblType->setText(ParticipantManagement::trTypeName(m_ppmDtc->type(participant.typeId()).name()));
|
||||
if (m_participant.partyId() != participant.partyId())
|
||||
m_ui->lblParty->setText(ParticipantManagement::trPartyName(m_ppmDtc->party(participant.partyId()).name()));
|
||||
m_ui->lblDesignator->setText(QString::fromStdString(participant.designator()));
|
||||
m_ui->lblTactitcalIdentifier->setText(QString::fromStdString(participant.tacticalIdentifier()));
|
||||
if (m_participant.typeId != participant.typeId)
|
||||
m_ui->lblType->setText(ParticipantManagement::trTypeName(m_ppmDtc->type(participant.typeId).name));
|
||||
if (m_participant.partyId != participant.partyId)
|
||||
m_ui->lblParty->setText(ParticipantManagement::trPartyName(m_ppmDtc->party(participant.partyId).name));
|
||||
m_ui->lblDesignator->setText(QString::fromStdString(participant.designator));
|
||||
m_ui->lblTactitcalIdentifier->setText(QString::fromStdString(participant.tacticalIdentifier));
|
||||
|
||||
if (participant.equipmentNumber().is_set())
|
||||
m_ui->lblEquipNr->setText(QString::number(participant.equipmentNumber().get()));
|
||||
else if (participant.isSimulated())
|
||||
if (participant.equipmentNumber.has_value())
|
||||
m_ui->lblEquipNr->setText(QString::number(participant.equipmentNumber.get()));
|
||||
else if (participant.isSimulated)
|
||||
m_ui->lblEquipNr->setText(tr("simulated"));
|
||||
else
|
||||
m_ui->lblEquipNr->setText(QLatin1String("-"));
|
||||
|
||||
#ifdef LTS_DEBUG
|
||||
m_ui->lblEquipNr->setToolTip(QString::number(participant.id()));
|
||||
m_ui->lblEquipNr->setToolTip(QString::number(participant.id));
|
||||
#endif
|
||||
|
||||
|
||||
m_participant = participant;
|
||||
|
||||
|
||||
m_ui->lblInfoText->setText(QString::fromStdString(participant.info()));
|
||||
m_ui->lblInfoText->setVisible(participant.info().size() > 0);
|
||||
m_ui->lblInfo->setVisible(participant.info().size() > 0);
|
||||
m_ui->lblInfo->setText(QString::number(participant.info().size()));
|
||||
m_ui->lblInfoText->setText(QString::fromStdString(participant.info));
|
||||
m_ui->lblInfoText->setVisible(participant.info.size() > 0);
|
||||
m_ui->lblInfo->setVisible(participant.info.size() > 0);
|
||||
m_ui->lblInfo->setText(QString::number(participant.info.size()));
|
||||
|
||||
onDynamicParticipantDataChanged(m_ppmDtc->dynamicParticipantData(participant.id()));
|
||||
onDynamicParticipantDataChanged(m_ppmDtc->dynamicParticipantData(participant.id));
|
||||
}
|
||||
|
||||
void OcParticipantInfo::onTypeChanged(const ParticipantManagement::Type &type, DataModification modType)
|
||||
{
|
||||
Q_UNUSED(modType)
|
||||
if (m_participant.typeId() != type.id())
|
||||
if (m_participant.typeId != type.id)
|
||||
return;
|
||||
m_ui->lblType->setText(ParticipantManagement::trTypeName(type.name()));
|
||||
m_ui->lblType->setText(ParticipantManagement::trTypeName(type.name));
|
||||
}
|
||||
|
||||
void OcParticipantInfo::onPartitionTimeChanged(qint64 newPartitionTime)
|
||||
@@ -615,13 +616,13 @@ void OcParticipantInfo::onPartitionTimeChanged(qint64 newPartitionTime)
|
||||
void OcParticipantInfo::onFindOnMap()
|
||||
{
|
||||
if (m_sitMapGuiIfc)
|
||||
m_sitMapGuiIfc->centerMapToParticipant(m_participant.id());
|
||||
m_sitMapGuiIfc->centerMapToParticipant(m_participant.id);
|
||||
}
|
||||
|
||||
void OcParticipantInfo::onMovementTrack()
|
||||
{
|
||||
if (m_sitMapGuiIfc)
|
||||
m_sitMapGuiIfc->enableMovementTrack(m_participant.id(), m_ui->pbMovementTrack->isChecked());
|
||||
m_sitMapGuiIfc->enableMovementTrack(m_participant.id, m_ui->pbMovementTrack->isChecked());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user