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

@@ -5,6 +5,15 @@
# Created by Mike Wille, SLSE, 2016-05-05
#
# Build this target as separate translation units (NOT a unity build). It links the
# ddsftc INTERFACE target, which propagates generic_ftc.cpp /
# generic_ftc_threading.cpp as INTERFACE sources (legacy design: consumers compile
# the generic FTC implementation themselves, one TU per file, hidden visibility).
# A unity build concatenates those .cpp's into this target's single TU, and LTO
# (USE_IPO) then reports "multiple definition of Threading::..." from the same
# object. Separate TUs restore the legacy per-file structure (behavior-neutral).
set(CMAKE_UNITY_BUILD FALSE)
SET(esm_combobox_gui_SRCS
esm_combobox_foreign_gui_interface_impl.cpp
esm_combobox_foreign_gui_interface_impl.h
@@ -76,12 +76,12 @@ QString ForeignGuiComboboxInterfaceImpl::getAssignedAesField (const int particip
for (const auto &explosionCluster : m_aesDtc->explosionClusters())
{
if (explosionCluster.effectStateId() == AreaEffectSimulation::AesEffectState::EsExpired)
if (explosionCluster.effectStateId == AreaEffectSimulation::AesEffectState::EsExpired)
continue;
for ( const auto &esmParticipant : explosionCluster.esmParticipantIds())
for ( const auto &esmParticipant : explosionCluster.esmParticipantIds)
{
if ( esmParticipant == participantId)
result.append(tr(" | Assigned: %1").arg(QString::fromStdString(explosionCluster.name())));
result.append(tr(" | Assigned: %1").arg(QString::fromStdString(explosionCluster.name)));
}
}
@@ -95,7 +95,7 @@ void ForeignGuiComboboxInterfaceImpl::initEffectShowActors()
QVector<int> participants;
QMap<double, int> sortedParticipants;
QMap<int,EffectShowManagement::EffectShowVehicleStatus> effectShowVehicleStatuss;
if (qFuzzyCompare(m_coord.lon(), 0) && qFuzzyCompare(m_coord.lat(), 0))
if (qFuzzyCompare(m_coord.lon, 0) && qFuzzyCompare(m_coord.lat, 0))
{
@@ -104,17 +104,17 @@ void ForeignGuiComboboxInterfaceImpl::initEffectShowActors()
for (const auto &state : m_dtc->effectShowVehicleStatuss())
{
participants.append(state.esmParticipantId());
effectShowVehicleStatuss.insert(state.esmParticipantId(), state);
participants.append(state.esmParticipantId);
effectShowVehicleStatuss.insert(state.esmParticipantId, state);
}
sortedParticipants = m_ppmDtc->sortByDistance(m_coord.lon(), m_coord.lat(), participants);
sortedParticipants = m_ppmDtc->sortByDistance(m_coord.lon, m_coord.lat, participants);
for ( auto it = sortedParticipants.cbegin(); it!= sortedParticipants.cend(); ++it)
{
ParticipantManagement::Participant participant = m_ppmDtc->participant(it.value());
EffectShowManagement::EffectShowVehicleStatus effectShowVehicleStatus = effectShowVehicleStatuss.value(it.value());
int equipmentNumber = m_ppmDtc->equipmentNumberByParticipantId(effectShowVehicleStatus.esmParticipantId());
bool isSmokeVehicle = effectShowVehicleStatus.feature() == Feature_e::Smoke;
int equipmentNumber = m_ppmDtc->equipmentNumberByParticipantId(effectShowVehicleStatus.esmParticipantId);
bool isSmokeVehicle = effectShowVehicleStatus.feature == Feature_e::Smoke;
@@ -135,12 +135,12 @@ void ForeignGuiComboboxInterfaceImpl::initEffectShowActors()
continue;
}
QString newString = QStringLiteral("%1 - %2 (%3)").arg(QString::fromStdString(participant.designator())).arg(QString::fromStdString(participant.tacticalIdentifier())).arg(equipmentNumber);
QString newString = QStringLiteral("%1 - %2 (%3)").arg(QString::fromStdString(participant.designator)).arg(QString::fromStdString(participant.tacticalIdentifier)).arg(equipmentNumber);
newString.append(QStringLiteral(" "));
if (!m_isSmoke)
newString.append(tr("Mag: %1 | Avail: %2").arg(effectShowVehicleStatus.ammunitionMagazine()).arg(effectShowVehicleStatus.ammunitionAvailable()));
newString.append(tr("Mag: %1 | Avail: %2").arg(effectShowVehicleStatus.ammunitionMagazine).arg(effectShowVehicleStatus.ammunitionAvailable));
else
newString.append(tr("Avail: %1").arg(effectShowVehicleStatus.ammunitionAvailable()));
newString.append(tr("Avail: %1").arg(effectShowVehicleStatus.ammunitionAvailable));
newString.append(tr(" | Dist: %1[m]").arg(QString::number(int(it.key()))));
newString.append(getAssignedAesField(it.value()));
@@ -157,14 +157,14 @@ bool ForeignGuiComboboxInterfaceImpl::isMatchedByFilter(const EffectShowVehicleS
enum eFeature
{
NotSpecified = Feature_e::NotSpecified,
Smoke = Feature_e::Smoke,
Explosion24 = Feature_e::Explosion24,
Explosion48 = Feature_e::Explosion48,
NotSpecified = static_cast<int>(Feature_e::NotSpecified),
Smoke = static_cast<int>(Feature_e::Smoke),
Explosion24 = static_cast<int>(Feature_e::Explosion24),
Explosion48 = static_cast<int>(Feature_e::Explosion48),
SmokeAndExplosion48 = Explosion48 + 1
};
int feature = static_cast<int>(vehicleStatus.feature().underlying());
int feature = static_cast<int>(vehicleStatus.feature);
switch (featureFilter)
{
@@ -9,6 +9,7 @@
#ifdef BUILD_WITH_EXTERNAL_DDS
#include <ParticipantManagement/ppm.hpp>
#include <ParticipantManagement/ppm_dtc.h>
#include <AreaEffectSimulation/aes_dtc.h>
#endif
@@ -17,6 +17,7 @@ EffectShowActorList::EffectShowActorList(QWidget *parent)
, m_effectShowModel(nullptr)
, m_session(nullptr)
, m_ui(new Ui::EffectShowActorList)
, m_logger(getLogger("EffectShowActorList"))
{
m_ui->setupUi(this);
@@ -23,6 +23,7 @@ EffectShowActorProxyModel::EffectShowActorProxyModel(EffectShowActorModel *sourc
: LtsWidgets::LtsColumnFilterProxyModel(parent)
, m_effectShowModel(effectShowModel)
, m_sourceModel(sourceModel)
, m_logger(getLogger("EffectShowActorModel"))
{
this->setSourceModel(sourceModel);
}
@@ -32,8 +33,8 @@ bool EffectShowActorProxyModel::filterAcceptsRow(int source_row, const QModelInd
if (!m_sourceModel || source_parent.isValid() || source_row < 0 || source_row >= m_sourceModel->m_vecData.size())
return LtsColumnFilterProxyModel::filterAcceptsRow(source_row, source_parent);
auto equipmentNumber = m_sourceModel->m_vecData.at(source_row).equipmentNumber();
if (!equipmentNumber.is_set())
auto equipmentNumber = m_sourceModel->m_vecData.at(source_row).equipmentNumber;
if (!equipmentNumber.has_value())
return false;
if (!m_effectShowModel->isVehicleStatus(equipmentNumber.get()))
return false;
@@ -46,14 +47,14 @@ bool EffectShowActorProxyModel::filterAcceptsRow(int source_row, const QModelInd
if (cdf.contains(EffectShowActorModel::Status))
{
int statusFilter = cdf.value(EffectShowActorModel::Status).toInt();
if ((statusFilter == EffectShowActorModel::eStatus::Operational && !vehicleStatus.operational()) ||
(statusFilter == EffectShowActorModel::eStatus::NotOperational && vehicleStatus.operational()))
if ((statusFilter == EffectShowActorModel::eStatus::Operational && !vehicleStatus.operational) ||
(statusFilter == EffectShowActorModel::eStatus::NotOperational && vehicleStatus.operational))
return false;
}
if (cdf.contains(EffectShowActorModel::Columns::Feature))
{
int feature = static_cast<int>(vehicleStatus.feature().underlying());
int feature = static_cast<int>(vehicleStatus.feature);
switch(cdf.value(EffectShowActorModel::Columns::Feature).toInt())
{
case static_cast<int>(EffectShowActorModel::eFeature::SmokeAndExplosion48):
@@ -152,7 +153,7 @@ bool EffectShowActorModel::initModel(LtsSession::LtsSession *session)
auto cb = [this](const ParticipantManagement::Participant & part)
{
ParticipantManagement::TypeClass typeClass = m_dtc->type(part.typeId()).typeClass();
ParticipantManagement::TypeClass typeClass = m_dtc->type(part.typeId).typeClass;
if (typeClass != ParticipantManagement::TypeClass::SupportEntity)
return;
insertRow(part);
@@ -173,56 +174,56 @@ QVariant EffectShowActorModel::data(const QModelIndex &index, int role) const
const ParticipantManagement::Participant &participant = m_vecData.at(index.row());
EffectShowManagement::EffectShowVehicleStatus vehicleStatus;
bool isVehicleStatus = m_effectShowModel->getVehicleStatus(participant.equipmentNumber().get(), vehicleStatus);
bool isVehicleStatus = m_effectShowModel->getVehicleStatus(participant.equipmentNumber.get(), vehicleStatus);
QString eqNumber = QStringLiteral("-");
switch (index.column())
{
case Name:
if (participant.equipmentNumber().is_set())
eqNumber = QString::number(participant.equipmentNumber().get());
return QStringLiteral("%1 - %2 (%3)").arg(QString::fromStdString(participant.designator())).arg(QString::fromStdString(participant.tacticalIdentifier())).arg(eqNumber);
if (participant.equipmentNumber.has_value())
eqNumber = QString::number(participant.equipmentNumber.get());
return QStringLiteral("%1 - %2 (%3)").arg(QString::fromStdString(participant.designator)).arg(QString::fromStdString(participant.tacticalIdentifier)).arg(eqNumber);
case Status:
{
if (!isVehicleStatus)
return QVariant();
return vehicleStatus.operational() ? tr("Operational") : tr("Not Operational");
return vehicleStatus.operational ? tr("Operational") : tr("Not Operational");
}
case BITE:
{
if (!isVehicleStatus)
return QVariant();
return vehicleStatus.magazineFail() ? tr("Error") : tr("Ok");
return vehicleStatus.magazineFail ? tr("Error") : tr("Ok");
}
case Position:
{
auto it = m_ppmPositions.find(participant.id());
auto it = m_ppmPositions.find(participant.id);
if (it == m_ppmPositions.end())
return QVariant();
Core::GeoPosition2D pos = it.value();
return LtsCoordTrans::mgrsFromGeographic(pos.lon(), pos.lat());
return LtsCoordTrans::mgrsFromGeographic(pos.lon, pos.lat);
}
case EffectShow:
return m_effectShowModel->getTimeAndPositionOfNextEffectShow(participant.id());
return m_effectShowModel->getTimeAndPositionOfNextEffectShow(participant.id);
case Relocation:
return m_effectShowModel->getTimeAndPositionOfNextActorRelocation(participant.id());
return m_effectShowModel->getTimeAndPositionOfNextActorRelocation(participant.id);
case RestMagazine:
{
if (!isVehicleStatus)
return QVariant();
return vehicleStatus.ammunitionMagazine();
return vehicleStatus.ammunitionMagazine;
}
case RestAmmunition:
{
if (!isVehicleStatus)
return QVariant();
return vehicleStatus.ammunitionAvailable();
return vehicleStatus.ammunitionAvailable;
}
case Feature:
{
if (!isVehicleStatus)
return QVariant();
switch (vehicleStatus.feature().underlying())
switch (vehicleStatus.feature)
{
case EffectShowManagement::Feature_e::Smoke:
return tr("Smoke");
@@ -233,7 +234,7 @@ QVariant EffectShowActorModel::data(const QModelIndex &index, int role) const
case EffectShowManagement::Feature_e::NotSpecified:
return tr("Not specified");
}
return tr("Unknown (%1)").arg(vehicleStatus.feature().underlying());
return tr("Unknown (%1)").arg(static_cast<int>(vehicleStatus.feature));
}
}
return QVariant();
@@ -277,7 +278,7 @@ QVariant EffectShowActorModel::headerData(int section, Qt::Orientation orientati
bool EffectShowActorModel::isFiltered(const ParticipantManagement::Participant &data, DataModification modType) const
{
Q_UNUSED(modType);
ParticipantManagement::TypeClass typeClass = m_dtc->type(data.typeId()).typeClass();
ParticipantManagement::TypeClass typeClass = m_dtc->type(data.typeId).typeClass;
bool filtered = (typeClass != ParticipantManagement::TypeClass::SupportEntity);
return filtered;
}
@@ -288,13 +289,13 @@ void EffectShowActorModel::onParticipantPositionChanged(const ParticipantManagem
{
case DataModification::eAdded:
case DataModification::eModified:
m_ppmPositions[data.participantId()] = data.pos();
m_ppmPositions[data.participantId] = data.pos;
break;
case DataModification::eRemoved:
m_ppmPositions.remove(data.participantId());
m_ppmPositions.remove(data.participantId);
break;
}
const QModelIndex idx = findIndexForId(data.participantId(), Position);
const QModelIndex idx = findIndexForId(data.participantId, Position);
if (idx.isValid())
emit dataChanged(idx, idx, {Qt::DisplayRole});
}
@@ -307,7 +308,7 @@ QVector<ParticipantManagement::Participant>::const_iterator EffectShowActorModel
auto it = m_vecData.begin();
while (it != m_vecData.end())
{
if (id == it->id())
if (id == it->id)
return it;
++it;
}
@@ -319,17 +320,17 @@ EffectShowManagement::Feature_e EffectShowActorModel::getFeature(int rowId) cons
{
const ParticipantManagement::Participant &participant = m_vecData.at(rowId);
EffectShowManagement::EffectShowVehicleStatus vehicleStatus;
if (!m_effectShowModel->getVehicleStatus(participant.equipmentNumber().get(), vehicleStatus))
if (!m_effectShowModel->getVehicleStatus(participant.equipmentNumber.get(), vehicleStatus))
return EffectShowManagement::Feature_e();
return vehicleStatus.feature();
return vehicleStatus.feature;
}
bool EffectShowActorModel::isOperational(int rowId) const
{
const ParticipantManagement::Participant &participant = m_vecData.at(rowId);
EffectShowManagement::EffectShowVehicleStatus vehicleStatus;
if (m_effectShowModel->getVehicleStatus(participant.equipmentNumber().get(), vehicleStatus))
return vehicleStatus.operational();
if (m_effectShowModel->getVehicleStatus(participant.equipmentNumber.get(), vehicleStatus))
return vehicleStatus.operational;
return false;
}
@@ -337,7 +338,7 @@ bool EffectShowActorModel::isMatchedByFilter(const int &equipmentNumber, const i
{
EffectShowVehicleStatus vehicleStatus;
m_effectShowModel->getVehicleStatus(equipmentNumber, vehicleStatus);
int feature = static_cast<int>(vehicleStatus.feature().underlying());
int feature = static_cast<int>(vehicleStatus.feature);
switch (featureFilter)
{
@@ -8,6 +8,7 @@
#include <LtsWidgets/lts_abstract_table_model.h>
#include <LtsWidgets/lts_column_filter_proxy_model.h>
#include <ParticipantManagement/ppm.hpp>
#include <ParticipantManagement/ppm_dtc.h>
namespace EffectShowManagement
{
@@ -36,10 +37,10 @@ class EffectShowActorModel final : public LtsWidgets::LtsAbstractTableModel<Part
enum Columns { Name, Status, BITE, Feature, Position, EffectShow, Relocation, RestMagazine, RestAmmunition };
enum eFeature {
NotSpecified = Feature_e::NotSpecified,
Smoke = Feature_e::Smoke,
Explosion24 = Feature_e::Explosion24,
Explosion48 = Feature_e::Explosion48,
NotSpecified = static_cast<int>(Feature_e::NotSpecified),
Smoke = static_cast<int>(Feature_e::Smoke),
Explosion24 = static_cast<int>(Feature_e::Explosion24),
Explosion48 = static_cast<int>(Feature_e::Explosion48),
SmokeAndExplosion48 = Explosion48 + 1
};
@@ -24,6 +24,7 @@ EffectShowActorRelocationEdit::EffectShowActorRelocationEdit(QWidget* parent)
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel), m_dtc(nullptr), m_ftc(nullptr),
m_ppmDtc(nullptr), m_sitMapGuiIfc(nullptr), m_model(nullptr), m_session(nullptr),
m_ui(new Ui::EffectShowActorRelocationEdit), m_requestHelper(new LtsUtils::RequestHelper(this))
, m_logger(getLogger("EffectShowActorRelocationEdit"))
{
m_ui->setupUi(this);
}
@@ -58,9 +59,9 @@ void EffectShowActorRelocationEdit::onEffectShowActorFilterChanged(const int& id
auto iParticipant = m_model->getEffectShowActorModel()->getIt(it.key());
if (iParticipant == m_model->getEffectShowActorModel()->getItEnd())
continue;
if (!iParticipant->equipmentNumber().is_set())
if (!iParticipant->equipmentNumber.has_value())
continue;
if (!m_model->getEffectShowActorModel()->isMatchedByFilter(iParticipant->equipmentNumber().get(), filter))
if (!m_model->getEffectShowActorModel()->isMatchedByFilter(iParticipant->equipmentNumber.get(), filter))
continue;
m_ui->cbEffectShowActor->addItem(it.value(), it.key());
@@ -73,7 +74,7 @@ void EffectShowActorRelocationEdit::onEffectShowVehicleStatusChanged(const Effec
const DataModification& modType)
{
Q_UNUSED(modType);
int equipmentNumber = m_ppmDtc->equipmentNumberByParticipantId(data.esmParticipantId());
int equipmentNumber = m_ppmDtc->equipmentNumberByParticipantId(data.esmParticipantId);
m_effectShowActors = m_model->getParticipantList();
const int filter = m_ui->cbEffectShowActorFilter->currentData().toInt();
if (m_model->getEffectShowActorModel()->isMatchedByFilter(equipmentNumber, filter))
@@ -144,13 +145,13 @@ bool EffectShowActorRelocationEdit::init(LtsSession::LtsSession* session, Effect
if (rowToCopy >= 0)
{
const EffectShowActorRelocation& copy = m_model->getEffetShowActorRelocationModel()->getRowData(rowToCopy);
if (copy.id() > 0)
if (copy.id > 0)
{
m_ui->cwCoordinate->setCoordinate(copy.position().lon(), copy.position().lat());
m_ui->cbEffectShowActor->setCurrentIndex(m_ui->cbEffectShowActor->findData(copy.esmParticipantId()));
m_ui->leInfo->setText(QString::fromStdString(copy.info()));
if (copy.arrival_time().is_set())
m_ui->dteTime->setMsecsSinceEpoch(copy.arrival_time().get());
m_ui->cwCoordinate->setCoordinate(copy.position.lon, copy.position.lat);
m_ui->cbEffectShowActor->setCurrentIndex(m_ui->cbEffectShowActor->findData(copy.esmParticipantId));
m_ui->leInfo->setText(QString::fromStdString(copy.info));
if (copy.arrival_time.has_value())
m_ui->dteTime->setMsecsSinceEpoch(copy.arrival_time.get());
slotChangesMade();
}
}
@@ -163,12 +164,12 @@ bool EffectShowActorRelocationEdit::apply()
return m_requestHelper->startSingleRequest([this]() {
EffectShowActorRelocation data;
data.id(0);
data.id = 0;
data.esmParticipantId(m_ui->cbEffectShowActor->currentData().toInt());
data.position(Core::GeoPosition2D(m_ui->cwCoordinate->coordinate().x(), m_ui->cwCoordinate->coordinate().y()));
data.arrival_time().set(m_ui->dteTime->msecsSinceEpoch());
data.info(m_ui->leInfo->text().toStdString());
data.esmParticipantId = m_ui->cbEffectShowActor->currentData().toInt();
data.position = Core::GeoPosition2D(m_ui->cwCoordinate->coordinate().x(), m_ui->cwCoordinate->coordinate().y());
data.arrival_time.set(m_ui->dteTime->msecsSinceEpoch());
data.info = m_ui->leInfo->text().toStdString();
return m_ftc->effectShowActorRelocationModifyRequest(data, this);
});
@@ -16,6 +16,7 @@ EffectShowActorRelocationList::EffectShowActorRelocationList(const QString& menu
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::CloseOnly), m_menuGroup(menuGroup),
m_effectShowModel(nullptr), m_ftc(nullptr), m_session(nullptr),
m_requestHelper(new LtsUtils::RequestHelper(this)), m_ui(new Ui::EffectShowActorRelocationList)
, m_logger(getLogger("EffectShowActorRelocationList"))
{
m_ui->setupUi(this);
m_ui->widget->setSelectionMode(QAbstractItemView::SingleSelection);
@@ -101,7 +102,7 @@ void EffectShowActorRelocationList::onRemoveEffectShowActorRelocation()
m_effectShowModel->getEffetShowActorRelocationModel()->getRowData(row);
m_requestHelper->startSingleRequest([esar, this]() {
const Core::RemoveElementRequest req(esar.id());
const Core::RemoveElementRequest req(esar.id);
return m_ftc->effectShowActorRelocationRemoveRequest(req, this);
});
}
@@ -11,6 +11,7 @@
#include <LtsUtils/LtsUtilsGui/LtsUtilsGuiDds/request_helper.h>
#include <LtsWidgets/lts_dialog.h>
#include <ParticipantManagement/ppm.hpp>
#include <ParticipantManagement/ppm_dtc.h>
namespace Ui
{
@@ -3,7 +3,7 @@
#include "esm_effect_show_actor_relocation_model.h"
#include "esm_effect_show_model.h"
// esm_translation.h - external dependency, removed for build
#include <EffectShowManagement/esm_translation.h>
#include <LtsCoordTrans/lts_coord_trans.h>
#include <ngltools/ngltools_dtg.h>
@@ -24,6 +24,7 @@ EffectShowActorRelocationModel::EffectShowActorRelocationModel(EffectShowModel *
parent)
, m_dtc(nullptr)
, m_effectShowModel(effectShowModel)
, m_logger(getLogger("EffectShowActorRelocationModel"))
{}
@@ -50,24 +51,24 @@ QVariant EffectShowActorRelocationModel::data(const QModelIndex &index, int role
{
case Name:
{
int id = esar.esmParticipantId();
int id = esar.esmParticipantId;
return (id != -1) ? m_effectShowModel->getParticipantName(id) : QLatin1String("---");
}
case Id:
return esar.id();
return esar.id;
case ArrivalTime:
return QDateTime::fromMSecsSinceEpoch(esar.arrival_time().get());
return QDateTime::fromMSecsSinceEpoch(esar.arrival_time.get());
case Position:
{
Core::GeoPosition2D pos = esar.position();
return LtsCoordTrans::mgrsFromGeographic(pos.lon(), pos.lat());
Core::GeoPosition2D pos = esar.position;
return LtsCoordTrans::mgrsFromGeographic(pos.lon, pos.lat);
}
case Info:
return QString::fromStdString(esar.info());
return QString::fromStdString(esar.info);
case Status:
return EffectShowManagement::toString(esar.orderConfirmation());
return EffectShowManagement::toString(esar.orderConfirmation);
case Answer:
return QString::fromStdString(esar.answerText());
return QString::fromStdString(esar.answerText);
}
return QVariant();
}
@@ -103,13 +104,13 @@ bool EffectShowActorRelocationProxyModel::lessThan(const QModelIndex &source_lef
switch (source_left.column())
{
case EffectShowActorRelocationModel::ArrivalTime:
if (dataLeft.arrival_time().is_set() && dataRight.arrival_time().is_set())
return dataLeft.arrival_time().get() < dataRight.arrival_time().get();
if (dataRight.arrival_time().is_set())
if (dataLeft.arrival_time.has_value() && dataRight.arrival_time.has_value())
return dataLeft.arrival_time.get() < dataRight.arrival_time.get();
if (dataRight.arrival_time.has_value())
return true;
if (dataLeft.arrival_time().is_set())
if (dataLeft.arrival_time.has_value())
return false;
return dataLeft.id() < dataRight.id();
return dataLeft.id < dataRight.id;
default:
break;
@@ -135,10 +136,10 @@ bool EffectShowActorRelocationProxyModel::checkFilter(int source_row) const
const auto effectShowSource = m_sourceModel->getRowData(source_row);
if (effectShowSource.orderConfirmation() != EffectShowManagement::OrderConfirmation_e::OrderCarriedOut &&
effectShowSource.orderConfirmation() != EffectShowManagement::OrderConfirmation_e::PositionReached &&
effectShowSource.orderConfirmation() != EffectShowManagement::OrderConfirmation_e::Abort &&
effectShowSource.orderConfirmation() != EffectShowManagement::OrderConfirmation_e::Nonacceptance)
if (effectShowSource.orderConfirmation != EffectShowManagement::OrderConfirmation_e::OrderCarriedOut &&
effectShowSource.orderConfirmation != EffectShowManagement::OrderConfirmation_e::PositionReached &&
effectShowSource.orderConfirmation != EffectShowManagement::OrderConfirmation_e::Abort &&
effectShowSource.orderConfirmation != EffectShowManagement::OrderConfirmation_e::Nonacceptance)
return true;
return false;
@@ -20,6 +20,7 @@ namespace EffectShowManagement
EffectShowEdit::EffectShowEdit(const EffectShow& effectShow, QWidget* parent)
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel), m_ftc(nullptr), m_model(nullptr),
m_requestHelper(new LtsUtils::RequestHelper(this)), m_effectShow(effectShow), m_ui(new Ui::EffectShowEdit)
, m_logger(getLogger("EffectShowEdit"))
{
m_ui->setupUi(this);
}
@@ -52,17 +53,17 @@ bool EffectShowEdit::init(LtsSession::LtsSession* session, EffectShowModel* mode
m_model = model;
AreaEffectSimulation::AesItem aesItem;
bool foundItem = m_aesDtc->aesItemFromId(m_effectShow.idAreaEffectSimulation(), aesItem);
bool foundItem = m_aesDtc->aesItemFromId(m_effectShow.idAreaEffectSimulation, aesItem);
DEBUG_LOG(m_logger) << ", found :" << foundItem
<< ", idAreaEffectSimulation :" << m_effectShow.idAreaEffectSimulation()
<< ", aesItem.id() :" << aesItem.id()
<< ", esmParticipantId: " << m_effectShow.esmParticipantId();
<< ", idAreaEffectSimulation :" << m_effectShow.idAreaEffectSimulation
<< ", aesItem.id() :" << aesItem.id
<< ", esmParticipantId: " << m_effectShow.esmParticipantId;
if (!foundItem)
return false;
m_isSmoke = m_pdmDtc->isSmoke(aesItem.chargeStruct().chargeTypeId(), aesItem.chargeStruct().igniterTypeId(),
aesItem.chargeStruct().igniterFunctionId());
m_isSmoke = m_pdmDtc->isSmoke(aesItem.chargeStruct.chargeTypeId, aesItem.chargeStruct.igniterTypeId,
aesItem.chargeStruct.igniterFunctionId);
if (!m_isSmoke)
{
@@ -103,11 +104,11 @@ bool EffectShowEdit::apply()
{
return m_requestHelper->startSingleRequest([this]() {
m_effectShow.esmParticipantId(m_ui->cbEffectShowActor->currentData().toInt());
m_effectShow.esmParticipantId = m_ui->cbEffectShowActor->currentData().toInt();
if (!m_isSmoke)
{
m_effectShow.numOfVolley(m_ui->sbVolley->value());
m_effectShow.shotsPerVolley(m_ui->sbShotsInTotal->value());
m_effectShow.numOfVolley = m_ui->sbVolley->value();
m_effectShow.shotsPerVolley = m_ui->sbShotsInTotal->value();
}
return m_ftc->effectShowModifyRequest(m_effectShow, this);
});
@@ -115,16 +116,16 @@ bool EffectShowEdit::apply()
void EffectShowEdit::showEffectShow()
{
m_ui->leName->setText(QString::fromStdString(m_effectShow.nameAreaEffectSimulation()));
m_ui->leName->setText(QString::fromStdString(m_effectShow.nameAreaEffectSimulation));
EffectShowVehicleStatus vehicleStatus;
const int equipmentNumber = m_ppmDtc->equipmentNumberByParticipantId(m_effectShow.esmParticipantId());
const int equipmentNumber = m_ppmDtc->equipmentNumberByParticipantId(m_effectShow.esmParticipantId);
m_model->getVehicleStatus(equipmentNumber, vehicleStatus);
const int feature = m_ui->cbEffectShowActorFilter->findData(vehicleStatus.feature().underlying());
const int feature = m_ui->cbEffectShowActorFilter->findData(static_cast<int>(vehicleStatus.feature));
switch (feature)
{
case EffectShowManagement::Feature_e::Explosion24:
case EffectShowManagement::Feature_e::NotSpecified:
case static_cast<int>(EffectShowManagement::Feature_e::Explosion24):
case static_cast<int>(EffectShowManagement::Feature_e::NotSpecified):
m_ui->cbEffectShowActorFilter->setCurrentIndex(feature);
break;
default:
@@ -132,8 +133,8 @@ void EffectShowEdit::showEffectShow()
break;
}
if (m_effectShow.esmParticipantId() > 0)
m_ui->cbEffectShowActor->setCurrentIndex(m_ui->cbEffectShowActor->findData(m_effectShow.esmParticipantId()));
if (m_effectShow.esmParticipantId > 0)
m_ui->cbEffectShowActor->setCurrentIndex(m_ui->cbEffectShowActor->findData(m_effectShow.esmParticipantId));
if (m_isSmoke)
{
@@ -146,11 +147,11 @@ void EffectShowEdit::showEffectShow()
{
m_ui->lblVolley->setText(tr("Volley:"));
m_ui->lblShots->setText(tr("Shots in Total:"));
m_ui->sbVolley->setValue(m_effectShow.numOfVolley());
m_ui->sbShotsInTotal->setValue(m_effectShow.shotsPerVolley());
m_ui->sbVolley->setValue(m_effectShow.numOfVolley);
m_ui->sbShotsInTotal->setValue(m_effectShow.shotsPerVolley);
}
m_ui->dteFire->setMsecsSinceEpoch(m_effectShow.startTime().is_set() ? m_effectShow.startTime().get() : 0);
m_ui->leRemainingAmmunition->setText(m_model->getParticipantAmmunition(m_effectShow.esmParticipantId()));
m_ui->dteFire->setMsecsSinceEpoch(m_effectShow.startTime.has_value() ? m_effectShow.startTime.get() : 0);
m_ui->leRemainingAmmunition->setText(m_model->getParticipantAmmunition(m_effectShow.esmParticipantId));
connect(m_ui->cbEffectShowActor, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
[this]() {
@@ -177,7 +178,7 @@ void EffectShowEdit::onEffectShowActorFilterChanged(const int& idx)
{
Q_UNUSED(idx);
const Core::GeoPosition coordGeo(m_effectShow.position().lon(), m_effectShow.position().lat(), 0);
const Core::GeoPosition coordGeo(m_effectShow.position.lon, m_effectShow.position.lat, 0);
updateActorComboBox(coordGeo);
}
@@ -185,7 +186,7 @@ void EffectShowEdit::onEffectShowVehicleStatusChanged(const EffectShowVehicleSta
const DataModification& modType)
{
Q_UNUSED(modType);
int equipmentNumber = m_ppmDtc->equipmentNumberByParticipantId(data.esmParticipantId());
int equipmentNumber = m_ppmDtc->equipmentNumberByParticipantId(data.esmParticipantId);
const int filter = m_ui->cbEffectShowActorFilter->currentData().toInt();
if (m_model->getEffectShowActorModel()->isMatchedByFilter(equipmentNumber, filter))
onEffectShowActorFilterChanged(-1);
@@ -12,6 +12,7 @@
#include <LtsUtils/LtsUtilsGui/LtsUtilsGuiDds/request_helper.h>
#include <LtsWidgets/lts_dialog.h>
#include <ParticipantManagement/ppm.hpp>
#include <ParticipantManagement/ppm_dtc.h>
#include <PluginInterfaces/gui_plugin_interface.h>
#include <EffectShowManagement/esm_gui_combobox_plugin_interface.h>
#include <ProjectDataManagement/pdm_dtc.h>
@@ -5,6 +5,7 @@
#include <ParticipantManagement/ppm.hpp>
#include <ParticipantManagement/ppm_dtc.h>
#include <PluginInterfaces/gui_plugin_interface.h>
#include <EffectShowManagement/esm_data_plugin_interface.h>
#include <EffectShowManagement/esm_gui_plugin_interface.h>
@@ -20,6 +20,7 @@ EffectShowList::EffectShowList(const QString& menuGroup, QWidget* parent)
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::CloseOnly), m_menuGroup(menuGroup), m_model(nullptr),
m_ftc(nullptr), m_session(nullptr), m_ui(new Ui::EffectShowList),
m_requestHelper(new LtsUtils::RequestHelper(this))
, m_logger(getLogger("EffectShowList"))
{
m_ui->setupUi(this);
m_ui->widget->setSelectionMode(QAbstractItemView::SingleSelection);
@@ -84,8 +85,8 @@ void EffectShowList::onSelectionChanged()
{
int row = m_ui->widget->currentIndex().row();
EffectShowManagement::EffectShow effectShow = m_model->getRowData(row);
enaEdit = effectShow.orderConfirmation() != OrderConfirmation_e::OrderCarriedOut &&
effectShow.orderConfirmation() != OrderConfirmation_e::Execution;
enaEdit = effectShow.orderConfirmation != OrderConfirmation_e::OrderCarriedOut &&
effectShow.orderConfirmation != OrderConfirmation_e::Execution;
}
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Edit, enaEdit);
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Remove, rowCount);
@@ -102,11 +103,11 @@ void EffectShowList::onEditEffectShow()
EffectShowManagement::EffectShow effectShow = m_model->getRowData(row);
DEBUG_LOG(m_logger) << "--- onEffectShow() "
<< " id: " << effectShow.id() << " position: " << effectShow.position();
<< " id: " << effectShow.id << " position: " << effectShow.position;
EffectShowEdit* dialog = new EffectShowEdit(effectShow, this);
dialog->init(m_session, m_model);
addDialog(dialog, m_menuGroup, QLatin1String("esmEffectShow") + QString::number(effectShow.id()),
addDialog(dialog, m_menuGroup, QLatin1String("esmEffectShow") + QString::number(effectShow.id),
LtsWidgets::LayoutArea::eDialogTab);
}
@@ -121,7 +122,7 @@ void EffectShowList::onRemoveEffectShow()
EffectShowManagement::EffectShow es = m_model->getRowData(row);
m_requestHelper->startSingleRequest([es, this]() {
const Core::RemoveElementRequest req(es.id());
const Core::RemoveElementRequest req(es.id);
return m_ftc->effectShowRemoveRequest(req, this);
});
}
@@ -8,7 +8,7 @@
#include <AreaEffectSimulation/aes_data_plugin_interface.h>
#include <AreaEffectSimulation/aes_translation.h>
#include <EffectShowManagement/esm_data_plugin_interface.h>
// esm_translation.h - external dependency, removed for build
#include <EffectShowManagement/esm_translation.h>
#include <LtsCoordTrans/lts_coord_trans.h>
#include <LtsSession/lts_session.h>
#include <ParticipantManagement/ppm_data_plugin_interface.h>
@@ -24,6 +24,7 @@ EffectShowModel::EffectShowModel(QObject* parent)
parent),
m_dtc(nullptr), m_effectShowActorProxyModel(nullptr), m_effectShowActorModel(nullptr),
m_effectShowActorRelocationModel(nullptr)
, m_logger(getLogger("EffectShowModel"))
{
}
@@ -72,50 +73,50 @@ QVariant EffectShowModel::data(const QModelIndex& index, int role) const
const EffectShowManagement::EffectShow& effectShow = m_vecData.at(index.row());
AreaEffectSimulation::AesItem aesItem;
m_dtcAes->aesItemFromId(effectShow.idAreaEffectSimulation(), aesItem);
m_dtcAes->aesItemFromId(effectShow.idAreaEffectSimulation, aesItem);
switch (index.column())
{
case Id:
return effectShow.id();
return effectShow.id;
case Name_AES:
return QString::fromStdString(effectShow.nameAreaEffectSimulation());
return QString::fromStdString(effectShow.nameAreaEffectSimulation);
case Duration:
return LtsWidgets::readableDuration(effectShow.duration());
return LtsWidgets::readableDuration(effectShow.duration);
;
case StartTime:
return effectShow.startTime().is_set() ? DTG::toStringMSec(effectShow.startTime().get())
return effectShow.startTime.has_value() ? DTG::toStringMSec(effectShow.startTime.get())
: QStringLiteral("---");
case Position: {
const Core::GeoPosition2D& pos = effectShow.position();
return LtsCoordTrans::mgrsFromGeographic(pos.lon(), pos.lat());
const Core::GeoPosition2D& pos = effectShow.position;
return LtsCoordTrans::mgrsFromGeographic(pos.lon, pos.lat);
}
case EffectShowActor: {
int id = effectShow.esmParticipantId();
int id = effectShow.esmParticipantId;
return (id > 0) ? getParticipantName(id) : QStringLiteral("---");
}
case Volley: {
if (effectShow.typeOfAmmunition() == 5)
if (effectShow.typeOfAmmunition == 5)
return QStringLiteral("--");
else
return effectShow.numOfVolley();
return effectShow.numOfVolley;
}
case ShotsInTotal: {
if (effectShow.typeOfAmmunition() == 5)
if (effectShow.typeOfAmmunition == 5)
return QStringLiteral("--");
else
return effectShow.shotsPerVolley();
return effectShow.shotsPerVolley;
}
case Size:
return tr("%1 x %2").arg(QString::number(effectShow.areaWidth()), QString::number(effectShow.areaDepth()));
return tr("%1 x %2").arg(QString::number(effectShow.areaWidth), QString::number(effectShow.areaDepth));
case Rotation:
return effectShow.areaRotation();
return effectShow.areaRotation;
case Status:
return EffectShowManagement::toString(effectShow.orderConfirmation());
return EffectShowManagement::toString(effectShow.orderConfirmation);
case Answer:
return QString::fromStdString(effectShow.answerText());
return QString::fromStdString(effectShow.answerText);
case AesStatus:
return AreaEffectSimulation::toString(aesItem.effectStateId());
return AreaEffectSimulation::toString(aesItem.effectStateId);
}
return QVariant();
}
@@ -129,8 +130,8 @@ QMap<int, QString> EffectShowModel::getParticipantList() const
{
const ParticipantManagement::Participant part = m_effectShowActorModel->getRowData(
m_effectShowActorProxyModel->mapToSource(m_effectShowActorProxyModel->index(i, 0)).row());
if (hasVehicleReportedOperationalToday(part.equipmentNumber().get()))
ret.insert(part.id(), getParticipantName(part.id()));
if (hasVehicleReportedOperationalToday(part.equipmentNumber.get()))
ret.insert(part.id, getParticipantName(part.id));
}
return ret;
}
@@ -145,14 +146,14 @@ QMap<int, QString> EffectShowModel::getParticipantList(bool is_smoke) const
int realRow = m_effectShowActorProxyModel->mapToSource(m_effectShowActorProxyModel->index(i, 0)).row();
const ParticipantManagement::Participant part = m_effectShowActorModel->getRowData(realRow);
if (!hasVehicleReportedOperationalToday(part.equipmentNumber().get()))
if (!hasVehicleReportedOperationalToday(part.equipmentNumber.get()))
continue;
EffectShowManagement::Feature_e feature = m_effectShowActorModel->getFeature(realRow);
if (feature != EffectShowManagement::Feature_e::NotSpecified &&
((feature == EffectShowManagement::Feature_e::Smoke && is_smoke) ||
(feature != EffectShowManagement::Feature_e::Smoke && !is_smoke)))
ret.insert(part.id(), getParticipantName(part.id()));
ret.insert(part.id, getParticipantName(part.id));
}
return ret;
}
@@ -180,8 +181,8 @@ QVector<QPair<int, QString>> EffectShowModel::getParticipantListByDistance(bool
const ParticipantManagement::ParticipantPosition& pos = m_dtcPpm->participantPosition(partId);
LtsCoordTrans::UtmCoordinate pPos =
LtsCoordTrans::UtmCoordinate::fromGeographic(pos.pos().lon(), pos.pos().lat());
LtsCoordTrans::UtmCoordinate pOrigin = LtsCoordTrans::UtmCoordinate::fromGeographic(origin.lon(), origin.lat());
LtsCoordTrans::UtmCoordinate::fromGeographic(pos.pos.lon, pos.pos.lat);
LtsCoordTrans::UtmCoordinate pOrigin = LtsCoordTrans::UtmCoordinate::fromGeographic(origin.lon, origin.lat);
double distance = LtsCoordTrans::distance(pPos, pOrigin);
@@ -190,18 +191,18 @@ QVector<QPair<int, QString>> EffectShowModel::getParticipantListByDistance(bool
QString currentAssigendEffectShows;
for (const auto& dat : m_vecData)
{
if (dat.esmParticipantId() == partId)
if (dat.esmParticipantId == partId)
{
if (!currentAssigendEffectShows.isEmpty())
currentAssigendEffectShows.append(QStringLiteral(", "));
currentAssigendEffectShows.append(QString::fromStdString(dat.nameAreaEffectSimulation()));
currentAssigendEffectShows.append(QString::fromStdString(dat.nameAreaEffectSimulation));
}
}
QString newString = participantList.value(partId);
newString.append(QStringLiteral(" "));
newString.append(
tr("Mag: %1 | Avail: %2").arg(vehicleStatus.ammunitionMagazine()).arg(vehicleStatus.ammunitionAvailable()));
tr("Mag: %1 | Avail: %2").arg(vehicleStatus.ammunitionMagazine).arg(vehicleStatus.ammunitionAvailable));
newString.append(tr(" | Dist: %1[m]").arg(QString::number(int(distance))));
if (!currentAssigendEffectShows.isEmpty())
newString.append(tr(" | Assigned: %1").arg(currentAssigendEffectShows));
@@ -225,11 +226,11 @@ QString EffectShowModel::getParticipantName(int id) const
if (it == m_effectShowActorModel->getItEnd())
return QString();
QString eqNumber = QStringLiteral("-");
if (it->equipmentNumber().is_set())
eqNumber = QString::number(it->equipmentNumber().get());
if (it->equipmentNumber.has_value())
eqNumber = QString::number(it->equipmentNumber.get());
return QStringLiteral("%1 - %2 (%3)")
.arg(QString::fromStdString(it->designator()))
.arg(QString::fromStdString(it->tacticalIdentifier()))
.arg(QString::fromStdString(it->designator))
.arg(QString::fromStdString(it->tacticalIdentifier))
.arg(eqNumber);
}
@@ -240,12 +241,12 @@ QString EffectShowModel::getParticipantAmmunition(int id) const
return QString();
EffectShowManagement::EffectShowVehicleStatus vehicleStatus;
if (!getVehicleStatus(it->equipmentNumber().get(), vehicleStatus))
if (!getVehicleStatus(it->equipmentNumber.get(), vehicleStatus))
return QString();
QString res = QString::number(vehicleStatus.ammunitionMagazine());
QString res = QString::number(vehicleStatus.ammunitionMagazine);
res.append(QLatin1String(" / "));
res.append(QString::number(vehicleStatus.ammunitionAvailable()));
res.append(QString::number(vehicleStatus.ammunitionAvailable));
return res;
}
@@ -271,29 +272,29 @@ bool EffectShowModel::hasVehicleReportedOperationalToday(int equipmentNum) const
EffectShowVehicleStatus vehicleStatus;
getVehicleStatus(equipmentNum, vehicleStatus);
if (vehicleStatus.operational())
if (vehicleStatus.operational)
{
DEBUG_LOG(m_logger) << "Effect show actor " << vehicleStatus.nameEffectShowActor() << " with participantId "
<< vehicleStatus.esmParticipantId() << " is operational.";
DEBUG_LOG(m_logger) << "Effect show actor " << vehicleStatus.nameEffectShowActor << " with participantId "
<< vehicleStatus.esmParticipantId << " is operational.";
return true;
}
if (!m_effectShowVehicleLastTimeOperational.contains(equipmentNum))
{
DEBUG_LOG(m_logger) << "Effect show actor " << vehicleStatus.nameEffectShowActor() << " with participantId "
<< vehicleStatus.esmParticipantId() << " has not reported operational at any time.";
DEBUG_LOG(m_logger) << "Effect show actor " << vehicleStatus.nameEffectShowActor << " with participantId "
<< vehicleStatus.esmParticipantId << " has not reported operational at any time.";
return false;
}
bool bRet =
QDateTime().addMSecs(m_effectShowVehicleLastTimeOperational[equipmentNum]).date() == QDate::currentDate();
if (bRet)
DEBUG_LOG(m_logger) << "Effect show actor " << vehicleStatus.nameEffectShowActor() << " with participantId "
<< vehicleStatus.esmParticipantId()
DEBUG_LOG(m_logger) << "Effect show actor " << vehicleStatus.nameEffectShowActor << " with participantId "
<< vehicleStatus.esmParticipantId
<< " is not operational, but has reported operational today.";
else
DEBUG_LOG(m_logger) << "Effect show actor " << vehicleStatus.nameEffectShowActor() << " with participantId "
<< vehicleStatus.esmParticipantId()
DEBUG_LOG(m_logger) << "Effect show actor " << vehicleStatus.nameEffectShowActor << " with participantId "
<< vehicleStatus.esmParticipantId
<< " is not operational and has not reported operational today.";
return bRet;
}
@@ -309,20 +310,20 @@ QString EffectShowModel::getTimeAndPositionOfNextEffectShow(int idParticipant) c
Core::GeoPosition2D position;
while (it != m_vecData.end())
{
if (it->orderConfirmation() != OrderConfirmation_e::OrderCarriedOut && it->esmParticipantId() == idParticipant)
if (it->orderConfirmation != OrderConfirmation_e::OrderCarriedOut && it->esmParticipantId == idParticipant)
{
++numOrder;
qint64 start = it->startTime().is_set() ? it->startTime().get() : 0;
qint64 start = it->startTime.has_value() ? it->startTime.get() : 0;
if (effectStart == 0)
{
effectStart = start;
position = it->position();
position = it->position;
}
else if (start < effectStart)
{
effectStart = start;
position = it->position();
position = it->position;
}
}
++it;
@@ -334,7 +335,7 @@ QString EffectShowModel::getTimeAndPositionOfNextEffectShow(int idParticipant) c
res = (effectStart != 0) ? DTG::toStringMSec(effectStart) : tr("---");
res += QLatin1String(", ");
res += LtsCoordTrans::mgrsFromGeographic(position.lon(), position.lat());
res += LtsCoordTrans::mgrsFromGeographic(position.lon, position.lat);
return res;
}
@@ -351,15 +352,15 @@ QString EffectShowModel::getTimeAndPositionOfNextActorRelocation(int idParticipa
while (it != m_effectShowActorRelocationModel->getItEnd())
{
if (it->orderConfirmation() != OrderConfirmation_e::OrderCarriedOut &&
it->orderConfirmation() != OrderConfirmation_e::PositionReached &&
it->orderConfirmation() != OrderConfirmation_e::Abort &&
it->orderConfirmation() != OrderConfirmation_e::Nonacceptance && it->esmParticipantId() == idParticipant)
if (it->orderConfirmation != OrderConfirmation_e::OrderCarriedOut &&
it->orderConfirmation != OrderConfirmation_e::PositionReached &&
it->orderConfirmation != OrderConfirmation_e::Abort &&
it->orderConfirmation != OrderConfirmation_e::Nonacceptance && it->esmParticipantId == idParticipant)
{
if (it->arrival_time().get() < arrivalTime)
if (it->arrival_time.get() < arrivalTime)
{
arrivalTime = it->arrival_time().get();
position = it->position();
arrivalTime = it->arrival_time.get();
position = it->position;
found = true;
}
}
@@ -373,7 +374,7 @@ QString EffectShowModel::getTimeAndPositionOfNextActorRelocation(int idParticipa
res = (arrivalTime != 0) ? DTG::toStringMSec(arrivalTime) : tr("---");
res += QLatin1String(", ");
res += LtsCoordTrans::mgrsFromGeographic(position.lon(), position.lat());
res += LtsCoordTrans::mgrsFromGeographic(position.lon, position.lat);
return res;
}
@@ -388,7 +389,7 @@ void EffectShowModel::updateAll()
bool EffectShowModel::onEffectShowVehicleStatusChanged(const EffectShowManagement::EffectShowVehicleStatus& data,
DataModification modType)
{
int equipmentNumber = m_dtcPpm->equipmentNumberByParticipantId(data.esmParticipantId());
int equipmentNumber = m_dtcPpm->equipmentNumberByParticipantId(data.esmParticipantId);
switch (modType)
{
@@ -396,8 +397,8 @@ bool EffectShowModel::onEffectShowVehicleStatusChanged(const EffectShowManagemen
case DataModification::eModified:
if (m_effectShowVehicleStatus.contains(equipmentNumber))
{
if (m_effectShowVehicleStatus[equipmentNumber].operational() && !data.operational())
m_effectShowVehicleLastTimeOperational[equipmentNumber] = data.sampleTime();
if (m_effectShowVehicleStatus[equipmentNumber].operational && !data.operational)
m_effectShowVehicleLastTimeOperational[equipmentNumber] = data.sampleTime;
}
else
m_effectShowVehicleLastTimeOperational[equipmentNumber] = 0;
@@ -441,13 +442,13 @@ bool EffectShowProxyModel::lessThan(const QModelIndex& source_left, const QModel
switch (source_left.column())
{
case EffectShowModel::StartTime:
if (dataLeft.startTime().is_set() && dataRight.startTime().is_set())
return dataLeft.startTime().get() < dataRight.startTime().get();
if (dataRight.startTime().is_set())
if (dataLeft.startTime.has_value() && dataRight.startTime.has_value())
return dataLeft.startTime.get() < dataRight.startTime.get();
if (dataRight.startTime.has_value())
return true;
if (dataLeft.startTime().is_set())
if (dataLeft.startTime.has_value())
return false;
return dataLeft.id() < dataRight.id();
return dataLeft.id < dataRight.id;
case EffectShowModel::Name_AES:
case EffectShowModel::Id:
@@ -479,7 +480,7 @@ bool EffectShowProxyModel::checkFilter(int source_row) const
const auto effectShowSource = m_sourceModel->getRowData(source_row);
if (effectShowSource.orderConfirmation() != EffectShowManagement::OrderConfirmation_e::OrderCarriedOut)
if (effectShowSource.orderConfirmation != EffectShowManagement::OrderConfirmation_e::OrderCarriedOut)
return true;
return false;
@@ -8,6 +8,7 @@
#include <LtsWidgets/lts_abstract_table_model.h>
#include <LtsWidgets/lts_column_filter_proxy_model.h>
#include <ParticipantManagement/ppm.hpp>
#include <ParticipantManagement/ppm_dtc.h>
namespace LtsSession
{
@@ -9,6 +9,7 @@
#include <EffectShowManagement/esm_ftc.h>
#endif
#include <ParticipantManagement/ppm.hpp>
#include <ParticipantManagement/ppm_dtc.h>
namespace EffectShowManagement
{
@@ -2,6 +2,7 @@
#include <ParticipantManagement/ppm.hpp>
#include <ParticipantManagement/ppm_dtc.h>
#include <AreaEffectSimulation/aes_dtc.h>
#pragma once