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

@@ -7,6 +7,7 @@
#include <PluginInterfaces/gui_plugin_interface.h>
#include <ParticipantManagement/ppm.hpp>
#include <ParticipantManagement/ppm_dtc.h>
#include <ParticipantManagement/ppm_ftc.h>
#include <CentralEffectSimulation/ces_dtc.h>
@@ -10,6 +10,7 @@
#include <LtsSession/lts_session_data.h>
#include <LtsWidgets/lts_message_dialog.h>
#include <ParticipantManagement/ppm.hpp>
#include <ParticipantManagement/ppm_dtc.h>
#include <ParticipantManagement/ppm_gui_combobox_plugin_interface.h>
#include <ParticipantManagement/ppm_translation.h>
#include <PluginInterfaces/gui_plugin_interface.h>
@@ -28,6 +29,7 @@ ParticipantMoveDialog::ParticipantMoveDialog(QWidget* parent)
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel), m_ftc(nullptr),
m_sitMapGuiIfc(nullptr), m_ui(new Ui::WaypointsEdit), m_id(0), m_requestHelper(new LtsUtils::RequestHelper(this)),
m_polyline(QPolygonF())
, m_logger(getLogger("ParticipantMoveDialog"))
{
m_ui->setupUi(this);
m_ui->cbJump->hide();
@@ -44,7 +46,7 @@ ParticipantMoveDialog::~ParticipantMoveDialog()
{
m_sitMapGuiIfc = nullptr;
delete m_ui;
emit closeDialog(m_participantData.id());
emit closeDialog(m_participantData.id);
}
void ParticipantMoveDialog::enableUiElements(bool enable)
@@ -80,10 +82,10 @@ bool ParticipantMoveDialog::init(LtsSession::LtsSessionDataDds* session,
m_ui->dteStartTime->setMinimumTimeMSec(m_session->partitionTime());
m_ui->dteStartTime->setRetrieveCurrentTimeCallback([this]() { return m_session->partitionTime(); });
m_ui->lbIdentifier->setText(QString::fromStdString(data.tacticalIdentifier()));
QString partyStr = ParticipantManagement::trPartyName(ppmDtc->party(m_participantData.partyId()).name());
m_ui->lbIdentifier->setText(QString::fromStdString(data.tacticalIdentifier));
QString partyStr = ParticipantManagement::trPartyName(ppmDtc->party(m_participantData.partyId).name);
m_ui->lbParty->setText(partyStr);
QString typeStr = ParticipantManagement::trTypeName(ppmDtc->type(m_participantData.typeId()).name());
QString typeStr = ParticipantManagement::trTypeName(ppmDtc->type(m_participantData.typeId).name);
m_ui->lbType->setText(typeStr);
enableUiElements(true);
@@ -113,25 +115,25 @@ bool ParticipantMoveDialog::init(LtsSession::LtsSessionDataDds* session,
void ParticipantMoveDialog::onSimulatedMovementChanged(const CentralEffectSimulation::SimulatedMovement& data,
DataModification modType)
{
if (modType == DataModification::eRemoved || m_participantData.id() != data.participantId())
if (modType == DataModification::eRemoved || m_participantData.id != data.participantId)
return;
INFO_LOG(m_logger) << "onSimulatedMovementChanged";
clearContent();
m_id = data.id();
m_ui->lePrefix->setText(QString::fromStdString(data.name()));
m_ui->cbRepeat->setChecked(data.repeat());
m_ui->cbJump->setChecked(data.jumpToStart());
m_ui->dteStartTime->setMsecsSinceEpoch(data.startTime());
m_id = data.id;
m_ui->lePrefix->setText(QString::fromStdString(data.name));
m_ui->cbRepeat->setChecked(data.repeat);
m_ui->cbJump->setChecked(data.jumpToStart);
m_ui->dteStartTime->setMsecsSinceEpoch(data.startTime);
m_polyline.clear();
for (const SimulatedMovementSegment& segment : data.segments())
for (const SimulatedMovementSegment& segment : data.segments)
{
const Core::GeoPosition2D& pointDds = segment.position();
insertPos(pointDds.lon(), pointDds.lat(), QString::fromStdString(segment.name()), segment.delay(),
segment.speed());
m_polyline.push_back(QPointF(pointDds.lon(), pointDds.lat()));
const Core::GeoPosition2D& pointDds = segment.position;
insertPos(pointDds.lon, pointDds.lat, QString::fromStdString(segment.name), segment.delay,
segment.speed);
m_polyline.push_back(QPointF(pointDds.lon, pointDds.lat));
}
if (this->amIFocused())
@@ -168,7 +170,7 @@ void ParticipantMoveDialog::onSimulatedMovementModifyReply(const Core::FunctionR
void ParticipantMoveDialog::retranslate()
{
translate(m_ui, QString::fromStdString(m_participantData.tacticalIdentifier()), false, tr("Waypoints"));
translate(m_ui, QString::fromStdString(m_participantData.tacticalIdentifier), false, tr("Waypoints"));
DEBUG_LOG(m_logger) << "retranslate";
}
@@ -299,7 +301,7 @@ SimulatedMovement ParticipantMoveDialog::requestContent() const
int32_t jumpToStart = true;
rti::core::int64 startTime = m_ui->dteStartTime->msecsSinceEpoch();
int32_t participantId = m_participantData.id();
int32_t participantId = m_participantData.id;
int32_t nextPoint = 0;
int cntSegments = m_ui->tableWidget->rowCount();
@@ -309,21 +311,21 @@ SimulatedMovement ParticipantMoveDialog::requestContent() const
{
QWidget* widget = m_ui->tableWidget->cellWidget(i, Name);
const QString nameSeg = static_cast<QLineEdit*>(widget)->text();
segments[i].name(nameSeg.toStdString());
segments[i].name = nameSeg.toStdString();
widget = m_ui->tableWidget->cellWidget(i, IdleTime);
const int idleTime = static_cast<QSpinBox*>(widget)->value() * s_timeMilliConversion;
segments[i].delay(idleTime);
segments[i].delay = idleTime;
widget = m_ui->tableWidget->cellWidget(i, Speed);
const double speed = static_cast<QSpinBox*>(widget)->value() / s_msConversion;
segments[i].speed(speed);
segments[i].speed = speed;
widget = m_ui->tableWidget->cellWidget(i, Position);
const QPointF point = static_cast<LtsCoordWidget::LtsCoordWidget*>(widget)->coordinate();
const Core::GeoPosition2D pos(Core::GeoPosition2D(point.x(), point.y()));
segments[i].position(pos);
segments[i].position = pos;
}
return SimulatedMovement(m_id, name, startTime, participantId, segments, repeat, jumpToStart, nextPoint);
@@ -362,23 +364,23 @@ QByteArray ParticipantMoveDialog::simulatedMovementToJson() const
QJsonObject obj;
obj[QStringLiteral("XmlType")] = FileManagement::toString(FileManagement::XmlType::CESParticipantMove);
obj[QStringLiteral("id")] = req.id();
obj[QStringLiteral("jumpToStart")] = req.jumpToStart();
obj[QStringLiteral("name")] = QString::fromStdString(req.name());
obj[QStringLiteral("nextPoint")] = req.nextPoint();
obj[QStringLiteral("participantId")] = req.participantId();
obj[QStringLiteral("repeat")] = req.repeat();
obj[QStringLiteral("startTime")] = req.startTime();
obj[QStringLiteral("id")] = req.id;
obj[QStringLiteral("jumpToStart")] = req.jumpToStart;
obj[QStringLiteral("name")] = QString::fromStdString(req.name);
obj[QStringLiteral("nextPoint")] = req.nextPoint;
obj[QStringLiteral("participantId")] = req.participantId;
obj[QStringLiteral("repeat")] = req.repeat;
obj[QStringLiteral("startTime")] = static_cast<double>(req.startTime);
QJsonArray arr;
for (auto it = req.segments().begin(); it != req.segments().end(); ++it)
for (auto it = req.segments.begin(); it != req.segments.end(); ++it)
{
QJsonObject inner;
inner[QStringLiteral("delay")] = it->delay();
inner[QStringLiteral("name")] = QString::fromStdString(it->name());
inner[QStringLiteral("speed")] = it->speed();
inner[QStringLiteral("lat")] = it->position().lat();
inner[QStringLiteral("lon")] = it->position().lon();
inner[QStringLiteral("delay")] = it->delay;
inner[QStringLiteral("name")] = QString::fromStdString(it->name);
inner[QStringLiteral("speed")] = it->speed;
inner[QStringLiteral("lat")] = it->position.lat;
inner[QStringLiteral("lon")] = it->position.lon;
arr += inner;
}
obj[QStringLiteral("segments")] = arr;
@@ -394,27 +396,27 @@ SimulatedMovement ParticipantMoveDialog::jsonToSimulatedMovement(const QByteArra
const QJsonDocument doc(QJsonDocument::fromJson(content));
const QJsonObject obj(doc.object());
result.id(obj[QStringLiteral("id")].toInt());
result.jumpToStart(obj[QStringLiteral("jumpToStart")].toInt());
result.name(obj[QStringLiteral("name")].toString().toStdString());
result.nextPoint(obj[QStringLiteral("nextPoint")].toInt());
result.participantId(m_participantData.id());
result.repeat(obj[QStringLiteral("repeat")].toInt());
result.startTime(obj[QStringLiteral("startTime")].toDouble());
result.id = obj[QStringLiteral("id")].toInt();
result.jumpToStart = obj[QStringLiteral("jumpToStart")].toInt();
result.name = obj[QStringLiteral("name")].toString().toStdString();
result.nextPoint = obj[QStringLiteral("nextPoint")].toInt();
result.participantId = m_participantData.id;
result.repeat = obj[QStringLiteral("repeat")].toInt();
result.startTime = obj[QStringLiteral("startTime")].toDouble();
const QJsonArray arr(obj.value(QStringLiteral("segments")).toArray());
auto& segments = result.segments();
auto& segments = result.segments;
segments.resize(arr.size());
for (int i = 0; i < arr.size(); ++i)
{
CentralEffectSimulation::SimulatedMovementSegment& segment = segments[i];
const QJsonObject objArr(arr.at(i).toObject());
segment.delay(objArr[QStringLiteral("delay")].toDouble());
segment.name(objArr[QStringLiteral("name")].toString().toStdString());
segment.delay = objArr[QStringLiteral("delay")].toDouble();
segment.name = objArr[QStringLiteral("name")].toString().toStdString();
segment.position().lat(objArr[QStringLiteral("lat")].toDouble());
segment.position().lon(objArr[QStringLiteral("lon")].toDouble());
segment.speed(objArr[QStringLiteral("speed")].toDouble());
segment.position.lat = objArr[QStringLiteral("lat")].toDouble();
segment.position.lon = objArr[QStringLiteral("lon")].toDouble();
segment.speed = objArr[QStringLiteral("speed")].toDouble();
}
return result;
}
@@ -16,6 +16,7 @@
#include <ParticipantManagement/ppm.hpp>
#include <ParticipantManagement/ppm_dtc.h>
#include <CentralEffectSimulation/ces_dtc.h>
#include "logger.h"
@@ -32,6 +32,7 @@ ParticipantsMoveDialog::ParticipantsMoveDialog(const QString& menuGroup, QWidget
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::CloseOnly), m_participantModel(nullptr),
m_ppmDtc(nullptr), m_ppmCbxIfc(nullptr), m_ftc(nullptr), m_ui(new Ui::ParticipantMoveDialog), m_session(nullptr),
m_menuGroup(menuGroup), m_requestHelper(new LtsUtils::RequestHelper(this)), m_sitMapGuiIfc(nullptr)
, m_logger(getLogger("ParticipantsMoveDialog"))
{
m_ui->setupUi(this);
setUnchangeable();
@@ -121,10 +122,10 @@ bool ParticipantsMoveDialog::init(LtsSession::LtsSession* session,
return false;
const ExerciseManagement::Exercise exc = exmDtc->exercise(m_session->exerciseId());
AssetManagement::TrainingArea ta = asmDtc->trainingArea(exc.trainingAreaId());
if (ta.id() != exc.trainingAreaId())
AssetManagement::TrainingArea ta = asmDtc->trainingArea(exc.trainingAreaId);
if (ta.id != exc.trainingAreaId)
{
ERROR_LOG(m_logger) << " couldn't get Training Area with id: " << exc.trainingAreaId();
ERROR_LOG(m_logger) << " couldn't get Training Area with id: " << exc.trainingAreaId;
return false;
}
@@ -135,8 +136,8 @@ bool ParticipantsMoveDialog::init(LtsSession::LtsSession* session,
}
const LtsCoordTrans::UtmCoordinate& bottomLeft =
LtsCoordTrans::UtmCoordinate::fromGeographic(ta.bottomLeft().lon(), ta.bottomLeft().lat());
m_trainingAreaRect = QRectF(bottomLeft.geographic(0, ta.height()), bottomLeft.geographic(ta.width(), 0));
LtsCoordTrans::UtmCoordinate::fromGeographic(ta.bottomLeft.lon, ta.bottomLeft.lat);
m_trainingAreaRect = QRectF(bottomLeft.geographic(0, ta.height), bottomLeft.geographic(ta.width, 0));
m_ppmDtc->enableUnitPosition();
m_ppmDtc->waitForHistoricalDataUnitPosition(1000);
@@ -196,11 +197,11 @@ void ParticipantsMoveDialog::onSelectionChanged()
return;
const ParticipantManagement::ParticipantData data(participantFromIndex(indexList.first()));
DEBUG_LOG(m_logger) << "ParticipantId: " << data.id();
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Remove, data.isSimulated());
DEBUG_LOG(m_logger) << "ParticipantId: " << data.id;
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Remove, data.isSimulated);
if (data.isSimulated() && m_participantDialogMap.contains(data.id()))
m_participantDialogMap.value(data.id())->showPreview(true);
if (data.isSimulated && m_participantDialogMap.contains(data.id))
m_participantDialogMap.value(data.id)->showPreview(true);
else
{
@@ -217,19 +218,19 @@ void ParticipantsMoveDialog::onSelectionChanged()
bool isParticipantInUseOrAdler = participantInUse4ExplosionCluster(indexList.first());
if (!isParticipantInUseOrAdler)
isParticipantInUseOrAdler = (m_ppmDtc->isAdlerType(data.typeId()) && !data.name().empty());
isParticipantInUseOrAdler = (m_ppmDtc->isAdlerType(data.typeId) && !data.name.empty());
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Add, isOne && !isParticipantInUseOrAdler);
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Save, isOne && !isParticipantInUseOrAdler);
}
if (m_ppmDtc->type(data.typeId()).typeClass() != ParticipantManagement::TypeClass::Unit)
if (m_ppmDtc->type(data.typeId).typeClass != ParticipantManagement::TypeClass::Unit)
{
if (!data.equipmentNumber().is_set() || data.equipmentNumber().get() <= 0)
if (!data.equipmentNumber.has_value() || data.equipmentNumber.get() <= 0)
{
isOne &= !(m_ppmDtc->isAdlerType(data.typeId()) && !data.name().empty());
isOne &= !(m_ppmDtc->isAdlerType(data.typeId) && !data.name.empty());
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Edit, isOne);
}
else
@@ -265,19 +266,19 @@ void ParticipantsMoveDialog::onDoubleClicked()
return;
const ParticipantManagement::ParticipantData data(participantFromIndex(indexList.first()));
DEBUG_LOG(m_logger) << "ParticipantId: " << data.id();
DEBUG_LOG(m_logger) << "ParticipantId: " << data.id;
if (!m_participantDialogMap.contains(data.id()))
if (!m_participantDialogMap.contains(data.id))
{
ParticipantMoveDialog* dialog = new ParticipantMoveDialog(this);
m_participantDialogMap.insert(data.id(), dialog);
m_participantDialogMap.insert(data.id, dialog);
connect(dialog, &ParticipantMoveDialog::closeDialog, this, &ParticipantsMoveDialog::closeDialogReceived);
addDialog(LtsWidgets::initDialog(dialog, m_session, m_ppmDtc, m_cesDtc, data), m_menuGroup,
QStringLiteral("cesNewSimulation%1").arg(data.id()), LtsWidgets::LayoutArea::eDialogTab);
QStringLiteral("cesNewSimulation%1").arg(data.id), LtsWidgets::LayoutArea::eDialogTab);
}
else
focusDialog(m_menuGroup, QStringLiteral("cesNewSimulation%1").arg(data.id()),
focusDialog(m_menuGroup, QStringLiteral("cesNewSimulation%1").arg(data.id),
LtsWidgets::LayoutArea::eDialogTab);
}
@@ -317,12 +318,12 @@ void ParticipantsMoveDialog::onRemove()
return;
const ParticipantManagement::ParticipantData data(participantFromIndex(indexList.first()));
INFO_LOG(m_logger) << "onRemove ParticipantId: " << data.id();
INFO_LOG(m_logger) << "onRemove ParticipantId: " << data.id;
delete m_participantDialogMap.value(data.id());
m_participantDialogMap.remove(data.id());
delete m_participantDialogMap.value(data.id);
m_participantDialogMap.remove(data.id);
removeFtc(data.id());
removeFtc(data.id);
}
void ParticipantsMoveDialog::onSetSimulatedMGRSPosition()
@@ -348,23 +349,23 @@ bool ParticipantsMoveDialog::participantInUse4ExplosionCluster(const QModelIndex
const ParticipantManagement::ParticipantData participantData(participantFromIndex(participantIndex));
bool bret = false;
const ParticipantManagement::Type& participantType = m_ppmDtc->type(participantData.typeId());
bool isUnitType = (participantType.typeClass() == ParticipantManagement::TypeClass::Unit) ||
(participantType.typeClass() == ParticipantManagement::TypeClass::SupportUnit);
const ParticipantManagement::Type& participantType = m_ppmDtc->type(participantData.typeId);
bool isUnitType = (participantType.typeClass == ParticipantManagement::TypeClass::Unit) ||
(participantType.typeClass == ParticipantManagement::TypeClass::SupportUnit);
if (!isUnitType)
{
const QModelIndex parentIndex = m_participantModel->indexFromParticipantId(participantData.superiorModId());
const QModelIndex parentIndex = m_participantModel->indexFromParticipantId(participantData.superiorModId);
const ParticipantManagement::ParticipantData parentParticipantData(participantFromIndex(parentIndex));
const ParticipantManagement::Type& partentParticipantType = m_ppmDtc->type(parentParticipantData.typeId());
isUnitType = (partentParticipantType.typeClass() == ParticipantManagement::TypeClass::Unit) ||
(partentParticipantType.typeClass() == ParticipantManagement::TypeClass::SupportUnit);
bret = isUnitType && isParticipantInUseForExplosionCluster(parentParticipantData.id());
const ParticipantManagement::Type& partentParticipantType = m_ppmDtc->type(parentParticipantData.typeId);
isUnitType = (partentParticipantType.typeClass == ParticipantManagement::TypeClass::Unit) ||
(partentParticipantType.typeClass == ParticipantManagement::TypeClass::SupportUnit);
bret = isUnitType && isParticipantInUseForExplosionCluster(parentParticipantData.id);
;
}
else
bret = isParticipantInUseForExplosionCluster(participantData.id());
bret = isParticipantInUseForExplosionCluster(participantData.id);
return bret;
}
@@ -409,17 +410,17 @@ void ParticipantsMoveDialog::onGetCoordinate(QPointF coordinate)
const ParticipantManagement::ParticipantData participantData(participantFromIndex(indexList.first()));
INFO_LOG(m_logger) << Q_FUNC_INFO << "ParticipantId=" << participantData.id()
<< " EquipmentNr=" << participantData.equipmentNumber()
INFO_LOG(m_logger) << Q_FUNC_INFO << "ParticipantId=" << participantData.id
<< " EquipmentNr=" << participantData.equipmentNumber
<< " onGetCoordinate x=" << coordinate.x() << " y=" << coordinate.y();
if (participantData.id() <= 0)
if (participantData.id <= 0)
return;
const ParticipantManagement::Type& participantType = m_ppmDtc->type(participantData.typeId());
const bool& isUnitType = (participantType.typeClass() == ParticipantManagement::TypeClass::Unit) ||
(participantType.typeClass() == ParticipantManagement::TypeClass::SupportUnit);
const ParticipantManagement::Type& participantType = m_ppmDtc->type(participantData.typeId);
const bool& isUnitType = (participantType.typeClass == ParticipantManagement::TypeClass::Unit) ||
(participantType.typeClass == ParticipantManagement::TypeClass::SupportUnit);
m_formationProps.setFormation(QString::fromStdString(participantType.properties()));
m_formationProps.setFormation(QString::fromStdString(participantType.properties));
const bool& withFormation = (isUnitType && m_formationProps.isArtillery);
if (withFormation || m_mgrsPosEditCoordinateActive)
setFormationAndPositioningUi(participantData, coordinate, withFormation);
@@ -481,8 +482,8 @@ bool ParticipantsMoveDialog::isParticipantInUseForExplosionCluster(int id)
const QMap<qint32, AreaEffectSimulation::ExplosionCluster>& ecMap = m_aesDtc->explosionClusters();
for (const AreaEffectSimulation::ExplosionCluster& aes : std::as_const(ecMap))
{
if (aes.participantId() == id && (aes.effectStateId() == AreaEffectSimulation::AesEffectState::EsPrepared ||
aes.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated))
if (aes.participantId == id && (aes.effectStateId == AreaEffectSimulation::AesEffectState::EsPrepared ||
aes.effectStateId == AreaEffectSimulation::AesEffectState::EsActivated))
return true;
}
return false;
@@ -500,11 +501,11 @@ void ParticipantsMoveDialog::setFormationAndPositioningUi(const ParticipantManag
if (!unitWithFormation && !m_mgrsPosEditCoordinateActive)
return;
const ParticipantManagement::Type& participantType = m_ppmDtc->type(participantData.typeId());
const bool isUnitType = (participantType.typeClass() == ParticipantManagement::TypeClass::Unit) ||
(participantType.typeClass() == ParticipantManagement::TypeClass::SupportUnit);
const ParticipantManagement::Type& participantType = m_ppmDtc->type(participantData.typeId);
const bool isUnitType = (participantType.typeClass == ParticipantManagement::TypeClass::Unit) ||
(participantType.typeClass == ParticipantManagement::TypeClass::SupportUnit);
m_formationProps.setFormation(QString::fromStdString(participantType.properties()));
m_formationProps.setFormation(QString::fromStdString(participantType.properties));
if (m_formationProps.hasFormationData())
return;
@@ -688,7 +689,7 @@ bool ParticipantsMoveDialog::getUnitPosition(int32_t participantId, Core::GeoPos
FilterManagement::SymbolAppearanceSettings::UnitSymbolPosition usp = settings.symbolSettings.unitSymbolPosition;
ParticipantManagement::UnitPosition up = m_ppmDtc->unitPosition(participantId);
if (up.participantId() != participantId)
if (up.participantId != participantId)
{
ERROR_LOG(m_logger) << Q_FUNC_INFO << ", unitPosition failed for participantId=" << participantId;
return false;
@@ -697,11 +698,11 @@ bool ParticipantsMoveDialog::getUnitPosition(int32_t participantId, Core::GeoPos
switch (usp)
{
case FilterManagement::SymbolAppearanceSettings::UnitSymbolPosition::Center:
unitPositionOut = up.positionCenter();
unitPositionOut = up.positionCenter;
return true;
break;
case FilterManagement::SymbolAppearanceSettings::UnitSymbolPosition::Leader:
unitPositionOut = up.positionLeader();
unitPositionOut = up.positionLeader;
return true;
break;
}
@@ -713,7 +714,7 @@ void ParticipantsMoveDialog::doSetSimulatedPositionRequest(
const ParticipantManagement::ParticipantData& participantData, const QPointF& coordinate)
{
const int participantId = participantData.id();
const int participantId = participantData.id;
if (participantId <= 0)
return;
@@ -721,20 +722,20 @@ void ParticipantsMoveDialog::doSetSimulatedPositionRequest(
bool bAll = m_ui->cbAll->isChecked();
bool bAskOutdated = true;
if (bAll)
req.participantId(-1);
req.participantId = -1;
else
{
const ParticipantManagement::TypeClass tc = m_ppmDtc->type(participantData.typeId()).typeClass();
const ParticipantManagement::TypeClass tc = m_ppmDtc->type(participantData.typeId).typeClass;
DEBUG_LOG(m_logger) << "ParticipantId=" << participantData.id()
<< " EquipmentNr=" << participantData.equipmentNumber()
DEBUG_LOG(m_logger) << "ParticipantId=" << participantData.id
<< " EquipmentNr=" << participantData.equipmentNumber
<< " onGetCoordinate x=" << coordinate.x() << " y=" << coordinate.y() << ", tc=" << tc;
if (participantData.id() <= 0)
if (participantData.id <= 0)
return;
req.participantId(participantData.id());
req.participantId = participantData.id;
bAskOutdated =
m_ppmDtc->type(participantData.typeId()).typeClass() == ParticipantManagement::TypeClass::Unit;
m_ppmDtc->type(participantData.typeId).typeClass == ParticipantManagement::TypeClass::Unit;
}
bool bOnlyOutdated = false;
@@ -751,8 +752,8 @@ void ParticipantsMoveDialog::doSetSimulatedPositionRequest(
bOnlyOutdated = (b == LtsWidgets::Button::No);
}
req.onlyOutdatedParticipants(bOnlyOutdated);
req.position(Core::GeoPosition(coordinate.x(), coordinate.y(), 0.0));
req.onlyOutdatedParticipants = bOnlyOutdated;
req.position = Core::GeoPosition(coordinate.x(), coordinate.y(), 0.0);
m_requestHelper->startSingleRequest([req, this]() { return m_ppmFtc->setSimulatedPositionRequest(req, this); });
}
@@ -761,7 +762,7 @@ void ParticipantsMoveDialog::doSetSimulatedPositionRelativeRequest(
const ParticipantManagement::ParticipantData& participantData, const QPointF& coordinate)
{
const int participantId = participantData.id();
const int participantId = participantData.id;
if (participantId <= 0)
return;
@@ -773,10 +774,10 @@ void ParticipantsMoveDialog::doSetSimulatedPositionRelativeRequest(
}
INFO_LOG(m_logger) << Q_FUNC_INFO << ", getUnitPosition for participantId=" << participantId
<< ", unitPositionOut: lon=" << unitPositionOut.lon() << " - lat=" << unitPositionOut.lat();
<< ", unitPositionOut: lon=" << unitPositionOut.lon << " - lat=" << unitPositionOut.lat;
LtsCoordTrans::UtmCoordinate curUnitPosUtm =
LtsCoordTrans::UtmCoordinate::fromGeographic(unitPositionOut.lon(), unitPositionOut.lat());
LtsCoordTrans::UtmCoordinate::fromGeographic(unitPositionOut.lon, unitPositionOut.lat);
LtsCoordTrans::UtmCoordinate desiredUnitPosUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(coordinate);
QPointF offset = desiredUnitPosUtm.relativeTo(curUnitPosUtm);
@@ -787,9 +788,9 @@ void ParticipantsMoveDialog::doSetSimulatedPositionRelativeRequest(
}
ParticipantManagement::SetSimulatedPositionRelative req;
req.participantId(participantId);
req.positionOffsetX(offset.x());
req.positionOffsetY(offset.y());
req.participantId = participantId;
req.positionOffsetX = offset.x();
req.positionOffsetY = offset.y();
DEBUG_LOG(m_logger) << "SetSimulatedPositionRelative = " << req;
@@ -802,7 +803,7 @@ void ParticipantsMoveDialog::doSetSimulatedParticipantFormationRequest(
const QString& formationData)
{
const int participantId = participantData.id();
const int participantId = participantData.id;
if (participantId <= 0)
return;
@@ -814,10 +815,10 @@ void ParticipantsMoveDialog::doSetSimulatedParticipantFormationRequest(
}
INFO_LOG(m_logger) << Q_FUNC_INFO << ", getUnitPosition for participantId=" << participantId
<< ", unitPositionOut: lon=" << unitPositionOut.lon() << " - lat=" << unitPositionOut.lat();
<< ", unitPositionOut: lon=" << unitPositionOut.lon << " - lat=" << unitPositionOut.lat;
LtsCoordTrans::UtmCoordinate curUnitPosUtm =
LtsCoordTrans::UtmCoordinate::fromGeographic(unitPositionOut.lon(), unitPositionOut.lat());
LtsCoordTrans::UtmCoordinate::fromGeographic(unitPositionOut.lon, unitPositionOut.lat);
LtsCoordTrans::UtmCoordinate desiredUnitPosUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(coordinate);
const QPointF offset = desiredUnitPosUtm.relativeTo(curUnitPosUtm);
@@ -828,11 +829,11 @@ void ParticipantsMoveDialog::doSetSimulatedParticipantFormationRequest(
}
ParticipantManagement::SetSimulatedParticipantFormation req;
req.participantId(participantId);
req.position(Core::GeoPosition(coordinate.x(), coordinate.y(), 0.0));
req.positionOffsetX(offset.x());
req.positionOffsetY(offset.y());
req.formation(formationData.toStdString());
req.participantId = participantId;
req.position = Core::GeoPosition(coordinate.x(), coordinate.y(), 0.0);
req.positionOffsetX = offset.x();
req.positionOffsetY = offset.y();
req.formation = formationData.toStdString();
m_requestHelper->startSingleRequest(
[req, this]() { return m_ppmFtc->setSimulatedParticipantFormationRequest(req, this); });
@@ -15,6 +15,7 @@
#include <PluginInterfaces/gui_plugin_interface.h>
#include <ParticipantManagement/ppm.hpp>
#include <ParticipantManagement/ppm_dtc.h>
#include <ParticipantManagement/ppm_ftc.h>
#include <CentralEffectSimulation/ces_dtc.h>
#include <AreaEffectSimulation/aes_dtc.h>
@@ -11,6 +11,7 @@ ParticipantMoveModel::ParticipantMoveModel(QObject* parent,
const std::shared_ptr<ParticipantManagement::Interface::Dtc>& ppmDtc,
const std::shared_ptr<AdvancedSymbology::ForeignDataInterface>& asbIfc)
: ParticipantManagement::ParticipantEditModel(parent, ppmDtc, asbIfc)
, m_logger(getLogger("ParticipantMoveModel"))
{
m_titles += tr("Simulated");
@@ -38,9 +39,9 @@ void ParticipantMoveModel::onParticipantChanged(const ParticipantManagement::Par
DataModification modType)
{
Q_UNUSED(modType)
if (data.partyId() != m_partyId)
if (data.partyId != m_partyId)
return;
INFO_LOG(m_logger) << "onParticipantChanged isSimulated=" << data.isSimulated();
INFO_LOG(m_logger) << "onParticipantChanged isSimulated=" << data.isSimulated;
onReinitModel(partyId());
emit newData();
}
@@ -50,17 +51,17 @@ bool ParticipantMoveModel::isSelectableBySimulation(const QModelIndex& index, bo
bool isSimulatable = true;
const ParticipantManagement::ParticipantData data(getParticipantData(index));
if ((data.equipmentNumber().is_set() && data.equipmentNumber().get() > 0) ||
m_dtc->type(data.typeId()).typeClass() == ParticipantManagement::TypeClass::Unit)
if ((data.equipmentNumber.has_value() && data.equipmentNumber.get() > 0) ||
m_dtc->type(data.typeId).typeClass == ParticipantManagement::TypeClass::Unit)
isSimulatable = false;
DEBUG_LOG(m_logger) << "ParticipantId: " << data.id() << " isSimulated:" << data.isSimulated()
<< " equipmentNo:" << data.equipmentNumber() << " typeId=" << data.typeId()
<< " modId=" << data.modId() << " typeClass=" << m_dtc->type(data.typeId()).typeClass()
DEBUG_LOG(m_logger) << "ParticipantId: " << data.id << " isSimulated:" << data.isSimulated
<< " equipmentNo:" << data.equipmentNumber << " typeId=" << data.typeId
<< " modId=" << data.modId << " typeClass=" << m_dtc->type(data.typeId).typeClass
<< " isSimulatable=" << isSimulatable;
if (bIsSimulated)
*bIsSimulated = data.isSimulated();
*bIsSimulated = data.isSimulated;
return isSimulatable;
}