Migrates residual Lts sources to generated rtiddsgen API

Adds NmeaManagement tests, fixes codegen includes and Qt6 SerialPort CMake target.
This commit is contained in:
berrux-dev committed 2026-09-23 12:05:37 +02:00
1 parent 5485a90385
commit 881d44f4dd
512 files changed
+6887 -6426

No files matched your search

@@ -176,9 +176,9 @@ QVariant EffectClusterModel::data(const QModelIndex &idx, int role) const
const QString &hdr = this->headerData(BcName, Qt::Horizontal, Qt::DisplayRole).toString();
tooltip.append(QStringLiteral("<p>%1: %2</p>").arg(hdr, QString::fromStdString(ec.name())));
bool bIsArtilleryOrMortar = m_gearClasses.contains(ProjectDataManagement::GearClass_def::Artillery)
|| m_gearClasses.contains(ProjectDataManagement::GearClass_def::Mortar)
|| m_gearClasses.contains(ProjectDataManagement::GearClass_def::Rocket);
bool bIsArtilleryOrMortar = m_gearClasses.contains(ProjectDataManagement::GearClass::Artillery)
|| m_gearClasses.contains(ProjectDataManagement::GearClass::Mortar)
|| m_gearClasses.contains(ProjectDataManagement::GearClass::Rocket);
toolTipHelper(this, idx, ColGearType, tooltip);
if (bIsArtilleryOrMortar)
@@ -280,12 +280,12 @@ void ExplosionEdit::enableUiElements(bool enable)
}
setFireButton(m_aesItem.effectStateId());
if (m_aesItem.effectStateId() == AesEffectState_def::EsExpired)
if (m_aesItem.effectStateId() == AesEffectState::EsExpired)
{
m_ui->leIdentifier->setText(QString::fromStdString(m_aesItem.name()));
__unchange__();
}
if (m_aesItem.effectStateId() == AesEffectState_def::EsActivated)
if (m_aesItem.effectStateId() == AesEffectState::EsActivated)
{
QString name = m_ui->leIdentifier->text();
AesItem baseData;
@@ -307,7 +307,7 @@ void ExplosionEdit::enableUiElements(bool enable)
if (name != m_ui->leIdentifier->text())
m_ui->leIdentifier->setText(name);
}
if (m_aesItem.effectStateId() == AesEffectState_def::EsPaused)
if (m_aesItem.effectStateId() == AesEffectState::EsPaused)
__unchange__();
}
@@ -323,7 +323,7 @@ void ExplosionEdit::setBaseData(const AesItem &baseData, bool copy)
if (copy)
{
m_aesItem.id(0);
m_aesItem.effectStateId(AreaEffectSimulation::AesEffectState_def::get_default());
m_aesItem.effectStateId(AreaEffectSimulation::AesEffectState::get_default());
}
m_ui->leIdentifier->setText(QString::fromUtf8(baseData.name().c_str()));
int idx = m_ui->cbChargeType->findData(baseData.chargeStruct().chargeTypeId());
@@ -810,16 +810,16 @@ bool ExplosionEdit::apply()
void ExplosionEdit::onFireClicked()
{
m_ui->pbFire->setEnabled(false);
if ((m_aesItem.effectStateId() != AesEffectState_def::EsActivated &&
m_aesItem.effectStateId() != AesEffectState_def::EsPaused &&
m_aesItem.effectStateId() != AesEffectState_def::EsCreated &&
m_aesItem.effectStateId() != AesEffectState_def::EsPrepared)
if ((m_aesItem.effectStateId() != AesEffectState::EsActivated &&
m_aesItem.effectStateId() != AesEffectState::EsPaused &&
m_aesItem.effectStateId() != AesEffectState::EsCreated &&
m_aesItem.effectStateId() != AesEffectState::EsPrepared)
|| m_aesItem.id() <= 0)
return;
if (m_aesItem.effectStateId() == AesEffectState_def::EsCreated ||
m_aesItem.effectStateId() == AesEffectState_def::EsPrepared)
if (m_aesItem.effectStateId() == AesEffectState::EsCreated ||
m_aesItem.effectStateId() == AesEffectState::EsPrepared)
{
m_ui->dteEffectStart->setMsecsSinceEpoch(m_session->partitionTime() + 3000);
m_ui->dteEffectStart->setChecked(true);
@@ -836,7 +836,7 @@ void ExplosionEdit::onFireClicked()
m_requestHelper->addRequest([ = ]()
{
return m_ftc->explosionAreaPauseResumeRequest(ExplosionAreaPauseResumeRequest(m_aesItem.id(),
m_aesItem.effectStateId() != AesEffectState_def::EsActivated,
m_aesItem.effectStateId() != AesEffectState::EsActivated,
dds::core::optional<rti::core::int64>(),
dds::core::optional<int32_t>(),
dds::core::optional<int32_t>())
@@ -326,9 +326,9 @@ LtsWidgets::LtsDialog *InterfaceImpl::onShowExplosionClusterListDialog(QWidget *
ExplosionList *listWidget;
listWidget = new ExplosionClusterList(menuGroup(),
{ProjectDataManagement::GearClass_def::Artillery,
ProjectDataManagement::GearClass_def::Mortar,
ProjectDataManagement::GearClass_def::Rocket},
{ProjectDataManagement::GearClass::Artillery,
ProjectDataManagement::GearClass::Mortar,
ProjectDataManagement::GearClass::Rocket},
parent);
if (listWidget->init(m_session))
@@ -288,7 +288,7 @@ void ExplosionAreaList::createModel()
ExplosionClusterList::ExplosionClusterList(const QString &menuGroup, const QVector<ProjectDataManagement::GearClass> &gcs, QWidget *parent)
: ExplosionList(menuGroup, etExplosionCluster, ProjectDataManagement::GearClass_def::Artillery, parent), m_model(nullptr), m_gearClasses(gcs)
: ExplosionList(menuGroup, etExplosionCluster, ProjectDataManagement::GearClass::Artillery, parent), m_model(nullptr), m_gearClasses(gcs)
{
}
@@ -63,7 +63,7 @@ static int s_timeUntilMinimumSec = 10;
static const char *const VALUE_VALID_PROPERTY_NAME = "VALUE_VALID";
static const char *const LAST_VALUE = "LAST_VALUE";
static const int s_laserPrecisionChargeTypeId = 376;
QPair<int, int> getMinMaxDistance(ProjectDataManagement::GearClass_def::type gearClass, int chargeTypeId)
QPair<int, int> getMinMaxDistance(ProjectDataManagement::GearClass gearClass, int chargeTypeId)
{
@@ -81,8 +81,8 @@ QPair<int, int> getMinMaxDistance(ProjectDataManagement::GearClass_def::type gea
static QHash<int, QPair<int, int>> contraintsDistance;
if (contraintsDistance.isEmpty())
{
contraintsDistance.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Artillery), {3500, 40000});
contraintsDistance.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Mortar), {800, 7800});
contraintsDistance.insert(static_cast<int>(ProjectDataManagement::GearClass::Artillery), {3500, 40000});
contraintsDistance.insert(static_cast<int>(ProjectDataManagement::GearClass::Mortar), {800, 7800});
}
@@ -90,8 +90,8 @@ QPair<int, int> getMinMaxDistance(ProjectDataManagement::GearClass_def::type gea
static QHash<int, QPair<int, int>> contraintsDistanceVulcano;
if (contraintsDistanceVulcano.isEmpty())
{
contraintsDistanceVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Artillery), {10000, 70000});
contraintsDistanceVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Rocket), {10000, 70000});
contraintsDistanceVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass::Artillery), {10000, 70000});
contraintsDistanceVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass::Rocket), {10000, 70000});
}
if (chargeTypeIdIsVulcano(chargeTypeId))
{
@@ -107,10 +107,10 @@ QPair<int, int> getMinMaxDistance(ProjectDataManagement::GearClass_def::type gea
return {0, 100000};
return *it;
}
int getMinDistance(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId) { return getMinMaxDistance(gearClass, chargeTypeId).first; }
int getMaxDistance(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId) { return getMinMaxDistance(gearClass, chargeTypeId).second; }
int getMinDistance(ProjectDataManagement::GearClass gearClass, int chargeTypeId) { return getMinMaxDistance(gearClass, chargeTypeId).first; }
int getMaxDistance(ProjectDataManagement::GearClass gearClass, int chargeTypeId) { return getMinMaxDistance(gearClass, chargeTypeId).second; }
QPair<int, int> getMinMaxFlightDurationSec(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId)
QPair<int, int> getMinMaxFlightDurationSec(ProjectDataManagement::GearClass gearClass, int chargeTypeId)
{
@@ -121,15 +121,15 @@ QPair<int, int> getMinMaxFlightDurationSec(ProjectDataManagement::GearClass::inn
static QHash<int, QPair<int, int>> contraintsFlightDuration;
if (contraintsFlightDuration.isEmpty())
{
contraintsFlightDuration.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Artillery), {6, 150});
contraintsFlightDuration.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Mortar), {20, 60});
contraintsFlightDuration.insert(static_cast<int>(ProjectDataManagement::GearClass::Artillery), {6, 150});
contraintsFlightDuration.insert(static_cast<int>(ProjectDataManagement::GearClass::Mortar), {20, 60});
}
static QHash<int, QPair<int, int>> contraintsFlightDurationVulcano;
if (contraintsFlightDurationVulcano.isEmpty())
{
contraintsFlightDurationVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Artillery), {0, 999});
contraintsFlightDurationVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Rocket), {0, 999});
contraintsFlightDurationVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass::Artillery), {0, 999});
contraintsFlightDurationVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass::Rocket), {0, 999});
}
if (chargeTypeIdIsVulcano(chargeTypeId))
{
@@ -145,16 +145,16 @@ QPair<int, int> getMinMaxFlightDurationSec(ProjectDataManagement::GearClass::inn
return {10, 100};
return *it;
}
int getMinFlightDurationSec(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId)
int getMinFlightDurationSec(ProjectDataManagement::GearClass gearClass, int chargeTypeId)
{
return getMinMaxFlightDurationSec(gearClass, chargeTypeId).first;
}
int getMaxFlightDurationSec(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId)
int getMaxFlightDurationSec(ProjectDataManagement::GearClass gearClass, int chargeTypeId)
{
return getMinMaxFlightDurationSec(gearClass, chargeTypeId).second;
}
QPair<int, int> getMinMaxPeakHeight(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId)
QPair<int, int> getMinMaxPeakHeight(ProjectDataManagement::GearClass gearClass, int chargeTypeId)
{
@@ -165,15 +165,15 @@ QPair<int, int> getMinMaxPeakHeight(ProjectDataManagement::GearClass::inner_enum
static QHash<int, QPair<int, int>> contraintsPeak;
if (contraintsPeak.isEmpty())
{
contraintsPeak.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Artillery), {250, 15000});
contraintsPeak.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Mortar), {500, 3000});
contraintsPeak.insert(static_cast<int>(ProjectDataManagement::GearClass::Artillery), {250, 15000});
contraintsPeak.insert(static_cast<int>(ProjectDataManagement::GearClass::Mortar), {500, 3000});
}
static QHash<int, QPair<int, int>> contraintsPeakVulcano;
if (contraintsPeakVulcano.isEmpty())
{
contraintsPeakVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Artillery), {1000, 37500});
contraintsPeakVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Rocket), {1000, 37500});
contraintsPeakVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass::Artillery), {1000, 37500});
contraintsPeakVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass::Rocket), {1000, 37500});
}
if (chargeTypeIdIsVulcano(chargeTypeId))
{
@@ -190,8 +190,8 @@ QPair<int, int> getMinMaxPeakHeight(ProjectDataManagement::GearClass::inner_enum
return {100, 10000};
return *it;
}
int getMinPeakHeight(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId) { return getMinMaxPeakHeight(gearClass, chargeTypeId).first; }
int getMaxPeakHeight(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId) { return getMinMaxPeakHeight(gearClass, chargeTypeId).second; }
int getMinPeakHeight(ProjectDataManagement::GearClass gearClass, int chargeTypeId) { return getMinMaxPeakHeight(gearClass, chargeTypeId).first; }
int getMaxPeakHeight(ProjectDataManagement::GearClass gearClass, int chargeTypeId) { return getMinMaxPeakHeight(gearClass, chargeTypeId).second; }
@@ -241,11 +241,11 @@ ExplosionsEdit::ExplosionsEdit(const QString &menuGroup, QWidget *parent)
s_dropAngleUp = 70;
m_geometrieButtonGroup = new QButtonGroup(this);
m_geometrieButtonGroup->addButton(m_ui->geometrieAimPointBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint));
m_geometrieButtonGroup->addButton(m_ui->geometrieAreaBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgArea));
m_geometrieButtonGroup->addButton(m_ui->geometrieLineBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgLine));
m_geometrieButtonGroup->addButton(m_ui->geometriePointBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgPoint));
m_geometrieButtonGroup->addButton(m_ui->geometrieRadialBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgRadial));
m_geometrieButtonGroup->addButton(m_ui->geometrieAimPointBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgAimPoint));
m_geometrieButtonGroup->addButton(m_ui->geometrieAreaBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgArea));
m_geometrieButtonGroup->addButton(m_ui->geometrieLineBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgLine));
m_geometrieButtonGroup->addButton(m_ui->geometriePointBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgPoint));
m_geometrieButtonGroup->addButton(m_ui->geometrieRadialBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgRadial));
m_geometrieButtonGroup->setExclusive(true);
m_gearClassFilter = {ProjectDataManagement::GearClass::GearClass_Artillery, ProjectDataManagement::GearClass::GearClass_Mortar};
@@ -416,8 +416,8 @@ bool ExplosionsEdit::init(int aesItemId, bool copy, LtsSession::LtsSession *sess
}
m_explosionClusterData.explosionGeometry(AreaEffectSimulation::AesExplosionGeometry_def::EgArea);
onGeometrySelected(static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgArea));
m_explosionClusterData.explosionGeometry(AreaEffectSimulation::AesExplosionGeometry::EgArea);
onGeometrySelected(static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgArea));
m_pdmCbx->fillFirePurposeComboBox(m_ui->cbFirePurpose);
@@ -469,7 +469,7 @@ bool ExplosionsEdit::init(int aesItemId, bool copy, LtsSession::LtsSession *sess
if (copy)
{
m_aesItem.id(0);
m_aesItem.effectStateId(AreaEffectSimulation::AesEffectState_def::get_default());
m_aesItem.effectStateId(AreaEffectSimulation::AesEffectState::get_default());
m_explosionClusterData.id(m_aesItem.id());
m_explosionClusterData.effectStateId(m_aesItem.effectStateId());
}
@@ -530,22 +530,22 @@ void ExplosionsEdit::setExplosionClusterData(const ExplosionCluster &ecData)
m_ui->dteEffectStart->setMsecsSinceEpoch(ecData.effectStart().is_set() ? ecData.effectStart().get() : 0);
const AreaEffectSimulation::AesExplosionGeometry_def::type geometryType = ecData.explosionGeometry().underlying();
const AreaEffectSimulation::AesExplosionGeometry geometryType = static_cast<AreaEffectSimulation::AesExplosionGeometry>(ecData.explosionGeometry());
switch (geometryType)
{
case AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgAimPoint:
m_ui->geometrieAimPointBtn->setChecked(true);
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgPoint:
m_ui->geometriePointBtn->setChecked(true);
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgArea:
case AreaEffectSimulation::AesExplosionGeometry::EgArea:
m_ui->geometrieAreaBtn->setChecked(true);
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgLine:
case AreaEffectSimulation::AesExplosionGeometry::EgLine:
m_ui->geometrieLineBtn->setChecked(true);
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgRadial:
case AreaEffectSimulation::AesExplosionGeometry::EgRadial:
m_ui->geometrieRadialBtn->setChecked(true);
break;
default:
@@ -614,7 +614,7 @@ void ExplosionsEdit::setExplosionClusterData(const ExplosionCluster &ecData)
setCoord(centerpoint);
}
if (ecData.explosionGeometry().underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgRadial)
if (ecData.explosionGeometry().underlying() == AreaEffectSimulation::AesExplosionGeometry::EgRadial)
{
m_ui->sbDimensionY_Tiefe->setValue(areaRef.height() / 2);
m_ui->sbDimensionX_BreiteRadius->setValue(areaRef.width() / 2);
@@ -696,11 +696,11 @@ void ExplosionsEdit::onChargeTypeChanged()
phfd = FlighDurationOrPeakHeight::FDPH_flightDuration;
const qint32 gearClassId = m_ui->cbGearClass->currentData().toInt();
ProjectDataManagement::GearClass::type gearClassType = static_cast<ProjectDataManagement::GearClass::type>(gearClassId);
ProjectDataManagement::GearClass gearClassType = static_cast<ProjectDataManagement::GearClass>(gearClassId);
setMinMaxConstraints(phfd, gearClassType, chargeTypeId);
if (m_currentGeometry.underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgPoint)
if (m_currentGeometry.underlying() == AreaEffectSimulation::AesExplosionGeometry::EgPoint)
{
int igniterTypeId = m_ui->cbIgniterType->currentData().toInt();
const double impactRadius = m_pdmDtc->impactRadius(chargeTypeId, igniterTypeId, 0);
@@ -792,7 +792,7 @@ void ExplosionsEdit::getPosition()
switch (m_currentGeometry.underlying())
{
case AreaEffectSimulation::AesExplosionGeometry_def::EgArea:
case AreaEffectSimulation::AesExplosionGeometry::EgArea:
{
const bool isNull = qFuzzyCompare(m_coord.x(), 0) && qFuzzyCompare(m_coord.y(), 0);
const QPointF bottomLeft(Polygons::centerPoint2BottomLeft(m_coord,
@@ -815,17 +815,17 @@ void ExplosionsEdit::getPosition()
return;
}
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint:
case AreaEffectSimulation::AesExplosionGeometry_def::EgPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgAimPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgPoint:
m_sitMapGuiIfc->getCoordinate(this, SLOT(onCoordinate(QPointF)), nullptr);
return;
case AreaEffectSimulation::AesExplosionGeometry_def::EgLine:
case AreaEffectSimulation::AesExplosionGeometry::EgLine:
{
m_sitMapGuiIfc->getPolyline(this, SLOT(onPolylineData(QPolygonF)), nullptr, 2, 2, -1, -1, getCoordinatesQPointF());
return;
}
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgRadial:
case AreaEffectSimulation::AesExplosionGeometry::EgRadial:
m_sitMapGuiIfc->getCircle(this,
SLOT(onCircleData(QPointF, double)),
nullptr,
@@ -1024,7 +1024,7 @@ void ExplosionsEdit::onDropAngleChanged() { doCalculations(true); }
void ExplosionsEdit::onWidthChanged(int width)
{
if (m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgRadial)
if (m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgRadial)
{
m_ui->sbDimensionY_Tiefe->setValue(width);
@@ -1123,7 +1123,7 @@ void ExplosionsEdit::onFlightDurationChanged(int data)
void ExplosionsEdit::onEffectDurationChanged(int value) { m_ui->sbDurationSec->setToolTip(QDateTime::fromSecsSinceEpoch(value).toString(QStringLiteral("mm:ss"))); }
void ExplosionsEdit::setMinMaxConstraints(ExplosionsEdit::FlighDurationOrPeakHeight phfd, ProjectDataManagement::GearClass_def::type gearClass, int chargeTypeId)
void ExplosionsEdit::setMinMaxConstraints(ExplosionsEdit::FlighDurationOrPeakHeight phfd, ProjectDataManagement::GearClass gearClass, int chargeTypeId)
{
DEBUG_LOG(m_logger) << " setMinMaxConstraints START";
@@ -1176,7 +1176,7 @@ bool ExplosionsEdit::setValueAccordingContraints(int newValue, ExplosionsEdit::F
bool bRet = false;
const qint32 gearClassId = m_ui->cbGearClass->currentData().toInt();
const ProjectDataManagement::GearClass::type gearClass = static_cast<ProjectDataManagement::GearClass::type>(gearClassId);
const ProjectDataManagement::GearClass gearClass = static_cast<ProjectDataManagement::GearClass>(gearClassId);
const qint32 chargeTypeId = m_ui->cbChargeType->currentData().toInt();
switch (phfd)
@@ -1242,7 +1242,7 @@ void ExplosionsEdit::switchTo(FlighDurationOrPeakHeight phfd)
}
const qint32 gearClassId = m_ui->cbGearClass->currentData().toInt();
ProjectDataManagement::GearClass::type gearClassType = static_cast<ProjectDataManagement::GearClass::type>(gearClassId);
ProjectDataManagement::GearClass gearClassType = static_cast<ProjectDataManagement::GearClass>(gearClassId);
const qint32 chargeTypeId = m_ui->cbChargeType->currentData().toInt();
setMinMaxConstraints(phfd, gearClassType, chargeTypeId);
}
@@ -1273,7 +1273,7 @@ void ExplosionsEdit::doCalculations(bool executeEnableUiElements)
return;
if ((m_explosionClusterData.effectStateId() == AesEffectState_def::EsPaused) || (m_explosionClusterData.effectStateId() == AesEffectState_def::EsExpired))
if ((m_explosionClusterData.effectStateId() == AesEffectState::EsPaused) || (m_explosionClusterData.effectStateId() == AesEffectState::EsExpired))
return;
DoCalculationsExitGuard exitGuard(this, executeEnableUiElements);
@@ -1519,7 +1519,7 @@ void ExplosionsEdit::doCalculations(bool executeEnableUiElements)
const qint32 gearClassId = m_ui->cbGearClass->currentData().toInt();
ProjectDataManagement::GearClass::type gearClassType = static_cast<ProjectDataManagement::GearClass::type>(gearClassId);
ProjectDataManagement::GearClass gearClassType = static_cast<ProjectDataManagement::GearClass>(gearClassId);
const qint32 chargeTypeId = m_ui->cbChargeType->currentData().toInt();
@@ -1670,10 +1670,10 @@ void ExplosionsEdit::handleLaserPrecisionChargeType(const int chargeTypeId)
const auto geoButtons = m_geometrieButtonGroup->buttons();
if (chargeTypeId == s_laserPrecisionChargeTypeId)
{
onGeometrySelected(static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgPoint));
onGeometrySelected(static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgPoint));
for (QAbstractButton *btn : geoButtons)
{
if (m_geometrieButtonGroup->id(btn) != static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgPoint))
if (m_geometrieButtonGroup->id(btn) != static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgPoint))
btn->setCheckable(false);
}
}
@@ -1767,15 +1767,15 @@ void ExplosionsEdit::enableUiElements(bool enable)
m_ui->pbPosition->setEnabled(m_sitMapGuiIfc && enable);
m_ui->positionEdit->setEnabled(enable);
m_ui->sbDimensionX_BreiteRadius->setEnabled(enable
&& (m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgArea
|| m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgRadial
|| m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgLine));
m_ui->sbDimensionY_Tiefe->setEnabled(enable && m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgArea);
&& (m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgArea
|| m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgRadial
|| m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgLine));
m_ui->sbDimensionY_Tiefe->setEnabled(enable && m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgArea);
m_ui->sbHeight1SBox->setEnabled(enable);
m_ui->sbHeight2SBox->setEnabled(enable && m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgLine);
m_ui->sbHeight2SBox->setEnabled(enable && m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgLine);
m_ui->sbAimingAxis->setEnabled(
enable
&& (m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgArea || m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgLine));
&& (m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgArea || m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgLine));
m_ui->cbFirePurpose->setEnabled(enable);
m_ui->cbGearClass->setEnabled(enable);
m_ui->cbActors->setEnabled(enable & m_ui->gbEffectMarkingInTa->isChecked());
@@ -1792,8 +1792,8 @@ void ExplosionsEdit::enableUiElements(bool enable)
m_ui->leZpNumber->setEnabled((enable || isOnlyNameModifiable()) && m_aesItem.effectStateId() != AesEffectState_def::EsActivated);
m_ui->leElement->setEnabled((enable || isOnlyNameModifiable()) && m_aesItem.effectStateId() != AesEffectState_def::EsActivated);
m_ui->leZpNumber->setEnabled((enable || isOnlyNameModifiable()) && m_aesItem.effectStateId() != AesEffectState::EsActivated);
m_ui->leElement->setEnabled((enable || isOnlyNameModifiable()) && m_aesItem.effectStateId() != AesEffectState::EsActivated);
m_ui->pbClear->setEnabled(enable);
@@ -1879,7 +1879,7 @@ void ExplosionsEdit::enableUiFireButton()
if (!enableBasics)
return;
if (m_explosionClusterData.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired)
if (m_explosionClusterData.effectStateId() == AreaEffectSimulation::AesEffectState::EsExpired)
return;
int numberTrajectoriesRef = 0;
@@ -1927,7 +1927,7 @@ void ExplosionsEdit::enableUiFireButton()
else
{
if (m_explosionClusterData.effectStateId() == AesEffectState_def::EsPaused)
if (m_explosionClusterData.effectStateId() == AesEffectState::EsPaused)
bPause = false;
}
}
@@ -1966,26 +1966,26 @@ void ExplosionsEdit::showPreviewObject()
switch (m_currentGeometry.underlying())
{
case AreaEffectSimulation::AesExplosionGeometry_def::EgArea:
case AreaEffectSimulation::AesExplosionGeometry::EgArea:
if (m_previewPolygon.isEmpty())
return;
m_sitMapGuiIfc->displayPreviewObject(this, m_previewPolygon, true);
return;
case AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint:
case AreaEffectSimulation::AesExplosionGeometry_def::EgPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgAimPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgPoint:
if (m_previewCircleCenter.isNull())
return;
m_sitMapGuiIfc->displayPreviewObject(this, m_previewCircleCenter, m_previewCircleRadius);
return;
case AreaEffectSimulation::AesExplosionGeometry_def::EgLine:
case AreaEffectSimulation::AesExplosionGeometry::EgLine:
if (m_previewPolygon.isEmpty())
return;
m_sitMapGuiIfc->displayPreviewObject(this, m_previewPolygon, false);
return;
case AreaEffectSimulation::AesExplosionGeometry_def::EgRadial:
case AreaEffectSimulation::AesExplosionGeometry::EgRadial:
if (m_previewCircleCenter.isNull())
return;
@@ -2013,7 +2013,7 @@ bool ExplosionsEdit::isDataSufficiant()
bool bHasTargetArea = !m_coord.isNull();
switch (m_currentGeometry.underlying())
{
case AreaEffectSimulation::AesExplosionGeometry_def::EgArea:
case AreaEffectSimulation::AesExplosionGeometry::EgArea:
bHasTargetArea &= m_ui->sbDimensionX_BreiteRadius->value() > 0;
bHasTargetArea &= m_ui->sbDimensionY_Tiefe->value() > 0;
break;
@@ -2054,7 +2054,7 @@ bool ExplosionsEdit::apply()
switch (m_currentGeometry.underlying())
{
case AesExplosionGeometry_def::EgRadial:
case AesExplosionGeometry::EgRadial:
{
QPointF bottomLeft(Polygons::centerPoint2BottomLeft(m_coord, m_ui->sbDimensionX_BreiteRadius->value() * 2, m_ui->sbDimensionY_Tiefe->value() * 2, 0.0));
bottomLeftGeo = Core::GeoPosition2D(bottomLeft.x(), bottomLeft.y());
@@ -2065,7 +2065,7 @@ bool ExplosionsEdit::apply()
break;
}
case AesExplosionGeometry_def::EgLine:
case AesExplosionGeometry::EgLine:
{
const QLineF line(m_ui->positionEdit->coordinate(), m_ui->positionEdit_2->coordinate());
@@ -2081,9 +2081,9 @@ bool ExplosionsEdit::apply()
break;
}
case AesExplosionGeometry_def::EgAimPoint:
case AesExplosionGeometry_def::EgArea:
case AesExplosionGeometry_def::EgPoint:
case AesExplosionGeometry::EgAimPoint:
case AesExplosionGeometry::EgArea:
case AesExplosionGeometry::EgPoint:
default:
{
QPointF bottomLeft(Polygons::centerPoint2BottomLeft(m_coord,
@@ -2118,7 +2118,7 @@ bool ExplosionsEdit::apply()
request.esmParticipantIds().push_back(esmParticipantId2);
}
if (bIsPoint || m_currentGeometry.underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgRadial)
if (bIsPoint || m_currentGeometry.underlying() == AreaEffectSimulation::AesExplosionGeometry::EgRadial)
request.area().rotation(0);
else
request.area().rotation((m_ui->sbAimingAxis->value() - 1600) * 360.0 / 6400);
@@ -2223,7 +2223,7 @@ bool ExplosionsEdit::apply()
void ExplosionsEdit::onGeometrySelected(int explosionGeometryInt)
{
const AreaEffectSimulation::AesExplosionGeometry::inner_enum newGeometry = static_cast<AreaEffectSimulation::AesExplosionGeometry::inner_enum>(explosionGeometryInt);
const AreaEffectSimulation::AesExplosionGeometry newGeometry = static_cast<AreaEffectSimulation::AesExplosionGeometry>(explosionGeometryInt);
if (m_currentGeometry == newGeometry)
return;
@@ -2249,8 +2249,8 @@ void ExplosionsEdit::onGeometrySelected(int explosionGeometryInt)
switch (m_currentGeometry.underlying())
{
case AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint:
case AreaEffectSimulation::AesExplosionGeometry_def::EgPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgAimPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgPoint:
{
m_ui->lblRadiusBreite->setText(tr("Breite [m]"));
m_ui->sbHeight2SBox->setEnabled(false);
@@ -2275,7 +2275,7 @@ void ExplosionsEdit::onGeometrySelected(int explosionGeometryInt)
onChargeTypeChanged();
}
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgArea:
case AreaEffectSimulation::AesExplosionGeometry::EgArea:
{
m_ui->lblRadiusBreite->setText(tr("Breite [m]"));
m_ui->sbHeight2SBox->setEnabled(false);
@@ -2296,7 +2296,7 @@ void ExplosionsEdit::onGeometrySelected(int explosionGeometryInt)
m_ui->sbDurationSec->setSingleStep(60);
}
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgLine:
case AreaEffectSimulation::AesExplosionGeometry::EgLine:
{
m_ui->lblRadiusBreite->setText(tr("Breite [m]"));
m_ui->sbHeight2SBox->setEnabled(true);
@@ -2315,7 +2315,7 @@ void ExplosionsEdit::onGeometrySelected(int explosionGeometryInt)
m_ui->sbDurationSec->setValue(60);
}
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgRadial:
case AreaEffectSimulation::AesExplosionGeometry::EgRadial:
{
m_ui->lblRadiusBreite->setText(tr("Radius [m]"));
m_ui->sbHeight2SBox->setEnabled(false);
@@ -2351,10 +2351,10 @@ void ExplosionsEdit::onGeometrySelected(int explosionGeometryInt)
void ExplosionsEdit::onFireClicked()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
if (((m_aesItem.effectStateId() == AesEffectState_def::EsUnknown) ||
(m_aesItem.effectStateId() == AesEffectState_def::EsError) || (m_aesItem.effectStateId() == AesEffectState_def::EsExpired)
|| (m_aesItem.effectStateId() == AesEffectState_def::EsRemoved) || (m_aesItem.effectStateId() == AesEffectState_def::EsReceived)
|| (m_aesItem.effectStateId() == AesEffectState_def::EsFired)
if (((m_aesItem.effectStateId() == AesEffectState::EsUnknown) ||
(m_aesItem.effectStateId() == AesEffectState::EsError) || (m_aesItem.effectStateId() == AesEffectState::EsExpired)
|| (m_aesItem.effectStateId() == AesEffectState::EsRemoved) || (m_aesItem.effectStateId() == AesEffectState::EsReceived)
|| (m_aesItem.effectStateId() == AesEffectState::EsFired)
)
|| m_aesItem.id() <= 0)
@@ -2375,7 +2375,7 @@ void ExplosionsEdit::onFireClicked()
const bool bIsObjectModifiable = m_explosionClusterData.isObjectModifiable();
if ((m_aesItem.effectStateId() == AesEffectState_def::EsCreated || m_aesItem.effectStateId() == AesEffectState_def::EsPrepared) && bIsObjectModifiable)
if ((m_aesItem.effectStateId() == AesEffectState::EsCreated || m_aesItem.effectStateId() == AesEffectState::EsPrepared) && bIsObjectModifiable)
{
m_ui->dteEffectStart->setMsecsSinceEpoch(m_session->partitionTime() + m_temporaryData.m_estimatedFlightDurationMsec + 5000);
m_ui->dteEffectStart->setChecked(true);
@@ -2433,7 +2433,7 @@ void ExplosionsEdit::onFireClicked()
void ExplosionsEdit::onGearClassChanged()
{
const ProjectDataManagement::GearClass_def::type newGearClassType = static_cast<ProjectDataManagement::GearClass_def::type>(m_ui->cbGearClass->currentData().toInt());
const ProjectDataManagement::GearClass newGearClassType = static_cast<ProjectDataManagement::GearClass>(m_ui->cbGearClass->currentData().toInt());
{
QSignalBlocker sb(m_ui->cbChargeType);
fillCharges();
@@ -2441,10 +2441,10 @@ void ExplosionsEdit::onGearClassChanged()
fillParties();
onPartyChanged();
ProjectDataManagement::GearClass_def::type lastGearClassType = ProjectDataManagement::GearClass_def::Mortar;
ProjectDataManagement::GearClass lastGearClassType = ProjectDataManagement::GearClass::Mortar;
QVariant lastVal = m_ui->cbGearClass->property(LAST_VALUE);
if (!lastVal.isNull())
lastGearClassType = static_cast<ProjectDataManagement::GearClass_def::type>(lastVal.toInt());
lastGearClassType = static_cast<ProjectDataManagement::GearClass>(lastVal.toInt());
{
@@ -2584,7 +2584,7 @@ void ExplosionsEdit::fillCharges()
return;
}
const ProjectDataManagement::GearClass_def::type curGearClassType = static_cast<ProjectDataManagement::GearClass_def::type>(m_ui->cbGearClass->currentData().toInt());
const ProjectDataManagement::GearClass curGearClassType = static_cast<ProjectDataManagement::GearClass>(m_ui->cbGearClass->currentData().toInt());
const auto chargesForGearClass = m_pdmDtc->chargesForGearClass(curGearClassType);
const int curCtDataToRestore = m_ui->cbChargeType->currentData().toInt();
@@ -2609,7 +2609,7 @@ void ExplosionsEdit::fillCharges()
DEBUG_LOG(m_logger) << " fillCharges"
<< ", id=" << chargeType.id() << ", name= " << chargeType.name() << ", bIsPoint " << bIsPoint << ", bIsVulcano " << bIsVulcano
<< ", impactRadius4Debug = " << impactRadius4Debug << ", isAdlerChargeType = " << isAdlerChargeType;
if (isAdlerChargeType || (bIsVulcano && !bIsPoint && curGearClassType != ProjectDataManagement::GearClass_def::Artillery))
if (isAdlerChargeType || (bIsVulcano && !bIsPoint && curGearClassType != ProjectDataManagement::GearClass::Artillery))
continue;
m_ui->cbChargeType->addItem(QString::fromStdString(chargeType.name()), chargeType.id());
}
@@ -111,7 +111,7 @@ private Q_SLOTS:
void onEffectDurationChanged(int value);
void switchTo(FlighDurationOrPeakHeight phfd);
void setMinMaxConstraints(ExplosionsEdit::FlighDurationOrPeakHeight phfd, ProjectDataManagement::GearClass_def::type gearClass, int chargeTypeId);
void setMinMaxConstraints(ExplosionsEdit::FlighDurationOrPeakHeight phfd, ProjectDataManagement::GearClass gearClass, int chargeTypeId);
bool setValueAccordingContraints(int newValue, ExplosionsEdit::FlighDurationOrPeakHeight phfd);
bool isGuiVulcano();
@@ -88,11 +88,11 @@ ExplosionsEditAdler::ExplosionsEditAdler(const QString &menuGroup, QWidget *pare
m_ui->setupUi(this);
m_geometrieButtonGroup = new QButtonGroup(this);
m_geometrieButtonGroup->addButton(m_ui->geometrieAimPointBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint));
m_geometrieButtonGroup->addButton(m_ui->geometrieAreaBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgArea));
m_geometrieButtonGroup->addButton(m_ui->geometrieLineBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgLine));
m_geometrieButtonGroup->addButton(m_ui->geometriePointBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgPoint));
m_geometrieButtonGroup->addButton(m_ui->geometrieRadialBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgRadial));
m_geometrieButtonGroup->addButton(m_ui->geometrieAimPointBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgAimPoint));
m_geometrieButtonGroup->addButton(m_ui->geometrieAreaBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgArea));
m_geometrieButtonGroup->addButton(m_ui->geometrieLineBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgLine));
m_geometrieButtonGroup->addButton(m_ui->geometriePointBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgPoint));
m_geometrieButtonGroup->addButton(m_ui->geometrieRadialBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgRadial));
m_geometrieButtonGroup->setExclusive(true);
m_gearClassFilter = {ProjectDataManagement::GearClass::Artillery, ProjectDataManagement::GearClass::Mortar};
@@ -220,20 +220,20 @@ void ExplosionsEditAdler::showPreviewObject()
switch (m_currentGeometry.underlying())
{
case AreaEffectSimulation::AesExplosionGeometry_def::EgArea:
case AreaEffectSimulation::AesExplosionGeometry::EgArea:
if (m_previewPolygon.isEmpty())
return;
m_sitMapGuiIfc->displayPreviewObject(this, m_previewPolygon, true);
return;
case AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint:
case AreaEffectSimulation::AesExplosionGeometry_def::EgPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgAimPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgPoint:
if (m_previewCircleCenter.isNull())
return;
m_sitMapGuiIfc->displayPreviewObject(this, m_previewPolygon, false);
return;
case AreaEffectSimulation::AesExplosionGeometry_def::EgRadial:
case AreaEffectSimulation::AesExplosionGeometry::EgRadial:
if (m_previewCircleCenter.isNull())
return;
@@ -260,7 +260,7 @@ bool ExplosionsEditAdler::isDataSufficiant()
bool bHasTargetArea = !m_coord.isNull();
switch (m_currentGeometry.underlying())
{
case AreaEffectSimulation::AesExplosionGeometry_def::EgArea:
case AreaEffectSimulation::AesExplosionGeometry::EgArea:
bHasTargetArea &= m_ui->lblDimensionYDepth->text().toInt() > 0;
bHasTargetArea &= m_ui->lblWidthRadius->text().toInt() > 0;
break;
@@ -290,7 +290,7 @@ void ExplosionsEditAdler::setEffectClusterData(const EffectCluster &ecData)
if (ecData.effectStart().is_set())
{
const QJsonObject propsObj(QJsonDocument::fromJson(QByteArray::fromStdString(ecData.properties())).object());
const FiringType firingType = static_cast<FiringType::inner_enum>(propsObj[AdlerJson::JsonKeys::ABFEUERUNGSART()].toInt());
const FiringType firingType = static_cast<FiringType>(propsObj[AdlerJson::JsonKeys::ABFEUERUNGSART()].toInt());
effectStart = ecData.effectStart().get();
@@ -301,22 +301,22 @@ void ExplosionsEditAdler::setEffectClusterData(const EffectCluster &ecData)
m_ui->dteEffectStart->setMsecsSinceEpoch(effectStart);
// Geometry/Area
const AreaEffectSimulation::AesExplosionGeometry_def::type geometryType = ecData.explosionGeometry().underlying();
const AreaEffectSimulation::AesExplosionGeometry geometryType = static_cast<AreaEffectSimulation::AesExplosionGeometry>(ecData.explosionGeometry());
switch (geometryType)
{
case AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgAimPoint:
m_ui->geometrieAimPointBtn->setChecked(true);
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgPoint:
m_ui->geometriePointBtn->setChecked(true);
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgArea:
case AreaEffectSimulation::AesExplosionGeometry::EgArea:
m_ui->geometrieAreaBtn->setChecked(true);
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgLine:
case AreaEffectSimulation::AesExplosionGeometry::EgLine:
m_ui->geometrieLineBtn->setChecked(true);
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgRadial:
case AreaEffectSimulation::AesExplosionGeometry::EgRadial:
m_ui->geometrieRadialBtn->setChecked(true);
break;
default:
@@ -380,7 +380,7 @@ void ExplosionsEditAdler::setEffectClusterData(const EffectCluster &ecData)
m_esmActorCbx->fillActorComboBox(m_ui->cbActors_2, coordGeo, isSmoke, 0);
}
if (ecData.explosionGeometry().underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgRadial)
if (ecData.explosionGeometry().underlying() == AreaEffectSimulation::AesExplosionGeometry::EgRadial)
{
m_ui->lblDimensionYDepth->setText(QString::number(static_cast<int>(std::round(areaRef.height() / 2))));
m_ui->lblWidthRadius->setText(QString::number(static_cast<int>(std::round(areaRef.width() / 2))));
@@ -556,7 +556,7 @@ void ExplosionsEditAdler::enableUiElements(bool enable)
m_ui->rbAngleGroupLower->setEnabled(enable);
m_ui->rbAngleGroupUpper->setEnabled(enable);
if (m_aesItem.effectStateId() == AesEffectState_def::EsReceived)
if (m_aesItem.effectStateId() == AesEffectState::EsReceived)
m_ui->pbStateChange->setEnabled(true);
else
m_ui->pbStateChange->setEnabled(m_effectClusterData.effectorState() != AreaEffectSimulation::AesEffectorState::EsReadyToFire);
@@ -600,7 +600,7 @@ void ExplosionsEditAdler::setPbStateChangeName()
m_ui->pbStateChange->show();
if (m_aesItem.effectStateId() == AesEffectState_def::EsReceived)
if (m_aesItem.effectStateId() == AesEffectState::EsReceived)
m_ui->pbStateChange->setText(tr("Acknowledge"));
else
{
@@ -624,7 +624,7 @@ void ExplosionsEditAdler::onPbStateChangeClicked()
// Re-Enable PB, so we can call it another time, if it does not react...
QTimer::singleShot(2000, [this]() { m_ui->pbStateChange->setEnabled(m_effectClusterData.effectorState() != AreaEffectSimulation::AesEffectorState::EsReadyToFire); });
if (m_aesItem.effectStateId() == AesEffectState_def::EsReceived)
if (m_aesItem.effectStateId() == AesEffectState::EsReceived)
{
AreaEffectSimulation::AcknowledgeExternalAesItemRequest request;
request.aesId(m_aesItem.id());
@@ -758,7 +758,7 @@ void ExplosionsEditAdler::setEffectClusterDataFromJson(const std::string &proper
else
m_ui->rbAngleGroupUpper->setChecked(true);
const FiringType &firingType = static_cast<FiringType::inner_enum>(propsObj[AdlerJson::JsonKeys::ABFEUERUNGSART()].toInt());
const FiringType &firingType = static_cast<FiringType>(propsObj[AdlerJson::JsonKeys::ABFEUERUNGSART()].toInt());
m_ui->lblFiringType->setText(AreaEffectSimulation::toString(firingType));
}
@@ -67,7 +67,7 @@ static const char *const LAST_VALUE = "LAST_VALUE";
static QLatin1String emptyEntryComboBox = QLatin1String("--");
static const int ROLE_GEARTYPE_ID = Qt::UserRole + 1;
QPair<int, int> ExplosionsEditAdlerStandAlone::getMinMaxDistance(ProjectDataManagement::GearClass_def::type gearClass, int chargeTypeId)
QPair<int, int> ExplosionsEditAdlerStandAlone::getMinMaxDistance(ProjectDataManagement::GearClass gearClass, int chargeTypeId)
{
// [GUEZE-2458] Minimaler und maximaler Abstand Feuereinheit Wirkeld Steilfeuer
// Es soll zwischen dem Mittelpunkt der Feuereinheit und dem Mittelpunkt des zu bewirkenden Wirkfeldes folgender Abstand als Mindestabstand:
@@ -85,17 +85,17 @@ QPair<int, int> ExplosionsEditAdlerStandAlone::getMinMaxDistance(ProjectDataMana
static QHash<int, QPair<int, int>> contraintsDistance;
if (contraintsDistance.isEmpty())
{
contraintsDistance.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Artillery), {3500, 40000}); // Haubitze
contraintsDistance.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Mortar), {800, 7800}); // Mörser
// contraints.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Mortar), {15000, 90000}); // Rakete
// contraints.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Mortar), {10000, 38400}); // Minenrakete
contraintsDistance.insert(static_cast<int>(ProjectDataManagement::GearClass::Artillery), {3500, 40000}); // Haubitze
contraintsDistance.insert(static_cast<int>(ProjectDataManagement::GearClass::Mortar), {800, 7800}); // Mörser
// contraints.insert(static_cast<int>(ProjectDataManagement::GearClass::Mortar), {15000, 90000}); // Rakete
// contraints.insert(static_cast<int>(ProjectDataManagement::GearClass::Mortar), {10000, 38400}); // Minenrakete
}
static QHash<int, QPair<int, int>> contraintsDistanceVulcano;
if (contraintsDistanceVulcano.isEmpty())
{
contraintsDistanceVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Artillery), {10000, 70000}); // Haubitze
contraintsDistanceVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Rocket), {10000, 70000}); // Rakete
contraintsDistanceVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass::Artillery), {10000, 70000}); // Haubitze
contraintsDistanceVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass::Rocket), {10000, 70000}); // Rakete
}
if (chargeTypeIdIsVulcano(chargeTypeId))
{
@@ -111,16 +111,16 @@ QPair<int, int> ExplosionsEditAdlerStandAlone::getMinMaxDistance(ProjectDataMana
return {0, 100000};
return *it;
}
int ExplosionsEditAdlerStandAlone::getMinDistance(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId)
int ExplosionsEditAdlerStandAlone::getMinDistance(ProjectDataManagement::GearClass gearClass, int chargeTypeId)
{
return getMinMaxDistance(gearClass, chargeTypeId).first;
}
int ExplosionsEditAdlerStandAlone::getMaxDistance(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId)
int ExplosionsEditAdlerStandAlone::getMaxDistance(ProjectDataManagement::GearClass gearClass, int chargeTypeId)
{
return getMinMaxDistance(gearClass, chargeTypeId).second;
}
QPair<int, int> ExplosionsEditAdlerStandAlone::getMinMaxFlightDurationSec(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId)
QPair<int, int> ExplosionsEditAdlerStandAlone::getMinMaxFlightDurationSec(ProjectDataManagement::GearClass gearClass, int chargeTypeId)
{
// [GUEZE-2460] Grenzwert Flugdauer Steilfeuer
// Haubitze: von 6 bis 150 Sekunden
@@ -131,15 +131,15 @@ QPair<int, int> ExplosionsEditAdlerStandAlone::getMinMaxFlightDurationSec(Projec
static QHash<int, QPair<int, int>> contraintsFlightDuration;
if (contraintsFlightDuration.isEmpty())
{
contraintsFlightDuration.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Artillery), {6, 150}); // Haubitze
contraintsFlightDuration.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Mortar), {20, 60}); // Mörser
contraintsFlightDuration.insert(static_cast<int>(ProjectDataManagement::GearClass::Artillery), {6, 150}); // Haubitze
contraintsFlightDuration.insert(static_cast<int>(ProjectDataManagement::GearClass::Mortar), {20, 60}); // Mörser
}
static QHash<int, QPair<int, int>> contraintsFlightDurationVulcano;
if (contraintsFlightDurationVulcano.isEmpty())
{
contraintsFlightDurationVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Artillery), {0, 999}); // Haubitze
contraintsFlightDurationVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Rocket), {0, 999}); // Rakete
contraintsFlightDurationVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass::Artillery), {0, 999}); // Haubitze
contraintsFlightDurationVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass::Rocket), {0, 999}); // Rakete
}
if (chargeTypeIdIsVulcano(chargeTypeId))
{
@@ -155,16 +155,16 @@ QPair<int, int> ExplosionsEditAdlerStandAlone::getMinMaxFlightDurationSec(Projec
return {10, 100};
return *it;
}
int ExplosionsEditAdlerStandAlone::getMinFlightDurationSec(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId)
int ExplosionsEditAdlerStandAlone::getMinFlightDurationSec(ProjectDataManagement::GearClass gearClass, int chargeTypeId)
{
return getMinMaxFlightDurationSec(gearClass, chargeTypeId).first;
}
int ExplosionsEditAdlerStandAlone::getMaxFlightDurationSec(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId)
int ExplosionsEditAdlerStandAlone::getMaxFlightDurationSec(ProjectDataManagement::GearClass gearClass, int chargeTypeId)
{
return getMinMaxFlightDurationSec(gearClass, chargeTypeId).second;
}
QPair<int, int> ExplosionsEditAdlerStandAlone::getMinMaxPeakHeight(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId)
QPair<int, int> ExplosionsEditAdlerStandAlone::getMinMaxPeakHeight(ProjectDataManagement::GearClass gearClass, int chargeTypeId)
{
// [GUEZE-2460] Grenzwert Flugdauer Steilfeuer
// Haubitze: von 250 bis 15000m
@@ -175,15 +175,15 @@ QPair<int, int> ExplosionsEditAdlerStandAlone::getMinMaxPeakHeight(ProjectDataMa
static QHash<int, QPair<int, int>> contraintsPeak;
if (contraintsPeak.isEmpty())
{
contraintsPeak.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Artillery), {250, 15000}); // Haubitze
contraintsPeak.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Mortar), {500, 3000}); // Mörser
contraintsPeak.insert(static_cast<int>(ProjectDataManagement::GearClass::Artillery), {250, 15000}); // Haubitze
contraintsPeak.insert(static_cast<int>(ProjectDataManagement::GearClass::Mortar), {500, 3000}); // Mörser
}
static QHash<int, QPair<int, int>> contraintsPeakVulcano;
if (contraintsPeakVulcano.isEmpty())
{
contraintsPeakVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Artillery), {1000, 37500}); // Haubitze
contraintsPeakVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass_def::Rocket), {1000, 37500}); // Rakete
contraintsPeakVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass::Artillery), {1000, 37500}); // Haubitze
contraintsPeakVulcano.insert(static_cast<int>(ProjectDataManagement::GearClass::Rocket), {1000, 37500}); // Rakete
}
if (chargeTypeIdIsVulcano(chargeTypeId))
{
@@ -200,19 +200,19 @@ QPair<int, int> ExplosionsEditAdlerStandAlone::getMinMaxPeakHeight(ProjectDataMa
return {100, 10000};
return *it;
}
int ExplosionsEditAdlerStandAlone::getMinPeakHeight(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId)
int ExplosionsEditAdlerStandAlone::getMinPeakHeight(ProjectDataManagement::GearClass gearClass, int chargeTypeId)
{
return getMinMaxPeakHeight(gearClass, chargeTypeId).first;
}
int ExplosionsEditAdlerStandAlone::getMaxPeakHeight(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId)
int ExplosionsEditAdlerStandAlone::getMaxPeakHeight(ProjectDataManagement::GearClass gearClass, int chargeTypeId)
{
return getMinMaxPeakHeight(gearClass, chargeTypeId).second;
}
bool ExplosionsEditAdlerStandAlone::isPointSimilar(AreaEffectSimulation::AesExplosionGeometry geometry)
{
return (geometry.underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint)
|| (geometry.underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgPoint);
return (geometry.underlying() == AreaEffectSimulation::AesExplosionGeometry::EgAimPoint)
|| (geometry.underlying() == AreaEffectSimulation::AesExplosionGeometry::EgPoint);
}
/*!
@@ -270,11 +270,11 @@ ExplosionsEditAdlerStandAlone::ExplosionsEditAdlerStandAlone(const QString &menu
headline->setAlignment(Qt::AlignCenter);
m_geometrieButtonGroup = new QButtonGroup(this);
m_geometrieButtonGroup->addButton(m_ui->geometrieAimPointBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint));
m_geometrieButtonGroup->addButton(m_ui->geometrieAreaBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgArea));
m_geometrieButtonGroup->addButton(m_ui->geometrieLineBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgLine));
m_geometrieButtonGroup->addButton(m_ui->geometriePointBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgPoint));
m_geometrieButtonGroup->addButton(m_ui->geometrieRadialBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgRadial));
m_geometrieButtonGroup->addButton(m_ui->geometrieAimPointBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgAimPoint));
m_geometrieButtonGroup->addButton(m_ui->geometrieAreaBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgArea));
m_geometrieButtonGroup->addButton(m_ui->geometrieLineBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgLine));
m_geometrieButtonGroup->addButton(m_ui->geometriePointBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgPoint));
m_geometrieButtonGroup->addButton(m_ui->geometrieRadialBtn, static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgRadial));
m_geometrieButtonGroup->setExclusive(true);
m_gearClassFilter = {ProjectDataManagement::GearClass::Artillery, ProjectDataManagement::GearClass::Mortar};
@@ -506,8 +506,8 @@ bool ExplosionsEditAdlerStandAlone::init(int aesItemId, bool copy, LtsSession::L
m_ui->startBtn->setEnabled(false);
// initial adjustment:
m_effectClusterData.explosionGeometry(AreaEffectSimulation::AesExplosionGeometry_def::EgArea);
onGeometrySelected(static_cast<int>(AreaEffectSimulation::AesExplosionGeometry_def::EgArea));
m_effectClusterData.explosionGeometry(AreaEffectSimulation::AesExplosionGeometry::EgArea);
onGeometrySelected(static_cast<int>(AreaEffectSimulation::AesExplosionGeometry::EgArea));
// pay attention!!! firePurposeId vs purpose !!!
m_pdmCbx->fillFirePurposeComboBox(m_ui->cbFirePurpose);
@@ -569,7 +569,7 @@ bool ExplosionsEditAdlerStandAlone::init(int aesItemId, bool copy, LtsSession::L
if (copy)
{
m_aesItem.id(0);
m_aesItem.effectStateId(AreaEffectSimulation::AesEffectState_def::get_default());
m_aesItem.effectStateId(AreaEffectSimulation::AesEffectState::get_default());
m_effectClusterData.id(m_aesItem.id());
m_effectClusterData.effectStateId(m_aesItem.effectStateId());
}
@@ -624,22 +624,22 @@ void ExplosionsEditAdlerStandAlone::setEffectClusterData(const EffectCluster &ec
m_ui->leElement->setText(QString::fromStdString(ecData.element()));
// Geometry/Area
const AreaEffectSimulation::AesExplosionGeometry_def::type geometryType = ecData.explosionGeometry().underlying();
const AreaEffectSimulation::AesExplosionGeometry geometryType = static_cast<AreaEffectSimulation::AesExplosionGeometry>(ecData.explosionGeometry());
switch (geometryType)
{
case AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgAimPoint:
m_ui->geometrieAimPointBtn->setChecked(true);
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgPoint:
m_ui->geometriePointBtn->setChecked(true);
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgArea:
case AreaEffectSimulation::AesExplosionGeometry::EgArea:
m_ui->geometrieAreaBtn->setChecked(true);
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgLine:
case AreaEffectSimulation::AesExplosionGeometry::EgLine:
m_ui->geometrieLineBtn->setChecked(true);
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgRadial:
case AreaEffectSimulation::AesExplosionGeometry::EgRadial:
m_ui->geometrieRadialBtn->setChecked(true);
break;
default:
@@ -709,7 +709,7 @@ void ExplosionsEditAdlerStandAlone::setEffectClusterData(const EffectCluster &ec
// with firingType
setEffectClusterDataFromJson(ecData.properties());
const FiringType::type firingType = static_cast<FiringType::type>(m_ui->cbFiringType->currentData().toInt());
const FiringType firingType = static_cast<FiringType>(m_ui->cbFiringType->currentData().toInt());
if (firingType == FiringType::FireWithIndicationTTF)
{
// in case of TTF the dte will be set via the setEffectClusterDataFromJson function
@@ -732,7 +732,7 @@ void ExplosionsEditAdlerStandAlone::setEffectClusterData(const EffectCluster &ec
setCoord(centerpoint);
}
if (ecData.explosionGeometry().underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgRadial)
if (ecData.explosionGeometry().underlying() == AreaEffectSimulation::AesExplosionGeometry::EgRadial)
{
m_ui->sbDimensionY_Tiefe->setValue(areaRef.height() / 2);
m_ui->sbDimensionX_BreiteRadius->setValue(areaRef.width() / 2);
@@ -793,11 +793,11 @@ void ExplosionsEditAdlerStandAlone::onChargeTypeChanged()
FlighDurationOrPeakHeight phfd = FlighDurationOrPeakHeight::FDPH_peakHeight;
const qint32 gearClassId = m_ui->cbGearClass->currentData().toInt();
ProjectDataManagement::GearClass::type gearClassType = static_cast<ProjectDataManagement::GearClass::type>(gearClassId);
ProjectDataManagement::GearClass gearClassType = static_cast<ProjectDataManagement::GearClass>(gearClassId);
setMinMaxConstraints(phfd, gearClassType, chargeTypeId);
// only for geometryType::Point:
if (m_currentGeometry.underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgPoint)
if (m_currentGeometry.underlying() == AreaEffectSimulation::AesExplosionGeometry::EgPoint)
{
int igniterTypeId = m_ui->cbIgniterType->currentData().toInt();
int igniterFunctionId = m_ui->cbIgniterFunction->currentData().toInt();
@@ -915,7 +915,7 @@ void ExplosionsEditAdlerStandAlone::getPosition()
switch (m_currentGeometry.underlying())
{
case AreaEffectSimulation::AesExplosionGeometry_def::EgArea:
case AreaEffectSimulation::AesExplosionGeometry::EgArea:
{
const bool isNull = qFuzzyCompare(m_coord.x(), 0) && qFuzzyCompare(m_coord.y(), 0);
const QPointF bottomLeft(Polygons::centerPoint2BottomLeft(m_coord,
@@ -938,16 +938,16 @@ void ExplosionsEditAdlerStandAlone::getPosition()
return;
}
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint:
case AreaEffectSimulation::AesExplosionGeometry_def::EgPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgAimPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgPoint:
m_sitMapGuiIfc->getCoordinate(this, SLOT(onCoordinate(QPointF)), nullptr);
return;
case AreaEffectSimulation::AesExplosionGeometry_def::EgLine:
case AreaEffectSimulation::AesExplosionGeometry::EgLine:
{
m_sitMapGuiIfc->getPolyline(this, SLOT(onPolylineData(QPolygonF)), nullptr, 2, 2, -1, -1, getCoordinatesQPointF());
return;
}
case AreaEffectSimulation::AesExplosionGeometry_def::EgRadial:
case AreaEffectSimulation::AesExplosionGeometry::EgRadial:
m_sitMapGuiIfc->getCircle(this,
SLOT(onCircleData(QPointF, double)),
nullptr,
@@ -1184,7 +1184,7 @@ void ExplosionsEditAdlerStandAlone::onFlightDurationChanged(int data)
void ExplosionsEditAdlerStandAlone::onEffectDurationChanged(int value) { m_ui->sbDurationSec->setToolTip(QTime(0, 0).addSecs(value).toString(QStringLiteral("mm:ss"))); }
void ExplosionsEditAdlerStandAlone::setMinMaxConstraints(ExplosionsEditAdlerStandAlone::FlighDurationOrPeakHeight phfd,
ProjectDataManagement::GearClass_def::type gearClass,
ProjectDataManagement::GearClass gearClass,
int chargeTypeId)
{
DEBUG_LOG(m_logger) << " setMinMaxConstraints START";
@@ -1218,7 +1218,7 @@ bool ExplosionsEditAdlerStandAlone::setValueAccordingContraints(int newValue, Ex
bool bRet = false;
const qint32 gearClassId = m_ui->cbGearClass->currentData().toInt();
const ProjectDataManagement::GearClass::type gearClass = static_cast<ProjectDataManagement::GearClass::type>(gearClassId);
const ProjectDataManagement::GearClass gearClass = static_cast<ProjectDataManagement::GearClass>(gearClassId);
const qint32 chargeTypeId = m_ui->cbChargeType->currentData().toInt();
switch (phfd)
@@ -1269,7 +1269,7 @@ void ExplosionsEditAdlerStandAlone::switchTo(FlighDurationOrPeakHeight phfd)
}
const qint32 gearClassId = m_ui->cbGearClass->currentData().toInt();
ProjectDataManagement::GearClass::type gearClassType = static_cast<ProjectDataManagement::GearClass::type>(gearClassId);
ProjectDataManagement::GearClass gearClassType = static_cast<ProjectDataManagement::GearClass>(gearClassId);
const qint32 chargeTypeId = m_ui->cbChargeType->currentData().toInt();
setMinMaxConstraints(phfd, gearClassType, chargeTypeId);
}
@@ -1304,7 +1304,7 @@ void ExplosionsEditAdlerStandAlone::doCalculationsAdlerStandAlone(bool executeEn
return;
// do not update while EsPause or similar:
if ((m_effectClusterData.effectStateId() == AesEffectState_def::EsPaused) || (m_effectClusterData.effectStateId() == AesEffectState_def::EsExpired))
if ((m_effectClusterData.effectStateId() == AesEffectState::EsPaused) || (m_effectClusterData.effectStateId() == AesEffectState::EsExpired))
return;
doCalculationsAdlerStandAloneExitGuard exitGuard(this, executeEnableUiElements);
@@ -1506,7 +1506,7 @@ void ExplosionsEditAdlerStandAlone::doCalculationsAdlerStandAlone(bool executeEn
//
const qint32 gearClassId = m_ui->cbGearClass->currentData().toInt();
ProjectDataManagement::GearClass::type gearClassType = static_cast<ProjectDataManagement::GearClass::type>(gearClassId);
ProjectDataManagement::GearClass gearClassType = static_cast<ProjectDataManagement::GearClass>(gearClassId);
const qint32 chargeTypeId = m_ui->cbChargeType->currentData().toInt();
@@ -1784,7 +1784,7 @@ void ExplosionsEditAdlerStandAlone::enableUiElements(bool enable)
m_ui->cbParticipantUnits->setEnabled(enable);
setEffectStartEnabled(m_ui->dteEffectStart, enable);
const AreaEffectSimulation::FiringType::type firingType = static_cast<AreaEffectSimulation::FiringType::type>(m_ui->cbFiringType->currentData().toInt());
const AreaEffectSimulation::FiringType firingType = static_cast<AreaEffectSimulation::FiringType>(m_ui->cbFiringType->currentData().toInt());
const bool showEffectStart = (firingType == FiringType::FireWithIndicationTTF || firingType == FiringType::FireWithIndicationTOT);
m_ui->dteEffectStart->setChecked(true);
m_ui->dteEffectStart->setEnabled(showEffectStart);
@@ -1795,15 +1795,15 @@ void ExplosionsEditAdlerStandAlone::enableUiElements(bool enable)
m_ui->positionEdit->setEnabled(enable);
// m_ui->sbAltitude->setEnabled(enable);
m_ui->sbDimensionX_BreiteRadius->setEnabled(enable
&& (m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgArea
|| m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgRadial
|| m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgLine));
m_ui->sbDimensionY_Tiefe->setEnabled(enable && m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgArea);
&& (m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgArea
|| m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgRadial
|| m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgLine));
m_ui->sbDimensionY_Tiefe->setEnabled(enable && m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgArea);
m_ui->sbHeight1SBox->setEnabled(enable);
m_ui->sbHeight2SBox->setEnabled(enable && m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgLine);
m_ui->sbHeight2SBox->setEnabled(enable && m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgLine);
m_ui->sbAimingAxis->setEnabled(
enable
&& (m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgArea || m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgLine));
&& (m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgArea || m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgLine));
m_ui->cbFirePurpose->setEnabled(enable);
m_ui->cbGearClass->setEnabled(enable);
m_ui->cbActors->setEnabled(enable & m_ui->gbEffectMarkingInTa->isChecked());
@@ -1837,7 +1837,7 @@ void ExplosionsEditAdlerStandAlone::enableUiElements(bool enable)
m_ui->cbTargetSubType->setEnabled(enable);
m_ui->cbFiringType->setEnabled(enable);
const bool isRocket = (m_ui->cbGearClass->currentData().toInt() == ProjectDataManagement::GearClass_def::Rocket);
const bool isRocket = (m_ui->cbGearClass->currentData().toInt() == ProjectDataManagement::GearClass::Rocket);
m_ui->lblLoadType->setEnabled(!isRocket && enable);
m_ui->lblLoadNumber->setEnabled(!isRocket && enable);
m_ui->cbLoadType->setEnabled(!isRocket && enable);
@@ -1856,8 +1856,8 @@ void ExplosionsEditAdlerStandAlone::enableUiElements(bool enable)
// [GUEZE-2960] Explizite Kunden-Forderung:
// ZpNumber nicht_ mehr modifizierbar, wenn Wirkfeld aktiv
m_ui->leZpNumber->setEnabled((enable || isOnlyNameModifiable()) && m_aesItem.effectStateId() != AesEffectState_def::EsActivated);
m_ui->leElement->setEnabled((enable || isOnlyNameModifiable()) && m_aesItem.effectStateId() != AesEffectState_def::EsActivated);
m_ui->leZpNumber->setEnabled((enable || isOnlyNameModifiable()) && m_aesItem.effectStateId() != AesEffectState::EsActivated);
m_ui->leElement->setEnabled((enable || isOnlyNameModifiable()) && m_aesItem.effectStateId() != AesEffectState::EsActivated);
m_ui->pbClear->setEnabled(enable);
@@ -1901,14 +1901,14 @@ void ExplosionsEditAdlerStandAlone::enableUiElements(bool enable)
// // Munitionstyp "Mörser" muss die obere Winkelgruppe ausgewählt && die Eingabemaske "Flugkurve" soll ausgrauen.
// // Beim Wechsel auf einen anderen Munitionstyp soll wieder als Default die untere Winkelgruppe ausgewählt werden &&
// // die Eingabemaske muss wieder auswählbar sein.
// const ProjectDataManagement::GearClass_def::type gearClassType =
// static_cast<ProjectDataManagement::GearClass_def::type>(m_ui->cbGearClass->currentData().toInt());
// const ProjectDataManagement::GearClass gearClassType =
// static_cast<ProjectDataManagement::GearClass>(m_ui->cbGearClass->currentData().toInt());
// // const bool usePeakHeight = m_ui->sBox_peakHeight->styleSheet().isEmpty();
// const bool useFlightDuration = m_ui->sBox_flightDuration->styleSheet().isEmpty();
// m_ui->cbFlightCurve->setEnabled(enable &&
// (gearClassType != ProjectDataManagement::GearClass_def::Mortar) &&
// (gearClassType != ProjectDataManagement::GearClass::Mortar) &&
// useFlightDuration
// );
// }
@@ -1943,7 +1943,7 @@ void ExplosionsEditAdlerStandAlone::enableUiFireButton()
if (!enableBasics)
return; // stay disabled
if (m_effectClusterData.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired || m_effectClusterData.remainExplosionNumber() == 0)
if (m_effectClusterData.effectStateId() == AreaEffectSimulation::AesEffectState::EsExpired || m_effectClusterData.remainExplosionNumber() == 0)
return; // stay disabled
int numberTrajectoriesRef = 0;
@@ -2000,7 +2000,7 @@ void ExplosionsEditAdlerStandAlone::enableUiFireButton()
else
{
// re-openening dialog:
if (m_effectClusterData.effectStateId() == AesEffectState_def::EsPaused)
if (m_effectClusterData.effectStateId() == AesEffectState::EsPaused)
bPause = false;
}
}
@@ -2040,24 +2040,24 @@ void ExplosionsEditAdlerStandAlone::showPreviewObject()
switch (m_currentGeometry.underlying())
{
case AreaEffectSimulation::AesExplosionGeometry_def::EgArea:
case AreaEffectSimulation::AesExplosionGeometry::EgArea:
if (m_previewPolygon.isEmpty())
return;
m_sitMapGuiIfc->displayPreviewObject(this, m_previewPolygon, true);
return;
case AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint:
case AreaEffectSimulation::AesExplosionGeometry_def::EgPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgAimPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgPoint:
if (m_previewCircleCenter.isNull())
return;
m_sitMapGuiIfc->displayPreviewObject(this, m_previewCircleCenter, m_previewCircleRadius);
return;
case AreaEffectSimulation::AesExplosionGeometry_def::EgLine:
case AreaEffectSimulation::AesExplosionGeometry::EgLine:
m_sitMapGuiIfc->displayPreviewObject(this, m_previewPolygon, false);
return;
case AreaEffectSimulation::AesExplosionGeometry_def::EgRadial:
case AreaEffectSimulation::AesExplosionGeometry::EgRadial:
if (m_previewCircleCenter.isNull())
return;
@@ -2085,7 +2085,7 @@ bool ExplosionsEditAdlerStandAlone::isDataSufficiant()
bool bHasTargetArea = !m_coord.isNull();
switch (m_currentGeometry.underlying())
{
case AreaEffectSimulation::AesExplosionGeometry_def::EgArea:
case AreaEffectSimulation::AesExplosionGeometry::EgArea:
bHasTargetArea &= m_ui->sbDimensionX_BreiteRadius->value() > 0;
bHasTargetArea &= m_ui->sbDimensionY_Tiefe->value() > 0;
break;
@@ -2136,7 +2136,7 @@ bool ExplosionsEditAdlerStandAlone::apply()
switch (m_currentGeometry.underlying())
{
case AesExplosionGeometry_def::EgRadial:
case AesExplosionGeometry::EgRadial:
{
QPointF bottomLeft(Polygons::centerPoint2BottomLeft(m_coord, m_ui->sbDimensionX_BreiteRadius->value() * 2, m_ui->sbDimensionY_Tiefe->value() * 2, 0.0));
bottomLeftGeo = Core::GeoPosition2D(bottomLeft.x(), bottomLeft.y());
@@ -2147,7 +2147,7 @@ bool ExplosionsEditAdlerStandAlone::apply()
break;
}
case AesExplosionGeometry_def::EgLine:
case AesExplosionGeometry::EgLine:
{
const QLineF line(m_ui->positionEdit->coordinate(), m_ui->positionEdit_2->coordinate());
@@ -2163,9 +2163,9 @@ bool ExplosionsEditAdlerStandAlone::apply()
break;
}
case AesExplosionGeometry_def::EgAimPoint:
case AesExplosionGeometry_def::EgArea:
case AesExplosionGeometry_def::EgPoint:
case AesExplosionGeometry::EgAimPoint:
case AesExplosionGeometry::EgArea:
case AesExplosionGeometry::EgPoint:
default:
{
QPointF bottomLeft(Polygons::centerPoint2BottomLeft(m_coord,
@@ -2180,7 +2180,7 @@ bool ExplosionsEditAdlerStandAlone::apply()
}
}
if (bIsPoint || m_currentGeometry.underlying() == AreaEffectSimulation::AesExplosionGeometry_def::EgRadial)
if (bIsPoint || m_currentGeometry.underlying() == AreaEffectSimulation::AesExplosionGeometry::EgRadial)
request.area().rotation(0);
else
request.area().rotation((m_ui->sbAimingAxis->value() - 1600) * 360.0 / 6400);
@@ -2308,7 +2308,7 @@ bool ExplosionsEditAdlerStandAlone::apply()
// Rocket-Spezifika:
const QVariant currentData = m_ui->cbGearClass->currentData();
const ProjectDataManagement::GearClass::type currentGearClass = static_cast<ProjectDataManagement::GearClass::type>(currentData.toInt());
const ProjectDataManagement::GearClass currentGearClass = static_cast<ProjectDataManagement::GearClass>(currentData.toInt());
if (currentGearClass == ProjectDataManagement::GearClass::Rocket)
{
RocketUtility::addRocketPropertiesToRequest(request, m_ppmDtc);
@@ -2327,7 +2327,7 @@ bool ExplosionsEditAdlerStandAlone::apply()
*/
void ExplosionsEditAdlerStandAlone::onGeometrySelected(int explosionGeometryInt)
{
const AreaEffectSimulation::AesExplosionGeometry::inner_enum newGeometry = static_cast<AreaEffectSimulation::AesExplosionGeometry::inner_enum>(explosionGeometryInt);
const AreaEffectSimulation::AesExplosionGeometry newGeometry = static_cast<AreaEffectSimulation::AesExplosionGeometry>(explosionGeometryInt);
if (m_currentGeometry == newGeometry)
return;
@@ -2353,8 +2353,8 @@ void ExplosionsEditAdlerStandAlone::onGeometrySelected(int explosionGeometryInt)
switch (m_currentGeometry.underlying())
{
case AreaEffectSimulation::AesExplosionGeometry_def::EgAimPoint: // What is AimPoint?
case AreaEffectSimulation::AesExplosionGeometry_def::EgPoint:
case AreaEffectSimulation::AesExplosionGeometry::EgAimPoint: // What is AimPoint?
case AreaEffectSimulation::AesExplosionGeometry::EgPoint:
{
m_ui->lblRadiusBreite->setText(tr("Breite [m]"));
m_ui->sbHeight2SBox->setEnabled(false);
@@ -2386,7 +2386,7 @@ void ExplosionsEditAdlerStandAlone::onGeometrySelected(int explosionGeometryInt)
onChargeTypeChanged();
}
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgArea:
case AreaEffectSimulation::AesExplosionGeometry::EgArea:
{
m_ui->lblRadiusBreite->setText(tr("Breite [m]"));
m_ui->sbHeight2SBox->setEnabled(false);
@@ -2412,7 +2412,7 @@ void ExplosionsEditAdlerStandAlone::onGeometrySelected(int explosionGeometryInt)
m_ui->sbDurationSec->setSingleStep(60);
}
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgLine:
case AreaEffectSimulation::AesExplosionGeometry::EgLine:
{
m_ui->lblRadiusBreite->setText(tr("Breite [m]"));
m_ui->sbHeight2SBox->setEnabled(true);
@@ -2437,7 +2437,7 @@ void ExplosionsEditAdlerStandAlone::onGeometrySelected(int explosionGeometryInt)
m_ui->sbDurationSec->setValue(60); // 1 min
}
break;
case AreaEffectSimulation::AesExplosionGeometry_def::EgRadial:
case AreaEffectSimulation::AesExplosionGeometry::EgRadial:
{
m_ui->lblRadiusBreite->setText(tr("Radius [m]"));
m_ui->sbHeight2SBox->setEnabled(false);
@@ -2473,10 +2473,10 @@ void ExplosionsEditAdlerStandAlone::onGeometrySelected(int explosionGeometryInt)
void ExplosionsEditAdlerStandAlone::onStartBtnClicked()
{
DEBUG_LOG(m_logger) << " onFireClicked";
if (((m_aesItem.effectStateId() == AesEffectState_def::EsUnknown) || // initially the effectStateId is Unknown...
(m_aesItem.effectStateId() == AesEffectState_def::EsError) || (m_aesItem.effectStateId() == AesEffectState_def::EsExpired)
|| (m_aesItem.effectStateId() == AesEffectState_def::EsRemoved) || (m_aesItem.effectStateId() == AesEffectState_def::EsReceived)
// || (m_aesItem.effectStateId() == AesEffectState_def::EsPaused) // Maybe EsPaused will be supported in future
if (((m_aesItem.effectStateId() == AesEffectState::EsUnknown) || // initially the effectStateId is Unknown...
(m_aesItem.effectStateId() == AesEffectState::EsError) || (m_aesItem.effectStateId() == AesEffectState::EsExpired)
|| (m_aesItem.effectStateId() == AesEffectState::EsRemoved) || (m_aesItem.effectStateId() == AesEffectState::EsReceived)
// || (m_aesItem.effectStateId() == AesEffectState::EsPaused) // Maybe EsPaused will be supported in future
)
|| m_aesItem.id() <= 0)
return;
@@ -2498,7 +2498,7 @@ void ExplosionsEditAdlerStandAlone::onStartBtnClicked()
//
if ((m_aesItem.effectStateId() == AesEffectState_def::EsCreated || m_aesItem.effectStateId() == AesEffectState_def::EsPrepared) && bIsObjectModifiable)
if ((m_aesItem.effectStateId() == AesEffectState::EsCreated || m_aesItem.effectStateId() == AesEffectState::EsPrepared) && bIsObjectModifiable)
{
ERROR_LOG(m_logger) << LOGFUNCTION << " onFireClicked 2 " << m_data;
@@ -2564,7 +2564,7 @@ void ExplosionsEditAdlerStandAlone::onStartBtnClicked()
*/
void ExplosionsEditAdlerStandAlone::onGearClassChanged()
{
const ProjectDataManagement::GearClass_def::type newGearClassType = static_cast<ProjectDataManagement::GearClass_def::type>(m_ui->cbGearClass->currentData().toInt());
const ProjectDataManagement::GearClass newGearClassType = static_cast<ProjectDataManagement::GearClass>(m_ui->cbGearClass->currentData().toInt());
{
QSignalBlocker sb(m_ui->cbChargeType);
fillCharges();
@@ -2572,10 +2572,10 @@ void ExplosionsEditAdlerStandAlone::onGearClassChanged()
fillParties();
onPartyChanged();
ProjectDataManagement::GearClass_def::type lastGearClassType = ProjectDataManagement::GearClass_def::Mortar;
ProjectDataManagement::GearClass lastGearClassType = ProjectDataManagement::GearClass::Mortar;
QVariant lastVal = m_ui->cbGearClass->property(LAST_VALUE);
if (!lastVal.isNull())
lastGearClassType = static_cast<ProjectDataManagement::GearClass_def::type>(lastVal.toInt());
lastGearClassType = static_cast<ProjectDataManagement::GearClass>(lastVal.toInt());
{
// GUEZE-2459
@@ -2586,7 +2586,7 @@ void ExplosionsEditAdlerStandAlone::onGearClassChanged()
// Default is Upper
m_ui->rbAngleGroupUpper->setChecked(true);
// GUEZE-3520: Aufraeumen -> getm rid of AesFlightCurve
if (newGearClassType == ProjectDataManagement::GearClass_def::Mortar)
if (newGearClassType == ProjectDataManagement::GearClass::Mortar)
{
DEBUG_LOG(m_logger) << " onGearClassChanged switch to Mortar";
m_ui->rbAngleGroupLower->setCheckable(false);
@@ -2711,7 +2711,7 @@ bool ExplosionsEditAdlerStandAlone::isValidParty(qint32 partyId)
void ExplosionsEditAdlerStandAlone::setFireBtnState()
{
const AreaEffectSimulation::FiringType::type firingType = static_cast<AreaEffectSimulation::FiringType::type>(m_ui->cbFiringType->currentData().toInt());
const AreaEffectSimulation::FiringType firingType = static_cast<AreaEffectSimulation::FiringType>(m_ui->cbFiringType->currentData().toInt());
const bool showEffectStart = (firingType == FiringType::FireWithIndicationTTF || firingType == FiringType::FireWithIndicationTOT);
m_ui->dteEffectStart->setEnabled(showEffectStart);
m_ui->dteEffectStart->setVisible(showEffectStart);
@@ -2793,7 +2793,7 @@ double ExplosionsEditAdlerStandAlone::getElevation(const double lon, const doubl
void ExplosionsEditAdlerStandAlone::onWidthChanged(int width)
{
if (m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry_def::EgRadial)
if (m_currentGeometry == AreaEffectSimulation::AesExplosionGeometry::EgRadial)
{
m_ui->sbDimensionY_Tiefe->setValue(width);
@@ -2891,7 +2891,7 @@ void ExplosionsEditAdlerStandAlone::fillCharges()
return;
}
const ProjectDataManagement::GearClass_def::type curGearClassType = static_cast<ProjectDataManagement::GearClass_def::type>(m_ui->cbGearClass->currentData().toInt());
const ProjectDataManagement::GearClass curGearClassType = static_cast<ProjectDataManagement::GearClass>(m_ui->cbGearClass->currentData().toInt());
const auto chargesForGearClass = m_pdmDtc->chargesForGearClass(curGearClassType);
const int curCtDataToRestore = m_ui->cbChargeType->currentData().toInt();
@@ -2916,7 +2916,7 @@ void ExplosionsEditAdlerStandAlone::fillCharges()
DEBUG_LOG(m_logger) << " fillCharges"
<< ", id=" << chargeType.id() << ", name= " << chargeType.name() << ", bIsPoint " << bIsPoint << ", bIsVulcano " << bIsVulcano;
if (adlerChargeTypeName.isEmpty() || (bIsVulcano && !bIsPoint && curGearClassType != ProjectDataManagement::GearClass_def::Artillery)) // [Jira E01562-21]
if (adlerChargeTypeName.isEmpty() || (bIsVulcano && !bIsPoint && curGearClassType != ProjectDataManagement::GearClass::Artillery)) // [Jira E01562-21]
continue;
m_ui->cbChargeType->addItem(QString::fromStdString(chargeType.name()), chargeType.id());
}
@@ -2934,7 +2934,7 @@ void ExplosionsEditAdlerStandAlone::fillCharges()
void ExplosionsEditAdlerStandAlone::fillFiringTypCbox()
{
QVector<AreaEffectSimulation::FiringType::type> firetypes{FiringType::ReportReadyToFire,
QVector<AreaEffectSimulation::FiringType> firetypes{FiringType::ReportReadyToFire,
FiringType::FireWithIndicationTOT,
FiringType::FireWithIndicationTTF,
FiringType::FireOnCommand,
@@ -3047,7 +3047,7 @@ void ExplosionsEditAdlerStandAlone::mmiToJsonproperties(QJsonObject &data)
data[AdlerJson::JsonKeys::TYP()] = m_ui->cbTargetType->currentData().toInt();
data[AdlerJson::JsonKeys::SUB_TYP()] = m_ui->cbTargetSubType->currentData().toInt();
data[AdlerJson::JsonKeys::ABFEUERUNGSART()] = m_ui->cbFiringType->currentData().toInt();
const FiringType::type firingType = static_cast<FiringType::type>(m_ui->cbFiringType->currentData().toInt());
const FiringType firingType = static_cast<FiringType>(m_ui->cbFiringType->currentData().toInt());
if (firingType == FiringType::FireWithIndicationTTF && m_ui->dteEffectStart->isChecked())
data[AdlerJson::JsonKeys::ABFEUERUNGSZEIT()] = m_ui->dteEffectStart->msecsSinceEpoch() / 1000.0;
else
@@ -102,7 +102,7 @@ class ExplosionsEditAdlerStandAlone final
void onEffectDurationChanged(int value);
void switchTo(FlighDurationOrPeakHeight phfd);
void setMinMaxConstraints(ExplosionsEditAdlerStandAlone::FlighDurationOrPeakHeight phfd, ProjectDataManagement::GearClass_def::type gearClass, int chargeTypeId);
void setMinMaxConstraints(ExplosionsEditAdlerStandAlone::FlighDurationOrPeakHeight phfd, ProjectDataManagement::GearClass gearClass, int chargeTypeId);
bool setValueAccordingContraints(int newValue, ExplosionsEditAdlerStandAlone::FlighDurationOrPeakHeight phfd);
bool isGuiVulcano();
@@ -148,15 +148,15 @@ class ExplosionsEditAdlerStandAlone final
bool isSmoke();
void updateActorComboBox(const Core::GeoPosition &coordGeo);
QPair<int, int> getMinMaxDistance(ProjectDataManagement::GearClass_def::type gearClass, int chargeTypeId);
int getMinDistance(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId);
int getMaxDistance(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId);
QPair<int, int> getMinMaxFlightDurationSec(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId);
int getMinFlightDurationSec(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId);
int getMaxFlightDurationSec(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId);
QPair<int, int> getMinMaxPeakHeight(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId);
int getMinPeakHeight(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId);
int getMaxPeakHeight(ProjectDataManagement::GearClass::inner_enum gearClass, int chargeTypeId);
QPair<int, int> getMinMaxDistance(ProjectDataManagement::GearClass gearClass, int chargeTypeId);
int getMinDistance(ProjectDataManagement::GearClass gearClass, int chargeTypeId);
int getMaxDistance(ProjectDataManagement::GearClass gearClass, int chargeTypeId);
QPair<int, int> getMinMaxFlightDurationSec(ProjectDataManagement::GearClass gearClass, int chargeTypeId);
int getMinFlightDurationSec(ProjectDataManagement::GearClass gearClass, int chargeTypeId);
int getMaxFlightDurationSec(ProjectDataManagement::GearClass gearClass, int chargeTypeId);
QPair<int, int> getMinMaxPeakHeight(ProjectDataManagement::GearClass gearClass, int chargeTypeId);
int getMinPeakHeight(ProjectDataManagement::GearClass gearClass, int chargeTypeId);
int getMaxPeakHeight(ProjectDataManagement::GearClass gearClass, int chargeTypeId);
bool isPointSimilar(AreaEffectSimulation::AesExplosionGeometry geometry);
struct Charges
@@ -27,7 +27,7 @@ namespace AreaEffectSimulation
namespace RocketUtility
{
void enaDisaWirkmittel(QComboBox *wirkmittelCombobox, AesExplosionGeometry::type geometry)
void enaDisaWirkmittel(QComboBox *wirkmittelCombobox, AesExplosionGeometry geometry)
{
if (wirkmittelCombobox == nullptr)
return;
@@ -39,13 +39,13 @@ void enaDisaWirkmittel(QComboBox *wirkmittelCombobox, AesExplosionGeometry::type
switch (geometry)
{
case AesExplosionGeometry::type::EgAimPoint:
case AesExplosionGeometry::type::EgPoint:
case AesExplosionGeometry::type::EgLine:
case AesExplosionGeometry::EgAimPoint:
case AesExplosionGeometry::EgPoint:
case AesExplosionGeometry::EgLine:
for (int indexCounter = 0; indexCounter < wirkmittelCombobox->count(); ++indexCounter)
{
const QVariant currentData = wirkmittelCombobox->itemData(indexCounter);
const ProjectDataManagement::GearClass::type currentGearClass = static_cast<ProjectDataManagement::GearClass::type>(currentData.toInt());
const ProjectDataManagement::GearClass currentGearClass = static_cast<ProjectDataManagement::GearClass>(currentData.toInt());
if (currentGearClass == ProjectDataManagement::GearClass::Rocket)
{
@@ -60,15 +60,15 @@ void enaDisaWirkmittel(QComboBox *wirkmittelCombobox, AesExplosionGeometry::type
}
}
return;
case AesExplosionGeometry::type::EgRadial:
case AesExplosionGeometry::type::EgArea:
case AesExplosionGeometry::EgRadial:
case AesExplosionGeometry::EgArea:
{
const int currentIndex = wirkmittelCombobox->currentIndex();
for (int indexCounter = 0; indexCounter < wirkmittelCombobox->count(); ++indexCounter)
{
const QVariant currentData = wirkmittelCombobox->itemData(indexCounter);
const ProjectDataManagement::GearClass::type currentGearClass = static_cast<ProjectDataManagement::GearClass::type>(currentData.toInt());
const ProjectDataManagement::GearClass currentGearClass = static_cast<ProjectDataManagement::GearClass>(currentData.toInt());
if (currentGearClass == ProjectDataManagement::GearClass::Rocket)
{
@@ -100,15 +100,15 @@ void addRocketPropertiesToRequest(EffectClusterModifyRequest &request, const std
{
switch (request.explosionGeometry().underlying())
{
case AesExplosionGeometry::type::EgAimPoint:
case AesExplosionGeometry::type::EgPoint:
case AesExplosionGeometry::EgAimPoint:
case AesExplosionGeometry::EgPoint:
addRocketPropertiesForPointGeometry(request, ppmDtc);
return;
case AesExplosionGeometry::type::EgLine:
case AesExplosionGeometry::EgLine:
addRocketPropertiesForLinearGeometry(request, ppmDtc);
return;
case AesExplosionGeometry::type::EgRadial:
case AesExplosionGeometry::type::EgArea:
case AesExplosionGeometry::EgRadial:
case AesExplosionGeometry::EgArea:
default:
return;
}
@@ -23,7 +23,7 @@ class EffectClusterModifyRequest;
namespace RocketUtility
{
void enaDisaWirkmittel(QComboBox *wirkmittelCombobox, AesExplosionGeometry::type geometry);
void enaDisaWirkmittel(QComboBox *wirkmittelCombobox, AesExplosionGeometry geometry);
void addRocketPropertiesToRequest(EffectClusterModifyRequest &request, const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc);
void addRocketPropertiesForPointGeometry(EffectClusterModifyRequest &request, const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc);
void addRocketPropertiesForLinearGeometry(EffectClusterModifyRequest &request, const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc);