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:
berrux-dev committed 2026-10-20 09:36:57 +02:00
1 parent eb1d949edc
commit 815e16368e
1718 files changed
+126739 -18495

No files matched your search

@@ -24,6 +24,7 @@ DemandSituation::DemandSituation(LtsSession::LtsSession *session, QWidget *paren
, m_model(nullptr)
, m_proxyModel(nullptr)
, m_ui(new Ui::DemandSituation)
, m_logger(getLogger("DemandSituationDialog"))
{
m_ui->setupUi(this);
setOnlineHelpFilename(QStringLiteral("OC-Demand_Situation"));
@@ -128,7 +129,7 @@ void DemandSituation::onSendDemandSituationReply(const Core::FunctionReplyObject
m_opSettings->setValue(m_ocDemandGroupString, QStringLiteral("Party"), m_ui->cbParty->currentData().toInt());
const auto selIndexes = m_ui->dvParticipants->selectedRows();
if (!selIndexes.isEmpty())
m_opSettings->setValue(m_ocDemandGroupString, QStringLiteral("ParticipantId"), m_model->getParticipantData(selIndexes.first()).id());
m_opSettings->setValue(m_ocDemandGroupString, QStringLiteral("ParticipantId"), m_model->getParticipantData(selIndexes.first()).id);
else
m_opSettings->setValue(m_ocDemandGroupString, QStringLiteral("ParticipantId"), 0);
@@ -153,12 +154,12 @@ void DemandSituation::onSlotSelectionChanged()
if (!selIndexes.isEmpty())
{
ParticipantManagement::ParticipantData part = m_model->getParticipantData(selIndexes.first());
if (part.equipmentNumber().is_set())
if (part.equipmentNumber.has_value())
{
onClearCoordinate();
m_selectedEqNr = part.equipmentNumber().get();
m_selectedEqNr = part.equipmentNumber.get();
}
else
m_selectedEqNr = 0;
@@ -233,15 +234,15 @@ bool DemandSituation::apply()
bool stopDemand = false;
if (m_ui->dtePos->coordinate().isNull() && m_selectedEqNr == 0)
{
req.radius() = 0;
req.radius = 0;
const Core::GeoPosition2D pos(std::nan(""),std::nan(""));
req.position() = pos;
req.position = pos;
stopDemand = true;
}
else if (m_ui->dtePos->coordinate().x() > 0)
{
const Core::GeoPosition2D pos(m_ui->dtePos->coordinate().x(), m_ui->dtePos->coordinate().y() );
req.position().set(pos);
req.position.set(pos);
}
@@ -268,7 +269,7 @@ void DemandSituation::repaintSitmapCircle()
const auto selIndexes = m_ui->dvParticipants->selectedRows();
if (!selIndexes.isEmpty())
{
m_sitMapGuiIfc->ocSituationRange_create(m_model->getParticipantData(selIndexes.first()).id(), range);
m_sitMapGuiIfc->ocSituationRange_create(m_model->getParticipantData(selIndexes.first()).id, range);
}
else if (!m_ui->dtePos->coordinate().isNull())
{
@@ -107,9 +107,9 @@ bool DemandSituationFilter::apply()
const double posLat = m_opSettings->value(ocDemandGroup, QStringLiteral("PosLat"), -1).toDouble();
const ParticipantManagement::Participant participant = m_ppmDtc->participant(ppId);
int equipNumber = 0;
if(participant.equipmentNumber().is_set())
if(participant.equipmentNumber.has_value())
{
equipNumber= participant.equipmentNumber().get();
equipNumber= participant.equipmentNumber.get();
}
std::vector<int> partyList;
@@ -131,7 +131,7 @@ bool DemandSituationFilter::apply()
if (posLon > 0)
{
const Core::GeoPosition2D pos(posLon, posLat );
req.position().set(pos);
req.position.set(pos);
}
ret = m_requestHelper->startSingleRequest([req, this]()
@@ -156,12 +156,12 @@ void DemandSituationFilter::buildPartyTable(const QMap<int, ParticipantManagemen
for (const ParticipantManagement::Party &party : parties)
{
if(party.id() == 0)
if(party.id == 0)
continue;
QCheckBox *cbParty = new QCheckBox(ParticipantManagement::trPartyName(party.name()), this);
cbParty->setObjectName(QStringLiteral("party_%1").arg(party.id()));
cbParty->setChecked(m_partyList.contains(QString::number(party.id())));
QCheckBox *cbParty = new QCheckBox(ParticipantManagement::trPartyName(party.name), this);
cbParty->setObjectName(QStringLiteral("party_%1").arg(party.id));
cbParty->setChecked(m_partyList.contains(QString::number(party.id)));
connect(cbParty, &QCheckBox::stateChanged, this, &DemandSituationFilter::onPartyBoxChecked);
m_ui->glParty->addWidget(cbParty);
@@ -176,9 +176,9 @@ void DemandSituationFilter::buildTypeClassTable(const std::set<ParticipantManage
{
for (const ParticipantManagement::TypeClass &typeClass : typeClassList)
{
QCheckBox *cb = new QCheckBox(ParticipantManagement::toString(typeClass.underlying()), this);
cb->setObjectName(QStringLiteral("typeClass_%1").arg(typeClass.underlying()));
cb->setChecked(m_typeClassList.contains(QString::number(typeClass.underlying())));
QCheckBox *cb = new QCheckBox(ParticipantManagement::toString(typeClass), this);
cb->setObjectName(QStringLiteral("typeClass_%1").arg(static_cast<int>(typeClass)));
cb->setChecked(m_typeClassList.contains(QString::number(static_cast<int>(typeClass))));
connect(cb, &QCheckBox::stateChanged, this, &DemandSituationFilter::onTypeClassCBoxChecked);
m_ui->glTypeClass->addWidget(cb);
}
@@ -23,6 +23,7 @@ FolderContentEditDialog::FolderContentEditDialog(QWidget *parent)
, m_session(nullptr)
, m_obdFtc(nullptr)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_logger(getLogger("OscFolderContentEditDialog"))
{
m_ui->setupUi(this);
setOnlineHelpFilename(QStringLiteral("OSC-Edit_Folder_Content"));
@@ -25,6 +25,7 @@ EquipPlayer::EquipPlayer(LtsSession::LtsSession *session, QWidget *parent)
, m_ppmDtc(nullptr)
, m_ppmCbxGui(nullptr)
, m_ui(new Ui::EquipPlayer)
, m_logger(getLogger("EquipPlayerDialog"))
{
m_ui->setupUi(this);
@@ -104,12 +105,12 @@ void EquipPlayer::onSlotSelectionChanged()
if (!selIndexes.isEmpty())
{
part = m_model->getParticipantData(selIndexes.first());
ParticipantManagement::Type tp = m_ppmDtc->type(part.typeId());
ParticipantManagement::EquipmentType eq= m_ppmDtc->equipmentType(tp.equipmentTypeId());
m_ui->lblMinEq->setText(QString::number(eq.minEquipNo()));
m_ui->lblMaxEq->setText(QString::number(eq.maxEquipNo()));
ParticipantManagement::Type tp = m_ppmDtc->type(part.typeId);
ParticipantManagement::EquipmentType eq= m_ppmDtc->equipmentType(tp.equipmentTypeId);
m_ui->lblMinEq->setText(QString::number(eq.minEquipNo));
m_ui->lblMaxEq->setText(QString::number(eq.maxEquipNo));
tc = tp.typeClass();
tc = tp.typeClass;
if ( (tc == ParticipantManagement::TypeClass::Human)
|| (tc == ParticipantManagement::TypeClass::GroundVehicle)
@@ -121,8 +122,8 @@ void EquipPlayer::onSlotSelectionChanged()
else
m_isValid = false;
if (part.id())
m_selectedParticipantId = part.id();
if (part.id)
m_selectedParticipantId = part.id;
else
m_selectedParticipantId = -1;
}
@@ -134,8 +135,8 @@ void EquipPlayer::onSlotSelectionChanged()
slotChangesMade();
if (m_selectedParticipantId > 0 && part.equipmentNumber().is_set())
m_ui->leParticipant->setText(QString::number(part.equipmentNumber().get()));
if (m_selectedParticipantId > 0 && part.equipmentNumber.has_value())
m_ui->leParticipant->setText(QString::number(part.equipmentNumber.get()));
else
m_ui->leParticipant->setText(QString::number(0));
@@ -162,8 +163,8 @@ bool EquipPlayer::apply()
if (m_ui->leParticipant->text().toInt() < 0)
return false;
SendEquipmentRegistrationRequest req;
req.equipmentNumber(m_ui->leParticipant->text().toInt());
req.participantId(m_selectedParticipantId);
req.equipmentNumber = m_ui->leParticipant->text().toInt();
req.participantId = m_selectedParticipantId;
bool ret = m_requestHelper->startSingleRequest([req, this]()
{
@@ -172,21 +173,21 @@ bool EquipPlayer::apply()
{
if (m_ppmDtc->participant(m_selectedParticipantId).equipmentNumber().is_set())
if (m_ppmDtc->participant(m_selectedParticipantId).equipmentNumber.has_value())
{
ParticipantManagement::RegisterParticipantRequest req3;
req3.participantId(m_selectedParticipantId);
req3.equipmentNumber(0);
req3.assignState(ParticipantManagement::ParticipantAssignState::NotAssigned);
req3.participantId = m_selectedParticipantId;
req3.equipmentNumber = 0;
req3.assignState = ParticipantManagement::ParticipantAssignState::NotAssigned;
m_requestHelper->startSingleRequest([req3, this]()
{
return m_ppmFtc->registerParticipantRequest(req3, this);
});
}
ParticipantManagement::RegisterParticipantRequest req2;
req2.participantId(m_selectedParticipantId);
req2.equipmentNumber(req.equipmentNumber());
req2.assignState(ParticipantManagement::ParticipantAssignState::HandoutExcon);
req2.participantId = m_selectedParticipantId;
req2.equipmentNumber = req.equipmentNumber;
req2.assignState = ParticipantManagement::ParticipantAssignState::HandoutExcon;
m_requestHelper->startSingleRequest([req2, this]()
{
return m_ppmFtc->registerParticipantRequest(req2, this);
@@ -220,9 +221,9 @@ bool EquipPlayer::checkEqNr()
for (const auto &part : data)
{
if (!part.equipmentNumber().is_set())
if (!part.equipmentNumber.has_value())
continue;
if (part.equipmentNumber().is_set() && part.equipmentNumber().get() == equipNr)
if (part.equipmentNumber.has_value() && part.equipmentNumber.get() == equipNr)
{
m_ui->lblError->setText(tr("Equipment Number already exists!"));
return false;;
@@ -22,6 +22,7 @@ FaultMessage::FaultMessage(LtsSession::LtsSession *session, QWidget *parent)
, m_tabocDtc(nullptr)
, m_ppmCbxGui(nullptr)
, m_ui(new Ui::FaultMessage)
, m_logger(getLogger("FaultMessageDialog"))
{
m_ui->setupUi(this);
m_ui->lblCountMax->setText(QString::number(m_maxChars));
@@ -100,8 +101,8 @@ void FaultMessage::onSlotSelectionChanged()
if (!selIndexes.isEmpty())
{
ParticipantManagement::ParticipantData part = m_model->getParticipantData(selIndexes.first());
if (part.equipmentNumber().is_set())
m_selectedEqNr = part.equipmentNumber().get();
if (part.equipmentNumber.has_value())
m_selectedEqNr = part.equipmentNumber.get();
else
m_selectedEqNr = -1;
}
@@ -185,10 +186,10 @@ bool FaultMessage::apply()
if (m_ui->leParticipant->text().toInt() <= 0)
return false;
SendEquipmentErrorRegistrationRequest req;
req.device(m_ui->leDevice->text().toStdString());
req.faultEquipmentNumber(m_ui->leParticipant->text().toStdString());
req.text(m_ui->teComment->toPlainText().toStdString());
req.ocEquipmentNumber(m_ownEquipmentId);
req.device = m_ui->leDevice->text().toStdString();
req.faultEquipmentNumber = m_ui->leParticipant->text().toStdString();
req.text = m_ui->teComment->toPlainText().toStdString();
req.ocEquipmentNumber = m_ownEquipmentId;
return m_requestHelper->startSingleRequest([req, this]()
{
@@ -201,9 +202,9 @@ void FaultMessage::onSpecificsEquipmentChanged(const TrainingAreaBaseOC::Specifi
if (DataModification::eRemoved == modType)
return;
m_ownEquipmentId = data.equipmentNumber();
m_ownEquipmentId = data.equipmentNumber;
if (m_ownEquipmentId <= 0)
WARNING_LOG(m_logger) << "EquipmentNumber " << data.equipmentNumber() << " is not present ";
WARNING_LOG(m_logger) << "EquipmentNumber " << data.equipmentNumber << " is not present ";
}
}
@@ -246,9 +246,9 @@ void InterfaceImpl::onTimerTick()
partyIds,
typesClass);
if (pos.lat() > 0)
if (pos.lat > 0)
{
req.position().set(pos);
req.position.set(pos);
}
m_requestHelper->startSingleRequest([req, this]()
@@ -268,7 +268,7 @@ void InterfaceImpl::onNoDataTimerTick()
void InterfaceImpl::onParticipantDynamic(const ParticipantManagement::DynamicParticipantData &data)
{
if (m_dtcPpm->participant(data.participantId()).equipmentNumber() == m_dtcTab->specificsEquipment(1).equipmentNumber())
if (m_dtcPpm->participant(data.participantId).equipmentNumber == m_dtcTab->specificsEquipment(1).equipmentNumber)
return;
onParticipantData();
}
@@ -276,7 +276,7 @@ void InterfaceImpl::onParticipantDynamic(const ParticipantManagement::DynamicPar
void InterfaceImpl::onParticipantPosition(const ParticipantManagement::ParticipantPosition &data)
{
if (m_dtcPpm->participant(data.participantId()).equipmentNumber() == m_dtcTab->specificsEquipment(1).equipmentNumber())
if (m_dtcPpm->participant(data.participantId).equipmentNumber == m_dtcTab->specificsEquipment(1).equipmentNumber)
return;
onParticipantData();
}
@@ -285,7 +285,7 @@ void InterfaceImpl::onCentralAesOverloadChanged(const TrainingAreaBaseOC::Centra
{
Q_UNUSED(modType)
m_hasCentralAesOverload = data.hasOverload();
m_hasCentralAesOverload = data.hasOverload;
setShortcutDemandSituationIconData();
@@ -296,7 +296,7 @@ void InterfaceImpl::onParticipantsOverloadChanged(const TrainingAreaBaseOC::Part
{
Q_UNUSED(modType)
m_hasParticipantOverload = data.hasOverload();
m_hasParticipantOverload = data.hasOverload;
setShortcutDemandSituationIconData();
@@ -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());
}
@@ -14,6 +14,7 @@ CloseAesList::CloseAesList(LtsSession::LtsSession *session, QWidget *parent)
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::CloseOnly)
, m_model(new AesListModel(session, this))
, m_ui(new Ui::CloseAesList)
, m_logger(getLogger("CloseAesList"))
{
m_ui->setupUi(this);
m_ui->aesList->setModel(m_model);
@@ -19,6 +19,7 @@ AesListModel::AesListModel(LtsSession::LtsSession *session, QObject *parent)
}
, parent)
, m_session(session)
, m_logger(getLogger("AesListModel"))
{
m_session->getDtc<AreaEffectSimulation::DataInterface>(m_aesDtc);
@@ -51,24 +52,24 @@ QVariant AesListModel::data(const QModelIndex &index, int role) const
const AreaEffectSimulation::AesItemView &view = m_aesDtc.get()->aesItemView(m_vecData.at(index.row()));
if (view.id() == 0)
if (view.id == 0)
return QVariant();
AreaEffectSimulation::AesItem aesItem;
m_aesDtc->aesItemFromId(view.aesItemId(), aesItem);
if (aesItem.id() < 0)
m_aesDtc->aesItemFromId(view.aesItemId, aesItem);
if (aesItem.id < 0)
return QVariant();
switch (index.column())
{
case Columns::Id:
return aesItem.id();
return aesItem.id;
case Columns::Name:
return QString::fromStdString(aesItem.name());
return QString::fromStdString(aesItem.name);
case Columns::AesType:
return m_pdmDtc->trChargeTypeShortName(aesItem.chargeStruct().chargeTypeId(), true);
return m_pdmDtc->trChargeTypeShortName(aesItem.chargeStruct.chargeTypeId, true);
case Columns::Party:
return aesItem.partyId().is_set() ? ParticipantManagement::trPartyName(m_ppmDtc->party(aesItem.partyId().get()).name()) : QObject::tr("---");
return aesItem.partyId.has_value() ? ParticipantManagement::trPartyName(m_ppmDtc->party(aesItem.partyId.get()).name) : QObject::tr("---");
default:
return QVariant();
break;
@@ -20,6 +20,7 @@ SelfTest::SelfTest(LtsSession::LtsSession *session, QWidget *parent)
, m_tabocDtc(nullptr)
, m_escDtc(nullptr)
, m_ui(new Ui::SelfTest)
, m_logger(getLogger("SelfTestDialog"))
{
m_ui->setupUi(this);
@@ -140,12 +141,12 @@ void SelfTest::onSfmStatusChanged(const TrainingAreaBaseOC::TechnicalStateSfm &d
{
Q_UNUSED(modType)
m_ui->leRadio->setText(data.radioAvailable() ? tr("Available") : tr("Not Available"));
m_ui->leLicense->setText(data.licensed() ? tr("Yes") : tr("No"));
m_ui->leSfm->setText(data.sfmConnected() ? tr("Connected") : tr("Not Connected"));
m_ui->leSfmMani->setText(data.manipulationSfm() ? tr("Yes") : tr("No"));
m_ui->leEquipmentMani->setText(data.manipulationEquipment() ? tr("Yes") : tr("No"));
m_ui->lblErrorCodes->setText(data.errorCode() > 0 ? getTechStatError(data.errorCode()) : QLatin1String(""));
m_ui->leRadio->setText(data.radioAvailable ? tr("Available") : tr("Not Available"));
m_ui->leLicense->setText(data.licensed ? tr("Yes") : tr("No"));
m_ui->leSfm->setText(data.sfmConnected ? tr("Connected") : tr("Not Connected"));
m_ui->leSfmMani->setText(data.manipulationSfm ? tr("Yes") : tr("No"));
m_ui->leEquipmentMani->setText(data.manipulationEquipment ? tr("Yes") : tr("No"));
m_ui->lblErrorCodes->setText(data.errorCode > 0 ? getTechStatError(data.errorCode) : QLatin1String(""));
onStatusHDD();
}
@@ -155,18 +156,18 @@ void SelfTest::onEscOperationConditionChanged(const EffectShowClient::OperatingC
Q_UNUSED(modType)
QString feature = tr("Effect Show Connected: ");
switch (data.vehicleFeature().underlying())
switch (static_cast<int>(data.vehicleFeature))
{
case EffectShowManagement::Feature_e::Smoke:
case static_cast<int>(EffectShowManagement::Feature_e::Smoke):
feature += tr("Smoke");
break;
case EffectShowManagement::Feature_e::Explosion24:
case static_cast<int>(EffectShowManagement::Feature_e::Explosion24):
feature += tr("Explosion (24)");
break;
case EffectShowManagement::Feature_e::Explosion48:
case static_cast<int>(EffectShowManagement::Feature_e::Explosion48):
feature += tr("Explosion (48)");
break;
case EffectShowManagement::Feature_e::NotSpecified:
case static_cast<int>(EffectShowManagement::Feature_e::NotSpecified):
feature.clear();
break;
}
@@ -9,6 +9,7 @@
#include <SituationMapPlugin/situation_map_gui_plugin_interface.h>
#include <PluginInterfaces/gui_plugin_interface.h>
#include <QtCore/QDebug>
#include <QAudioOutput>
namespace OcSituationClient
{
@@ -68,8 +69,8 @@ Settings::Settings(LtsSession::LtsSession *session, QWidget *parent)
loadOperatorSettings();
m_mediaplayer->setMedia(QUrl(QLatin1String("qrc:/beep.wav")));
m_mediaplayer->setVolume(100);
m_mediaplayer->setSource(QUrl(QLatin1String("qrc:/beep.wav")));
m_mediaplayer->audioOutput()->setVolume(1.0f);
setOnlineHelpFilename(QStringLiteral("OC-Settings"));
}
@@ -51,7 +51,7 @@ private Q_SLOTS:
void onResetRange();
void onSoundCheck();
private:
NGL::INGLLogger &m_logger;
//NGL::INGLLogger &m_logger;
void loadOperatorSettings();
void retranslate() override;
bool apply() override;
@@ -15,9 +15,6 @@
#include <LtsUtilsSettings/settings.h>
#include <QNetworkSession>
#include <QNetworkConfigurationManager>
#include <QNetworkConfiguration>
#include <QtCore/QTimer>
#include <QtGui/QPolygonF>
#include <LtsCoordTrans/lts_coord_trans.h>
@@ -153,9 +150,9 @@ void InterfaceImpl::onEnterLeaveAesChanged(const TrainingAreaBaseOC::EnterLeaveA
if (playSound)
{
DEBUG_LOG(m_logger) << "Got new ENterLeave event and play sound";
if (data.cAreaType())
if (data.cAreaType)
{
if(data.aesEntered())
if(data.aesEntered)
{
m_enterSound.play();
}
@@ -163,11 +160,11 @@ void InterfaceImpl::onEnterLeaveAesChanged(const TrainingAreaBaseOC::EnterLeaveA
{
m_leaveSound.play();
}
DEBUG_LOG(m_logger) << "enter leave direvly " << data.aesEntered();
DEBUG_LOG(m_logger) << "enter leave direvly " << data.aesEntered;
}
else
{
if (data.aesEntered())
if (data.aesEntered)
{
m_nearInSound.play();
}
@@ -175,11 +172,11 @@ void InterfaceImpl::onEnterLeaveAesChanged(const TrainingAreaBaseOC::EnterLeaveA
{
m_nearOutSound.play();
}
DEBUG_LOG(m_logger) << "enter leave near " << data.aesEntered();
DEBUG_LOG(m_logger) << "enter leave near " << data.aesEntered;
}
}
if (data.aesEntered() && LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("ObserverController"), QStringLiteral("VisualWarning"), false).toBool() )
if (data.aesEntered && LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("ObserverController"), QStringLiteral("VisualWarning"), false).toBool() )
{
bool bWidgetExists = m_session->widgetExists(menuGroup(), m_closeAreaIdentifier, LtsWidgets::LayoutArea::eDialogTab);
if (!bWidgetExists)
@@ -205,7 +202,7 @@ void InterfaceImpl::onCheckAllEffectAreas()
circle << QPointF(cos(angle) * radius, sin(angle) * radius);
}
LtsCoordTrans::UtmCoordinate posUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(pos.position().lon(), pos.position().lat());
LtsCoordTrans::UtmCoordinate posUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(pos.position.lon, pos.position.lat);
int zone = posUtm.zone;
circle << circle.value(0);
circle.translate(posUtm.x, posUtm.y);
@@ -222,34 +219,34 @@ void InterfaceImpl::onCheckAllEffectAreas()
for(const AreaEffectSimulation::AesItemView &view: std::as_const(views))
{
if (view.aesTypeId() == AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions
|| view.aesTypeId() == AreaEffectSimulation::AesType::AtMineAreaSingleMines
|| view.aesTypeId() == AreaEffectSimulation::AesType::AtTechnicalArea )
if (view.aesTypeId == AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions
|| view.aesTypeId == AreaEffectSimulation::AesType::AtMineAreaSingleMines
|| view.aesTypeId == AreaEffectSimulation::AesType::AtTechnicalArea )
continue;
bool contains = m_closeAes.contains(view.id());
bool contains = m_closeAes.contains(view.id);
if (m_closeAes.contains(view.id()) && view.effectStateId() != AreaEffectSimulation::AesEffectState::EsActivated)
if (m_closeAes.contains(view.id) && view.effectStateId != AreaEffectSimulation::AesEffectState::EsActivated)
{
DEBUG_LOG(m_logger) << "outdatet " ;
m_closeAes.remove(view.id());
elAes.aesEntered(false);
m_closeAes.remove(view.id);
elAes.aesEntered = false;
}
else if (view.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated)
else if (view.effectStateId == AreaEffectSimulation::AesEffectState::EsActivated)
{
QPolygonF poly(view.form().size());
QPolygonF poly(view.form.size());
int i=0;
for(const auto &point : view.form())
for(const auto &point : view.form)
{
poly[i++] = QPointF(point.lon(), point.lat());
poly[i++] = QPointF(point.lon, point.lat);
}
#if QT_VERSION < QT_VERSION_CHECK(5,10,0)
bool inters = poly.intersected(circleLonLat).size() > 0;
#else
bool inters = poly.intersects(circleLonLat);
#endif
DEBUG_LOG(m_logger) << "active " << view.id() << " intersect=" << inters << " inside map=" << contains ;
DEBUG_LOG(m_logger) << "active " << view.id << " intersect=" << inters << " inside map=" << contains ;
if (inters && contains)
{
@@ -261,16 +258,16 @@ void InterfaceImpl::onCheckAllEffectAreas()
DEBUG_LOG(m_logger) << "is new inside" ;
m_closeAes.insert(view.id());
elAes.aesEntered(true);
m_closeAes.insert(view.id);
elAes.aesEntered = true;
}
else if (!inters && contains)
{
DEBUG_LOG(m_logger) << "now outside" ;
m_closeAes.remove(view.id());
elAes.aesEntered(false);
m_closeAes.remove(view.id);
elAes.aesEntered = false;
}
else
{
@@ -280,12 +277,12 @@ void InterfaceImpl::onCheckAllEffectAreas()
}
else
{
DEBUG_LOG(m_logger) << "missed " << view.id() << " ";
DEBUG_LOG(m_logger) << "missed " << view.id << " ";
continue;
}
elAes.aesId(view.aesItemId());
elAes.chargeTypeId(view.chargeStruct().chargeTypeId());
elAes.aesId = view.aesItemId;
elAes.chargeTypeId = view.chargeStruct.chargeTypeId;
onEnterLeaveAesChanged(elAes,DataModification::eModified);