Migrates residual Lts sources to generated rtiddsgen API
Adds NmeaManagement tests, fixes codegen includes and Qt6 SerialPort CMake target.
This commit is contained in:
1 parent
5485a90385
commit
881d44f4dd
512 files changed
+6887
-6426
No files matched your search
+2
-2
@@ -180,9 +180,9 @@ void AesChargeEffectItemInfo::onShowDetails()
|
||||
if (m_session->getForeignGuiInterface<AesBCContamination::ForeignGuiInterface>(ifc))
|
||||
{
|
||||
const auto gearClass = m_pdmDtc->gearClassFromChargeTypeId(aiv.chargeStruct().chargeTypeId());
|
||||
if (gearClass == ProjectDataManagement::GearClass_def::Biological)
|
||||
if (gearClass == ProjectDataManagement::GearClass::Biological)
|
||||
registerDialog(ifc->showEditWindow(aiv.aesItemId(), false, this));
|
||||
else if (gearClass == ProjectDataManagement::GearClass_def::Chemical)
|
||||
else if (gearClass == ProjectDataManagement::GearClass::Chemical)
|
||||
registerDialog(ifc->showEditWindow(aiv.aesItemId(), true, this));
|
||||
}
|
||||
else
|
||||
|
||||
+23
-23
@@ -107,8 +107,8 @@ bool AesInfoDialog::cbFunc(const AreaEffectSimulation::AesItemView& aesItemView)
|
||||
setOnlineHelpFilename(QStringLiteral("Info_Dialog-BoobyTrap"));
|
||||
break;
|
||||
}
|
||||
case AreaEffectSimulation::AesType_def::AtOffRouteMine:
|
||||
case AreaEffectSimulation::AesType_def::AtOffRouteMineSecondary: {
|
||||
case AreaEffectSimulation::AesType::AtOffRouteMine:
|
||||
case AreaEffectSimulation::AesType::AtOffRouteMineSecondary: {
|
||||
handleOffRouteMine(aesItemView);
|
||||
connect(m_dtc.get(), &AreaEffectSimulation::Interface::Dtc::offRouteMineChanged, this,
|
||||
&AesInfoDialog::onOffRouteMineChanged);
|
||||
@@ -284,14 +284,14 @@ bool AesInfoDialog::init(LtsSession::LtsSession* session, const std::shared_ptr<
|
||||
|
||||
m_ui->lbAesId->setText(tr("AES Id:"));
|
||||
|
||||
if (m_aesType == AreaEffectSimulation::AesType_def::AtMineAreaSingleMines)
|
||||
if (m_aesType == AreaEffectSimulation::AesType::AtMineAreaSingleMines)
|
||||
{
|
||||
|
||||
handleMineAraeSingleMine();
|
||||
connect(m_dtc.get(), &AreaEffectSimulation::Interface::Dtc::dusMineStateChanged, this,
|
||||
&AesInfoDialog::onDusMineStateChanged);
|
||||
}
|
||||
else if (m_aesType == AreaEffectSimulation::AesType_def::AtDusSingleMine)
|
||||
else if (m_aesType == AreaEffectSimulation::AesType::AtDusSingleMine)
|
||||
{
|
||||
|
||||
handleSingleDusMine();
|
||||
@@ -363,7 +363,7 @@ void AesInfoDialog::handleBoobyTrap(const AreaEffectSimulation::BoobyTrap& data)
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << "(AreaEffectSimulation::BoobyTrap)"
|
||||
<< " data.id(): " << data.id();
|
||||
|
||||
handleAesItem(data, AesType_def::AtBoobyTrap);
|
||||
handleAesItem(data, AesType::AtBoobyTrap);
|
||||
|
||||
m_bcChargeTypeId = data.chargeStruct().chargeTypeId();
|
||||
|
||||
@@ -390,7 +390,7 @@ void AesInfoDialog::handleOffRouteMine(const AreaEffectSimulation::OffRouteMine&
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << "(AreaEffectSimulation::OffRouteMine)"
|
||||
<< " data.id(): " << data.id();
|
||||
|
||||
handleAesItem(data, AesType_def::AtOffRouteMine);
|
||||
handleAesItem(data, AesType::AtOffRouteMine);
|
||||
|
||||
m_bcChargeTypeId = data.chargeStruct().chargeTypeId();
|
||||
|
||||
@@ -595,17 +595,17 @@ void AesInfoDialog::handleFunctionalArea(const FunctionalArea& data)
|
||||
|
||||
QStringList chargeTypesNames;
|
||||
QStringList chargeTypesShortNames;
|
||||
if (data.medicMode() != AesOperatingMode_def::OmNotUsed)
|
||||
if (data.medicMode() != AesOperatingMode::OmNotUsed)
|
||||
{
|
||||
chargeTypesNames << m_pdmDtc->trChargeTypeName(411, true);
|
||||
chargeTypesShortNames << m_pdmDtc->trChargeTypeShortName(411, true);
|
||||
}
|
||||
if (data.maintMode() != AesOperatingMode_def::OmNotUsed)
|
||||
if (data.maintMode() != AesOperatingMode::OmNotUsed)
|
||||
{
|
||||
chargeTypesNames << m_pdmDtc->trChargeTypeName(412, true);
|
||||
chargeTypesShortNames << m_pdmDtc->trChargeTypeShortName(412, true);
|
||||
}
|
||||
if (data.deconMode() != AesOperatingMode_def::OmNotUsed)
|
||||
if (data.deconMode() != AesOperatingMode::OmNotUsed)
|
||||
{
|
||||
chargeTypesNames << m_pdmDtc->trChargeTypeName(413, true);
|
||||
chargeTypesShortNames << m_pdmDtc->trChargeTypeShortName(413, true);
|
||||
@@ -693,7 +693,7 @@ void AesInfoDialog::handleMineAraeSingleMine(const Core::GeoPosition2D& position
|
||||
m_ui->lblChargeTypeId->setText(QString::number(ctId));
|
||||
}
|
||||
|
||||
const bool isDus = static_cast<MineClass::type>(m_pdmDtc->mineClass(ctId, 0, 0)) == MineClass::DUS;
|
||||
const bool isDus = static_cast<MineClass>(m_pdmDtc->mineClass(ctId, 0, 0)) == MineClass::DUS;
|
||||
if (isDus)
|
||||
m_ui->lbAesId->setText(tr("DUS Mine Id:"));
|
||||
else
|
||||
@@ -763,28 +763,28 @@ void AesInfoDialog::handleSingleDusMine()
|
||||
|
||||
switch (dsm.effectStateId().underlying())
|
||||
{
|
||||
case AesEffectState_def::EsExpired:
|
||||
case AesEffectState::EsExpired:
|
||||
m_ui->lblStatus->setText(tr("Inactive"));
|
||||
break;
|
||||
case AesEffectState_def::EsRemoved:
|
||||
case AesEffectState::EsRemoved:
|
||||
m_ui->lblStatus->setText(tr("Removed"));
|
||||
break;
|
||||
case AesEffectState_def::EsCreated:
|
||||
case AesEffectState::EsCreated:
|
||||
m_ui->lblStatus->setText(tr("Created"));
|
||||
break;
|
||||
case AesEffectState_def::EsPrepared:
|
||||
case AesEffectState::EsPrepared:
|
||||
m_ui->lblStatus->setText(tr("Prepared"));
|
||||
break;
|
||||
case AesEffectState_def::EsActivated:
|
||||
case AesEffectState::EsActivated:
|
||||
m_ui->lblStatus->setText(tr("Active"));
|
||||
break;
|
||||
case AesEffectState_def::EsPaused:
|
||||
case AesEffectState::EsPaused:
|
||||
m_ui->lblStatus->setText(tr("Paused"));
|
||||
break;
|
||||
case AesEffectState_def::EsError:
|
||||
case AesEffectState::EsError:
|
||||
m_ui->lblStatus->setText(tr("Error"));
|
||||
break;
|
||||
case AesEffectState_def::EsReceived:
|
||||
case AesEffectState::EsReceived:
|
||||
m_ui->lblStatus->setText(tr("Received"));
|
||||
break;
|
||||
default:
|
||||
@@ -847,8 +847,8 @@ void AesInfoDialog::handleAesItem(const AesItem& aesData, AesType aesTypeId)
|
||||
m_pdmDtc->gearClassFromChargeTypeId(aesData.chargeStruct().chargeTypeId());
|
||||
switch (gearClass.underlying())
|
||||
{
|
||||
case ProjectDataManagement::GearClass_def::Biological:
|
||||
case ProjectDataManagement::GearClass_def::Chemical:
|
||||
case ProjectDataManagement::GearClass::Biological:
|
||||
case ProjectDataManagement::GearClass::Chemical:
|
||||
m_ui->lblAesType->setText(ProjectDataManagement::toString(gearClass));
|
||||
break;
|
||||
default:
|
||||
@@ -916,7 +916,7 @@ void AesInfoDialog::onShowDetails()
|
||||
if (m_session->getForeignGuiInterface<AesBCContamination::ForeignGuiInterface>(ifc))
|
||||
{
|
||||
const auto gearClass = m_pdmDtc->gearClassFromChargeTypeId(m_bcChargeTypeId);
|
||||
if (gearClass == ProjectDataManagement::GearClass_def::Biological)
|
||||
if (gearClass == ProjectDataManagement::GearClass::Biological)
|
||||
{
|
||||
AreaEffectSimulation::BaseEdit* dialog = ifc->showEditWindow(m_aesEntityId, false, this);
|
||||
if (dialog)
|
||||
@@ -925,7 +925,7 @@ void AesInfoDialog::onShowDetails()
|
||||
break;
|
||||
}
|
||||
|
||||
if (gearClass == ProjectDataManagement::GearClass_def::Chemical)
|
||||
if (gearClass == ProjectDataManagement::GearClass::Chemical)
|
||||
{
|
||||
AreaEffectSimulation::BaseEdit* dialog = ifc->showEditWindow(m_aesEntityId, true, this);
|
||||
if (dialog)
|
||||
@@ -1146,7 +1146,7 @@ void AesInfoDialog::onShowDetails()
|
||||
|
||||
bool AesInfoDialog::onResetDusMines()
|
||||
{
|
||||
if (m_aesType == AreaEffectSimulation::AesType_def::AtMineAreaSingleMines)
|
||||
if (m_aesType == AreaEffectSimulation::AesType::AtMineAreaSingleMines)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onResetDusMines() AtMineAreaSingleMines mineId: " << m_aesEntityId;
|
||||
MineResetRequest req(0, {m_aesEntityId});
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ void AirSupportExplosionClusterImpactList::createModel()
|
||||
{
|
||||
m_model = new AesItemSortFilterProxyModelTmpl<EffectCluster>(m_session, this);
|
||||
|
||||
m_effectClusterModel = new EffectClusterModel({ProjectDataManagement::GearClass_def::AirSupport}, this);
|
||||
m_effectClusterModel = new EffectClusterModel({ProjectDataManagement::GearClass::AirSupport}, this);
|
||||
m_effectClusterModel->initModel(m_session);
|
||||
m_model->setSourceModel(m_effectClusterModel);
|
||||
}
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ bool CustomViewBCContamination::calculateIcon(const BCContamination &bcContamina
|
||||
bcContaOut.propagationDirection = bcContamination.propagationDirection();
|
||||
|
||||
const QPolygonF poly = AreaEffectSimulation::Polygons::bcContamination(bcContaOut,
|
||||
ProjectDataManagement::VolatilityType_def::get_default(),
|
||||
ProjectDataManagement::VolatilityType::get_default(),
|
||||
bcContamination.impactRadius(),
|
||||
QDateTime::currentDateTime());
|
||||
|
||||
|
||||
+4
-4
@@ -132,12 +132,12 @@ void BCContaminationEdit::enableUiElements(bool enable)
|
||||
|
||||
m_ui->cbWeather->setEnabled(enable);
|
||||
m_ui->pbClear->setEnabled(enable);
|
||||
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();
|
||||
auto baseData = m_dtc->bCContamination(m_aesItem.id());
|
||||
@@ -270,7 +270,7 @@ void BCContaminationEdit::setData(const BCContamination &contamination, bool cop
|
||||
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::fromStdString(contamination.name()));
|
||||
m_ui->dteEffectStart->setMsecsSinceEpoch(contamination.effectStart().is_set() ? contamination.effectStart().get() : 0);
|
||||
@@ -348,7 +348,7 @@ bool BCContaminationEdit::apply()
|
||||
chargeType,
|
||||
pos,
|
||||
radius,
|
||||
static_cast<AesWeatherSource::inner_enum>(weathersource),
|
||||
static_cast<AesWeatherSource>(weathersource),
|
||||
LtsUtils::toOptional(partyId),
|
||||
LtsUtils::toOptional(participantId),
|
||||
dds::core::optional<double>(),
|
||||
|
||||
+13
-13
@@ -51,20 +51,20 @@ void BaseEdit::onAesItemModifyReply(const Core::FunctionReplyObject& replyObject
|
||||
bool BaseEdit::isModifiable() const
|
||||
{
|
||||
AesEffectState effectState = m_aesItem.effectStateId();
|
||||
return (effectState == AreaEffectSimulation::AesEffectState_def::EsPaused ||
|
||||
effectState == AreaEffectSimulation::AesEffectState_def::EsActivated ||
|
||||
effectState == AreaEffectSimulation::AesEffectState_def::EsPrepared ||
|
||||
effectState == AreaEffectSimulation::AesEffectState_def::EsCreated ||
|
||||
effectState == AreaEffectSimulation::AesEffectState_def::EsUnknown ||
|
||||
effectState == AreaEffectSimulation::AesEffectState_def::EsReceived) &&
|
||||
return (effectState == AreaEffectSimulation::AesEffectState::EsPaused ||
|
||||
effectState == AreaEffectSimulation::AesEffectState::EsActivated ||
|
||||
effectState == AreaEffectSimulation::AesEffectState::EsPrepared ||
|
||||
effectState == AreaEffectSimulation::AesEffectState::EsCreated ||
|
||||
effectState == AreaEffectSimulation::AesEffectState::EsUnknown ||
|
||||
effectState == AreaEffectSimulation::AesEffectState::EsReceived) &&
|
||||
(!m_session->isReplayPartition()) && (m_session->app() != LtsAppDescriptor::App::OC);
|
||||
}
|
||||
|
||||
bool BaseEdit::isOnlyNameModifiable() const
|
||||
{
|
||||
AesEffectState effectState = m_aesItem.effectStateId();
|
||||
return (effectState == AreaEffectSimulation::AesEffectState_def::EsPaused ||
|
||||
effectState == AreaEffectSimulation::AesEffectState_def::EsActivated) &&
|
||||
return (effectState == AreaEffectSimulation::AesEffectState::EsPaused ||
|
||||
effectState == AreaEffectSimulation::AesEffectState::EsActivated) &&
|
||||
(!m_session->isReplayPartition()) && (m_session->app() != LtsAppDescriptor::App::OC);
|
||||
}
|
||||
|
||||
@@ -166,10 +166,10 @@ void BaseEdit::setEffectStartEnabled(LtsWidgets::LtsDateTimeEdit* dte, bool enab
|
||||
m_session->getDtc<ExerciseManagement::DataInterface>(exmDtc);
|
||||
ExerciseManagement::Exercise exercise = exmDtc->exercise(exerciseId);
|
||||
|
||||
enable = (exercise.state() == ExerciseManagement::ExerciseState_def::Started ||
|
||||
exercise.state() == ExerciseManagement::ExerciseState_def::Paused);
|
||||
enable = (exercise.state() == ExerciseManagement::ExerciseState::Started ||
|
||||
exercise.state() == ExerciseManagement::ExerciseState::Paused);
|
||||
|
||||
if (exercise.state() == ExerciseManagement::ExerciseState_def::Created)
|
||||
if (exercise.state() == ExerciseManagement::ExerciseState::Created)
|
||||
dte->setChecked(false);
|
||||
else
|
||||
dte->setChecked(dte->msecsSinceEpoch() > 0);
|
||||
@@ -268,7 +268,7 @@ void BaseEdit::onAreaChanged(const AesItem& data, DataModification modType)
|
||||
if (data.id() != m_aesItem.id())
|
||||
return;
|
||||
|
||||
if (modType == DataModification::eRemoved || data.effectStateId() == AesEffectState_def::EsRemoved)
|
||||
if (modType == DataModification::eRemoved || data.effectStateId() == AesEffectState::EsRemoved)
|
||||
{
|
||||
|
||||
__unchange__();
|
||||
@@ -302,7 +302,7 @@ bool BaseEdit::init(int aesItemId, LtsSession::LtsSession* session)
|
||||
|
||||
if (aesItemId == 0)
|
||||
{
|
||||
m_aesItem.effectSourceId(ProjectDataManagement::EffectSource_def::ES_Internal);
|
||||
m_aesItem.effectSourceId(ProjectDataManagement::EffectSource::ES_Internal);
|
||||
m_buttonBox->setText(LtsWidgets::DialogButton::Ok, tr("Add"));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -285,7 +285,7 @@ bool AesItemSortFilterProxyModel::checkFilter(int source_row) const
|
||||
return false;
|
||||
|
||||
const auto effectStateId = aesEffectStateId(source_row);
|
||||
if (effectStateId == AesEffectState_def::EsRemoved)
|
||||
if (effectStateId == AesEffectState::EsRemoved)
|
||||
return false;
|
||||
|
||||
if (showExpired())
|
||||
|
||||
+5
-5
@@ -347,11 +347,11 @@ public:
|
||||
{
|
||||
const auto es = aesItem(row).effectStateId();
|
||||
|
||||
return es != AreaEffectSimulation::AesEffectState_def::EsCreated &&
|
||||
es != AreaEffectSimulation::AesEffectState_def::EsPrepared &&
|
||||
es != AreaEffectSimulation::AesEffectState_def::EsActivated &&
|
||||
es != AreaEffectSimulation::AesEffectState_def::EsPaused &&
|
||||
es != AreaEffectSimulation::AesEffectState_def::EsReceived;
|
||||
return es != AreaEffectSimulation::AesEffectState::EsCreated &&
|
||||
es != AreaEffectSimulation::AesEffectState::EsPrepared &&
|
||||
es != AreaEffectSimulation::AesEffectState::EsActivated &&
|
||||
es != AreaEffectSimulation::AesEffectState::EsPaused &&
|
||||
es != AreaEffectSimulation::AesEffectState::EsReceived;
|
||||
}
|
||||
bool isExternal(int row) const override
|
||||
{
|
||||
|
||||
+10
-10
@@ -35,21 +35,21 @@ Qt::BrushStyle PixmapLabel::checkForBrushStyle(const AesEffectState &state)
|
||||
{
|
||||
switch(state.underlying())
|
||||
{
|
||||
case AesEffectState_def::EsUnknown:
|
||||
case AesEffectState::EsUnknown:
|
||||
return Qt::BrushStyle::NoBrush;
|
||||
case AesEffectState_def::EsPrepared:
|
||||
case AesEffectState_def::EsFired:
|
||||
case AesEffectState::EsPrepared:
|
||||
case AesEffectState::EsFired:
|
||||
return Qt::BrushStyle::BDiagPattern;
|
||||
case AesEffectState_def::EsCreated:
|
||||
case AesEffectState_def::EsReceived:
|
||||
case AesEffectState::EsCreated:
|
||||
case AesEffectState::EsReceived:
|
||||
return Qt::BrushStyle::VerPattern;
|
||||
case AesEffectState_def::EsActivated:
|
||||
case AesEffectState::EsActivated:
|
||||
return Qt::BrushStyle::CrossPattern;
|
||||
case AesEffectState_def::EsRemoved:
|
||||
case AesEffectState::EsRemoved:
|
||||
return Qt::BrushStyle::NoBrush;
|
||||
case AesEffectState_def::EsPaused:
|
||||
case AesEffectState_def::EsExpired:
|
||||
case AesEffectState_def::EsError:
|
||||
case AesEffectState::EsPaused:
|
||||
case AesEffectState::EsExpired:
|
||||
case AesEffectState::EsError:
|
||||
return Qt::BrushStyle::SolidPattern;
|
||||
}
|
||||
return Qt::BrushStyle::NoBrush;
|
||||
|
||||
+4
-4
@@ -83,12 +83,12 @@ void BorderlineEdit::enableUiElements(bool enable)
|
||||
|
||||
|
||||
m_ui->leIdentifier->setEnabled(enable || isOnlyNameModifiable());
|
||||
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();
|
||||
auto baseData = m_dtc->borderline(m_aesItem.id());
|
||||
@@ -155,7 +155,7 @@ void BorderlineEdit::setData(const Borderline &borderline, 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::fromStdString(borderline.name()));
|
||||
if ( borderline.partyId().is_set())
|
||||
@@ -285,7 +285,7 @@ Borderline BorderlineEdit::jsonToBorderline(const QByteArray &content)
|
||||
borderline.effectMarkingInTa(obj[QStringLiteral("effectMarkingInTa")].toInt());
|
||||
borderline.effectStart(obj[QStringLiteral("effectStart")].toDouble());
|
||||
int effectStateId = obj[QStringLiteral("effectStateId")].toInt();
|
||||
borderline.effectStateId(static_cast<AreaEffectSimulation::AesEffectState::inner_enum>(effectStateId));
|
||||
borderline.effectStateId(static_cast<AreaEffectSimulation::AesEffectState>(effectStateId));
|
||||
borderline.operatorId(obj[QStringLiteral("operatorId")].toInt());
|
||||
borderline.id(0);
|
||||
borderline.name(obj[QStringLiteral("leIdentifier")].toString().toStdString());
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ QVector<Borderline> BorderlinesModel::jsonToBorderlineVector(const QByteArray &c
|
||||
borderline.effectMarkingInTa(objArr[QStringLiteral("effectMarkingInTa")].toInt());
|
||||
borderline.effectStart(objArr[QStringLiteral("effectStart")].toDouble());
|
||||
int effectStateId = objArr[QStringLiteral("effectStateId")].toInt();
|
||||
borderline.effectStateId(static_cast<AreaEffectSimulation::AesEffectState::inner_enum>(effectStateId));
|
||||
borderline.effectStateId(static_cast<AreaEffectSimulation::AesEffectState>(effectStateId));
|
||||
borderline.operatorId(objArr[QStringLiteral("operatorId")].toInt());
|
||||
borderline.id(0);
|
||||
borderline.name(objArr[QStringLiteral("name")].toString().toStdString());
|
||||
|
||||
+3
-3
@@ -98,13 +98,13 @@ bool ChargeAdministrationModel::initModel(LtsSession::LtsSession* session,
|
||||
}
|
||||
|
||||
QVector<ProjectDataManagement::ChargeType> chargesForGearClass =
|
||||
m_pdmDtc->chargesForGearClass(ProjectDataManagement::GearClass_def::Artillery) +
|
||||
m_pdmDtc->chargesForGearClass(ProjectDataManagement::GearClass_def::Mortar);
|
||||
m_pdmDtc->chargesForGearClass(ProjectDataManagement::GearClass::Artillery) +
|
||||
m_pdmDtc->chargesForGearClass(ProjectDataManagement::GearClass::Mortar);
|
||||
|
||||
LtsUtils::ProjectSettings* ps = LtsUtils::ProjectSettings::getInstance();
|
||||
const bool enableRocket = ps->value(QStringLiteral("aes"), QStringLiteral("enableRocket"), false).toBool();
|
||||
if (enableRocket)
|
||||
chargesForGearClass += m_pdmDtc->chargesForGearClass(ProjectDataManagement::GearClass_def::Rocket);
|
||||
chargesForGearClass += m_pdmDtc->chargesForGearClass(ProjectDataManagement::GearClass::Rocket);
|
||||
for (const ParticipantManagement::Party& p : std::as_const(parties))
|
||||
{
|
||||
for (const ProjectDataManagement::ChargeType& ct : std::as_const(chargesForGearClass))
|
||||
|
||||
+1
-1
@@ -165,7 +165,7 @@ void ChargeEffectEdit::onSelectionChanged()
|
||||
const ParticipantManagement::ParticipantData data(m_participantModel->getParticipantData(m_ui->dvParticipants->selectedRows().first()));
|
||||
DEBUG_LOG(m_logger) << "ParticipantId: " << data.id();
|
||||
|
||||
if (m_ppmDtc->type(data.typeId()).typeClass() == ParticipantManagement::TypeClass_def::Unit)
|
||||
if (m_ppmDtc->type(data.typeId()).typeClass() == ParticipantManagement::TypeClass::Unit)
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "typeClass: " << m_ppmDtc->type(data.typeId()).typeClass()
|
||||
|
||||
+4
-4
@@ -66,12 +66,12 @@ void DangerAreaEdit::enableUiElements(bool enable)
|
||||
m_ui->pbClear->setEnabled(enable);
|
||||
m_ui->leIdentifier->setEnabled(enable || isOnlyNameModifiable());
|
||||
setEffectStartEnabled(m_ui->dteEffectStart, enable);
|
||||
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();
|
||||
auto baseData = m_dtc->dangerArea(m_aesItem.id());
|
||||
@@ -139,7 +139,7 @@ void DangerAreaEdit::setPbAesItemsText()
|
||||
if (item.id() <= 0)
|
||||
continue;
|
||||
|
||||
if (item.effectStateId() != AesEffectState_def::EsActivated)
|
||||
if (item.effectStateId() != AesEffectState::EsActivated)
|
||||
continue;
|
||||
sl << QString::fromStdString(item.name().c_str());
|
||||
}
|
||||
@@ -153,7 +153,7 @@ void DangerAreaEdit::setData(const DangerArea &aesItem, 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::fromStdString(aesItem.name()));
|
||||
m_ui->dteEffectStart->setMsecsSinceEpoch(aesItem.effectStart().is_set() ? aesItem.effectStart().get() : 0);
|
||||
|
||||
+3
-3
@@ -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)
|
||||
|
||||
+11
-11
@@ -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>())
|
||||
|
||||
+3
-3
@@ -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))
|
||||
|
||||
+1
-1
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+89
-89
@@ -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());
|
||||
}
|
||||
|
||||
+1
-1
@@ -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();
|
||||
|
||||
+22
-22
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
+102
-102
@@ -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
|
||||
|
||||
+10
-10
@@ -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
|
||||
|
||||
+13
-13
@@ -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;
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
+48
-48
@@ -163,7 +163,7 @@ void FunctionalAreaEdit::enableUiElements(bool enable)
|
||||
|
||||
const FunctionalAreaType type = m_functionalAreaTypes.value(m_ui->cbFunctionalAreaType->currentData().toInt());
|
||||
|
||||
if (type.supplyMode() == AesOperatingMode_def::OmWaitingTime)
|
||||
if (type.supplyMode() == AesOperatingMode::OmWaitingTime)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "SUPPLY-MODE";
|
||||
m_ui->sbDecontaminationMinutes->setEnabled(false);
|
||||
@@ -209,17 +209,17 @@ void FunctionalAreaEdit::enableUiElements(bool enable)
|
||||
m_ui->sbWidth->setEnabled(enable);
|
||||
|
||||
|
||||
const bool deconAvailable = type.deconMode() != AesOperatingMode_def::OmNotAvailable;
|
||||
const bool maintAvailable = type.maintMode() != AesOperatingMode_def::OmNotAvailable;
|
||||
const bool medicAvailable = type.medicMode() != AesOperatingMode_def::OmNotAvailable;
|
||||
const bool deconAvailable = type.deconMode() != AesOperatingMode::OmNotAvailable;
|
||||
const bool maintAvailable = type.maintMode() != AesOperatingMode::OmNotAvailable;
|
||||
const bool medicAvailable = type.medicMode() != AesOperatingMode::OmNotAvailable;
|
||||
|
||||
m_ui->cbDecontamination->setEnabled(enable && deconAvailable);
|
||||
m_ui->cbMaintenance->setEnabled(enable && maintAvailable);
|
||||
m_ui->cbMedical->setEnabled(enable && medicAvailable);
|
||||
|
||||
m_ui->sbDecontaminationMinutes->setEnabled((m_ui->cbDecontamination->currentIndex() == AesOperatingMode_def::OmWaitingTime) && enable && deconAvailable);
|
||||
m_ui->sbMaintanenceMinutes->setEnabled((m_ui->cbMaintenance->currentIndex() == AesOperatingMode_def::OmWaitingTime) && enable && maintAvailable);
|
||||
m_ui->sbMedicalMinutes->setEnabled((m_ui->cbMedical->currentIndex() == AesOperatingMode_def::OmWaitingTime) && enable && medicAvailable);
|
||||
m_ui->sbDecontaminationMinutes->setEnabled((m_ui->cbDecontamination->currentIndex() == AesOperatingMode::OmWaitingTime) && enable && deconAvailable);
|
||||
m_ui->sbMaintanenceMinutes->setEnabled((m_ui->cbMaintenance->currentIndex() == AesOperatingMode::OmWaitingTime) && enable && maintAvailable);
|
||||
m_ui->sbMedicalMinutes->setEnabled((m_ui->cbMedical->currentIndex() == AesOperatingMode::OmWaitingTime) && enable && medicAvailable);
|
||||
m_ui->sbSupplyMinutes->setEnabled(false);
|
||||
m_ui->sbSupplyMinutes->setValue(0);
|
||||
m_ui->cbSupply->setCurrentIndex(0);
|
||||
@@ -244,7 +244,7 @@ void FunctionalAreaEdit::enableUiElements(bool enable)
|
||||
m_ui->pbClearPointSymbol->setEnabled(isGenericFunctionalArea);
|
||||
|
||||
|
||||
if (m_aesItem.effectStateId() == AesEffectState_def::EsExpired)
|
||||
if (m_aesItem.effectStateId() == AesEffectState::EsExpired)
|
||||
{
|
||||
m_ui->leIdentifier->setText(QString::fromStdString(m_aesItem.name()));
|
||||
__unchange__();
|
||||
@@ -252,7 +252,7 @@ void FunctionalAreaEdit::enableUiElements(bool enable)
|
||||
setUnchangeable();
|
||||
disableButtons(true);
|
||||
}
|
||||
if (m_aesItem.effectStateId() == AesEffectState_def::EsActivated)
|
||||
if (m_aesItem.effectStateId() == AesEffectState::EsActivated)
|
||||
{
|
||||
QString name = m_ui->leIdentifier->text();
|
||||
auto baseData = m_dtc->functionalArea(m_aesItem.id());
|
||||
@@ -327,7 +327,7 @@ void FunctionalAreaEdit::setData(const FunctionalArea &area, 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::fromStdString(area.name()));
|
||||
@@ -394,19 +394,19 @@ void FunctionalAreaEdit::fillCbx()
|
||||
QString byOperator = tr("by operator");
|
||||
QString bytimeout = tr("by wait time");
|
||||
|
||||
m_ui->cbDecontamination->addItem(unused, AesOperatingMode_def::OmNotUsed);
|
||||
m_ui->cbDecontamination->addItem(byOperator, AesOperatingMode_def::OmObserver);
|
||||
m_ui->cbDecontamination->addItem(bytimeout, AesOperatingMode_def::OmWaitingTime);
|
||||
m_ui->cbDecontamination->addItem(unused, AesOperatingMode::OmNotUsed);
|
||||
m_ui->cbDecontamination->addItem(byOperator, AesOperatingMode::OmObserver);
|
||||
m_ui->cbDecontamination->addItem(bytimeout, AesOperatingMode::OmWaitingTime);
|
||||
|
||||
m_ui->cbMaintenance->addItem(unused, AesOperatingMode_def::OmNotUsed);
|
||||
m_ui->cbMaintenance->addItem(byOperator, AesOperatingMode_def::OmObserver);
|
||||
m_ui->cbMaintenance->addItem(bytimeout, AesOperatingMode_def::OmWaitingTime);
|
||||
m_ui->cbMaintenance->addItem(unused, AesOperatingMode::OmNotUsed);
|
||||
m_ui->cbMaintenance->addItem(byOperator, AesOperatingMode::OmObserver);
|
||||
m_ui->cbMaintenance->addItem(bytimeout, AesOperatingMode::OmWaitingTime);
|
||||
|
||||
m_ui->cbMedical->addItem(unused, AesOperatingMode_def::OmNotUsed);
|
||||
m_ui->cbMedical->addItem(byOperator, AesOperatingMode_def::OmObserver);
|
||||
m_ui->cbMedical->addItem(bytimeout, AesOperatingMode_def::OmWaitingTime);
|
||||
m_ui->cbMedical->addItem(unused, AesOperatingMode::OmNotUsed);
|
||||
m_ui->cbMedical->addItem(byOperator, AesOperatingMode::OmObserver);
|
||||
m_ui->cbMedical->addItem(bytimeout, AesOperatingMode::OmWaitingTime);
|
||||
|
||||
m_ui->cbSupply->addItem(bytimeout, AesOperatingMode_def::OmWaitingTime);
|
||||
m_ui->cbSupply->addItem(bytimeout, AesOperatingMode::OmWaitingTime);
|
||||
|
||||
|
||||
if (curIdxDeconCbx >= 0)
|
||||
@@ -450,22 +450,22 @@ void FunctionalAreaEdit::onRectData(const QPointF ¢erPoint, double width, do
|
||||
|
||||
void FunctionalAreaEdit::onCbxIdxDeconChanged()
|
||||
{
|
||||
m_ui->sbDecontaminationMinutes->setEnabled(AesOperatingMode_def::OmWaitingTime == m_ui->cbDecontamination->currentData().toInt());
|
||||
m_ui->sbDecontaminationMinutes->setEnabled(AesOperatingMode::OmWaitingTime == m_ui->cbDecontamination->currentData().toInt());
|
||||
}
|
||||
|
||||
void FunctionalAreaEdit::onCbxIdxMaintChanged()
|
||||
{
|
||||
m_ui->sbMaintanenceMinutes->setEnabled(AesOperatingMode_def::OmWaitingTime == m_ui->cbMaintenance->currentData().toInt());
|
||||
m_ui->sbMaintanenceMinutes->setEnabled(AesOperatingMode::OmWaitingTime == m_ui->cbMaintenance->currentData().toInt());
|
||||
}
|
||||
|
||||
void FunctionalAreaEdit::onCbxIdxMedicChanged()
|
||||
{
|
||||
m_ui->sbMedicalMinutes->setEnabled(AesOperatingMode_def::OmWaitingTime == m_ui->cbMedical->currentData().toInt());
|
||||
m_ui->sbMedicalMinutes->setEnabled(AesOperatingMode::OmWaitingTime == m_ui->cbMedical->currentData().toInt());
|
||||
}
|
||||
|
||||
void FunctionalAreaEdit::onCbxIdxSupplyChanged()
|
||||
{
|
||||
m_ui->sbSupplyMinutes->setEnabled(AesOperatingMode_def::OmWaitingTime == m_ui->cbSupply->currentData().toInt());
|
||||
m_ui->sbSupplyMinutes->setEnabled(AesOperatingMode::OmWaitingTime == m_ui->cbSupply->currentData().toInt());
|
||||
}
|
||||
|
||||
void FunctionalAreaEdit::onCbxIdxFunctionalAreaTypeChanged()
|
||||
@@ -488,9 +488,9 @@ void FunctionalAreaEdit::onCbxIdxFunctionalAreaTypeChanged()
|
||||
m_ui->sbDecontaminationMinutes->setValue(type.deconTime());
|
||||
m_ui->sbMaintanenceMinutes->setValue(type.maintTime());
|
||||
m_ui->sbMedicalMinutes->setValue(type.medicTime());
|
||||
m_ui->cbDecontamination->setCurrentIndex(m_ui->cbDecontamination->findData(type.deconMode() == AesOperatingMode_def::OmNotAvailable ? AesOperatingMode_def::OmNotUsed : type.deconMode().underlying()));
|
||||
m_ui->cbMaintenance->setCurrentIndex(m_ui->cbMaintenance->findData(type.maintMode() == AesOperatingMode_def::OmNotAvailable ? AesOperatingMode_def::OmNotUsed : type.maintMode().underlying()));
|
||||
m_ui->cbMedical->setCurrentIndex(m_ui->cbMedical->findData(type.medicMode() == AesOperatingMode_def::OmNotAvailable ? AesOperatingMode_def::OmNotUsed : type.medicMode().underlying()));
|
||||
m_ui->cbDecontamination->setCurrentIndex(m_ui->cbDecontamination->findData(type.deconMode() == AesOperatingMode::OmNotAvailable ? AesOperatingMode::OmNotUsed : type.deconMode().underlying()));
|
||||
m_ui->cbMaintenance->setCurrentIndex(m_ui->cbMaintenance->findData(type.maintMode() == AesOperatingMode::OmNotAvailable ? AesOperatingMode::OmNotUsed : type.maintMode().underlying()));
|
||||
m_ui->cbMedical->setCurrentIndex(m_ui->cbMedical->findData(type.medicMode() == AesOperatingMode::OmNotAvailable ? AesOperatingMode::OmNotUsed : type.medicMode().underlying()));
|
||||
}
|
||||
}
|
||||
enableUiElements(true);
|
||||
@@ -613,32 +613,32 @@ bool FunctionalAreaEdit::apply()
|
||||
int functionalAreaType = m_ui->cbFunctionalAreaType->currentData().toInt();
|
||||
int playerId = 0;
|
||||
const auto pointSymbol = m_sidc.toStdString();
|
||||
AesOperatingMode deconMode = static_cast<AesOperatingMode_def::type>(m_ui->cbDecontamination->currentData().toInt());
|
||||
int deconTime = (AesOperatingMode_def::OmWaitingTime == m_ui->cbDecontamination->currentData().toInt()) ? 1000 * 60 * m_ui->sbDecontaminationMinutes->value() : 0;
|
||||
AesOperatingMode maintMode = static_cast<AesOperatingMode_def::type>(m_ui->cbMaintenance->currentData().toInt());
|
||||
int maintTime = (AesOperatingMode_def::OmWaitingTime == m_ui->cbMaintenance->currentData().toInt()) ? 1000 * 60 * m_ui->sbMaintanenceMinutes->value() : 0;
|
||||
AesOperatingMode medicMode = static_cast<AesOperatingMode_def::type>(m_ui->cbMedical->currentData().toInt());
|
||||
int medicTime = (AesOperatingMode_def::OmWaitingTime == m_ui->cbMedical->currentData().toInt()) ? 1000 * 60 * m_ui->sbMedicalMinutes->value() : 0;
|
||||
AesOperatingMode supplyMode = static_cast<AesOperatingMode_def::type>(m_ui->cbSupply->currentData().toInt());
|
||||
AesOperatingMode deconMode = static_cast<AesOperatingMode>(m_ui->cbDecontamination->currentData().toInt());
|
||||
int deconTime = (AesOperatingMode::OmWaitingTime == m_ui->cbDecontamination->currentData().toInt()) ? 1000 * 60 * m_ui->sbDecontaminationMinutes->value() : 0;
|
||||
AesOperatingMode maintMode = static_cast<AesOperatingMode>(m_ui->cbMaintenance->currentData().toInt());
|
||||
int maintTime = (AesOperatingMode::OmWaitingTime == m_ui->cbMaintenance->currentData().toInt()) ? 1000 * 60 * m_ui->sbMaintanenceMinutes->value() : 0;
|
||||
AesOperatingMode medicMode = static_cast<AesOperatingMode>(m_ui->cbMedical->currentData().toInt());
|
||||
int medicTime = (AesOperatingMode::OmWaitingTime == m_ui->cbMedical->currentData().toInt()) ? 1000 * 60 * m_ui->sbMedicalMinutes->value() : 0;
|
||||
AesOperatingMode supplyMode = static_cast<AesOperatingMode>(m_ui->cbSupply->currentData().toInt());
|
||||
if ( functionalAreaType != 7 )
|
||||
supplyMode = AesOperatingMode_def::OmNotUsed;
|
||||
int supplyTime = (AesOperatingMode_def::OmWaitingTime == m_ui->cbSupply->currentData().toInt()) ? 1000 * 60 * m_ui->sbSupplyMinutes->value() : 0;
|
||||
AesOperatingMode notfightMode = static_cast<AesOperatingMode_def::type>(m_ui->cbMedical->currentData().toInt());
|
||||
int notfightTime = (AesOperatingMode_def::OmWaitingTime == m_ui->cbMedical->currentData().toInt()) ? 1000 * 60 * m_ui->sbMedicalMinutes->value() : 0;
|
||||
supplyMode = AesOperatingMode::OmNotUsed;
|
||||
int supplyTime = (AesOperatingMode::OmWaitingTime == m_ui->cbSupply->currentData().toInt()) ? 1000 * 60 * m_ui->sbSupplyMinutes->value() : 0;
|
||||
AesOperatingMode notfightMode = static_cast<AesOperatingMode>(m_ui->cbMedical->currentData().toInt());
|
||||
int notfightTime = (AesOperatingMode::OmWaitingTime == m_ui->cbMedical->currentData().toInt()) ? 1000 * 60 * m_ui->sbMedicalMinutes->value() : 0;
|
||||
if ( functionalAreaType == 7 )
|
||||
{
|
||||
deconMode = AesOperatingMode_def::OmNotUsed;
|
||||
maintMode = AesOperatingMode_def::OmNotUsed;
|
||||
medicMode = AesOperatingMode_def::OmNotUsed;
|
||||
notfightMode = AesOperatingMode_def::OmNotUsed;
|
||||
deconMode = AesOperatingMode::OmNotUsed;
|
||||
maintMode = AesOperatingMode::OmNotUsed;
|
||||
medicMode = AesOperatingMode::OmNotUsed;
|
||||
notfightMode = AesOperatingMode::OmNotUsed;
|
||||
}
|
||||
if ( functionalAreaType == 8 )
|
||||
{
|
||||
deconMode = AesOperatingMode_def::OmNotUsed;
|
||||
maintMode = AesOperatingMode_def::OmNotUsed;
|
||||
medicMode = AesOperatingMode_def::OmNotUsed;
|
||||
supplyMode = AesOperatingMode_def::OmNotUsed;
|
||||
notfightMode = AesOperatingMode_def::OmObserver;
|
||||
deconMode = AesOperatingMode::OmNotUsed;
|
||||
maintMode = AesOperatingMode::OmNotUsed;
|
||||
medicMode = AesOperatingMode::OmNotUsed;
|
||||
supplyMode = AesOperatingMode::OmNotUsed;
|
||||
notfightMode = AesOperatingMode::OmObserver;
|
||||
}
|
||||
|
||||
QPointF bottomLeft(Polygons::centerPoint2BottomLeft(m_ui->positionEdit->coordinate(),
|
||||
@@ -649,7 +649,7 @@ bool FunctionalAreaEdit::apply()
|
||||
const Area area(bottomLeftGeo, m_ui->sbWidth->value(), m_ui->sbHeight->value(), 0.0);
|
||||
|
||||
const ::dds::core::optional< int32_t > participantIdOpt = LtsUtils::toOptional(playerId);
|
||||
if (supplyMode == AesOperatingMode_def::OmWaitingTime)
|
||||
if (supplyMode == AesOperatingMode::OmWaitingTime)
|
||||
{
|
||||
partyId = 0;
|
||||
playerId = m_participant.id();
|
||||
|
||||
+3
-3
@@ -76,12 +76,12 @@ void GasPipeEdit::enableUiElements(bool enable)
|
||||
m_ui->leIdentifier->setEnabled(enable || isOnlyNameModifiable());
|
||||
m_ui->cbParty->setEnabled(enable);
|
||||
|
||||
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();
|
||||
auto baseData = m_dtc->gasPipe(m_aesItem.id());
|
||||
@@ -136,7 +136,7 @@ void GasPipeEdit::setData(const GasPipe &aesItem, 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::fromStdString(aesItem.name()));
|
||||
m_ui->sbWidth->setValue(aesItem.width());
|
||||
|
||||
+9
-9
@@ -114,12 +114,12 @@ void MineAreaEdit::enableUiElements(bool enable)
|
||||
else
|
||||
m_ui->pbResetDusMines->hide();
|
||||
|
||||
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();
|
||||
auto baseData = m_dtc->mineArea(m_aesItem.id());
|
||||
@@ -193,10 +193,10 @@ bool MineAreaEdit::init(int aesItemId, bool copy,
|
||||
m_ui->cbDurationHours->setCurrentIndex(m_ui->cbDurationHours->findData(96));
|
||||
|
||||
if (strcmp(PROJECTBUILD, "guez") == 0)
|
||||
m_ui->cbLayingProcedure->addItem(tr("Artillery"), AesMaLayingProcedureType_def::LptArtillery);
|
||||
m_ui->cbLayingProcedure->addItem(tr("Artillery"), AesMaLayingProcedureType::LptArtillery);
|
||||
|
||||
m_ui->cbLayingProcedure->addItem(tr("Pioneer"), AesMaLayingProcedureType_def::LptPioneer);
|
||||
m_ui->cbLayingProcedure->setCurrentIndex(m_ui->cbLayingProcedure->findData(AesMaLayingProcedureType_def::LptPioneer));
|
||||
m_ui->cbLayingProcedure->addItem(tr("Pioneer"), AesMaLayingProcedureType::LptPioneer);
|
||||
m_ui->cbLayingProcedure->setCurrentIndex(m_ui->cbLayingProcedure->findData(AesMaLayingProcedureType::LptPioneer));
|
||||
|
||||
m_ui->cbLayingMethod->addItem(tr("Open"), 0);
|
||||
m_ui->cbLayingMethod->addItem(tr("Covered"), 1);
|
||||
@@ -246,7 +246,7 @@ void MineAreaEdit::setData(const MineArea &data, 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(data.name().c_str()));
|
||||
m_ui->cbChargeType->setCurrentIndex(m_ui->cbChargeType->findData(data.chargeStruct().chargeTypeId()));
|
||||
@@ -323,7 +323,7 @@ void MineAreaEdit::getPosition()
|
||||
double width = m_ui->sbWidth->value();
|
||||
|
||||
int maxSegments = m_segments;
|
||||
if (m_ui->cbLayingProcedure->currentData().toInt() == AesMaLayingProcedureType_def::LptArtillery)
|
||||
if (m_ui->cbLayingProcedure->currentData().toInt() == AesMaLayingProcedureType::LptArtillery)
|
||||
maxSegments = 1;
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ bool MineAreaEdit::apply()
|
||||
std::string name = m_ui->leIdentifier->text().toStdString();
|
||||
int chargeTypeId = m_ui->cbChargeType->currentData().toInt();
|
||||
s_lastChargeType = chargeTypeId;
|
||||
AesMaLayingProcedureType layingProcedureType = static_cast<AesMaLayingProcedureType_def::type>(m_ui->cbLayingProcedure->currentData().toInt());
|
||||
AesMaLayingProcedureType layingProcedureType = static_cast<AesMaLayingProcedureType>(m_ui->cbLayingProcedure->currentData().toInt());
|
||||
bool isLaidHidden = m_ui->cbLayingMethod->currentData().toInt() != 0;
|
||||
int partyId = m_ui->cbParty->currentData().toInt();
|
||||
int playerId = 0;
|
||||
@@ -429,7 +429,7 @@ bool MineAreaEdit::apply()
|
||||
|
||||
void MineAreaEdit::onLayingProcedureChanged()
|
||||
{
|
||||
const bool islptArtillery = m_ui->cbLayingProcedure->currentData().toInt() == AesMaLayingProcedureType_def::LptArtillery;
|
||||
const bool islptArtillery = m_ui->cbLayingProcedure->currentData().toInt() == AesMaLayingProcedureType::LptArtillery;
|
||||
if (islptArtillery)
|
||||
m_pdmGuiIfc->setChargeTypePropertyFilter(m_ui->cbChargeType, QStringLiteral("canBeThrown"), true);
|
||||
else
|
||||
|
||||
+3
-3
@@ -76,12 +76,12 @@ void MineCorridorEdit::enableUiElements(bool enable)
|
||||
m_ui->pbClear->setEnabled(enable);
|
||||
m_ui->leIdentifier->setEnabled(enable || isOnlyNameModifiable());
|
||||
|
||||
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();
|
||||
auto baseData = m_dtc->mineCorridor(m_aesItem.id());
|
||||
@@ -134,7 +134,7 @@ void MineCorridorEdit::setData(const MineCorridor &aesItem, 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::fromStdString(aesItem.name()));
|
||||
m_ui->sbWidth->setValue(aesItem.width());
|
||||
|
||||
+3
-3
@@ -126,12 +126,12 @@ void BoobyTrapEdit::enableUiElements(bool enable)
|
||||
m_ui->leIdentifier->setEnabled(enable || isOnlyNameModifiable());
|
||||
|
||||
m_ui->pbClear->setEnabled(enable);
|
||||
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();
|
||||
auto baseData = m_dtc->boobyTrap(m_aesItem.id());
|
||||
@@ -225,7 +225,7 @@ void BoobyTrapEdit::setData(const BoobyTrap &bt, 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::fromStdString(bt.name()));
|
||||
m_ui->dteEffectStart->setMsecsSinceEpoch(bt.effectStart().is_set() ? bt.effectStart().get() : 0);
|
||||
|
||||
+3
-3
@@ -176,12 +176,12 @@ void OffRouteMineEdit::enableUiElements(bool enable)
|
||||
m_ui->leIdentifier->setEnabled(enable || isOnlyNameModifiable());
|
||||
|
||||
m_ui->pbClear->setEnabled(enable);
|
||||
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();
|
||||
auto baseData = m_dtc->offRouteMine(m_aesItem.id());
|
||||
@@ -249,7 +249,7 @@ void OffRouteMineEdit::setData(const OffRouteMine &orm, bool copy)
|
||||
if (copy)
|
||||
{
|
||||
m_aesItem.id(0);
|
||||
m_aesItem.effectStateId(AreaEffectSimulation::AesEffectState_def::get_default());
|
||||
m_aesItem.effectStateId(AreaEffectSimulation::AesEffectState::get_default());
|
||||
}
|
||||
const Area &area = orm.area();
|
||||
if (!qFuzzyCompare(area.cornerBottomLeft().lon(), 0) ||
|
||||
|
||||
+12
-12
@@ -157,9 +157,9 @@ void NContaminationEdit::onWeatherChanged(int index )
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
|
||||
AreaEffectSimulation::AesWeatherSource weather = static_cast<AreaEffectSimulation::AesWeatherSource::inner_enum>(m_ui->cbWeather->currentData().toInt());
|
||||
if (weather == AreaEffectSimulation::AesWeatherSource_def::AwsDynamic ||
|
||||
weather == AreaEffectSimulation::AesWeatherSource_def::AwsStatic)
|
||||
AreaEffectSimulation::AesWeatherSource weather = static_cast<AreaEffectSimulation::AesWeatherSource>(m_ui->cbWeather->currentData().toInt());
|
||||
if (weather == AreaEffectSimulation::AesWeatherSource::AwsDynamic ||
|
||||
weather == AreaEffectSimulation::AesWeatherSource::AwsStatic)
|
||||
{
|
||||
m_ui->rotationAngleEdit->showSpinbox(1, false);
|
||||
m_ui->stackedWidget->setCurrentWidget(m_ui->lbAngle);
|
||||
@@ -182,9 +182,9 @@ void NContaminationEdit::setRadials(double direction, double spanAngle)
|
||||
double radial1 = direction - (fabs(spanAngle) / 2.0);
|
||||
double radial2 = direction + (fabs(spanAngle) / 2.0);
|
||||
|
||||
AreaEffectSimulation::AesWeatherSource weather = static_cast<AreaEffectSimulation::AesWeatherSource::inner_enum>(m_ui->cbWeather->currentData().toInt());
|
||||
if (weather == AreaEffectSimulation::AesWeatherSource_def::AwsDynamic ||
|
||||
weather == AreaEffectSimulation::AesWeatherSource_def::AwsStatic)
|
||||
AreaEffectSimulation::AesWeatherSource weather = static_cast<AreaEffectSimulation::AesWeatherSource>(m_ui->cbWeather->currentData().toInt());
|
||||
if (weather == AreaEffectSimulation::AesWeatherSource::AwsDynamic ||
|
||||
weather == AreaEffectSimulation::AesWeatherSource::AwsStatic)
|
||||
{
|
||||
radial1 = spanAngle;
|
||||
}
|
||||
@@ -202,7 +202,7 @@ double NContaminationEdit::spanAngle() const
|
||||
double radial2 = m_ui->rotationAngleEdit->getAngleConverted(m_ui->rotationAngleEdit->getAngle(1), LtsAngleEditBase::AngleUnitType::Deg,
|
||||
m_ui->rotationAngleEdit->getAngleCurrentUnit());
|
||||
|
||||
if (m_ui->cbWeather->currentData().toInt() != AreaEffectSimulation::AesWeatherSource_def::AwsNone)
|
||||
if (m_ui->cbWeather->currentData().toInt() != AreaEffectSimulation::AesWeatherSource::AwsNone)
|
||||
return radial1;
|
||||
|
||||
double spanAngle = radial2 - radial1;
|
||||
@@ -213,7 +213,7 @@ double NContaminationEdit::spanAngle() const
|
||||
|
||||
double NContaminationEdit::rotatianAngle() const
|
||||
{
|
||||
if (m_ui->cbWeather->currentData().toInt() != AreaEffectSimulation::AesWeatherSource_def::AwsNone)
|
||||
if (m_ui->cbWeather->currentData().toInt() != AreaEffectSimulation::AesWeatherSource::AwsNone)
|
||||
return 0.0;
|
||||
|
||||
double radial1 = m_ui->rotationAngleEdit->getAngleConverted(m_ui->rotationAngleEdit->getAngle(0), LtsAngleEditBase::AngleUnitType::Deg,
|
||||
@@ -244,12 +244,12 @@ void NContaminationEdit::enableUiElements(bool enable)
|
||||
m_ui->leIdentifier->setEnabled(enable || isOnlyNameModifiable());
|
||||
m_ui->cbWeather->setEnabled(enable);
|
||||
|
||||
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();
|
||||
auto baseData = m_dtc->nContamination(m_aesItem.id());
|
||||
@@ -322,7 +322,7 @@ void NContaminationEdit::setData(const NContamination &contamination, 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::fromStdString(contamination.name()));
|
||||
@@ -385,7 +385,7 @@ bool NContaminationEdit::apply()
|
||||
int partyId = 0;
|
||||
int playerId = 0;
|
||||
|
||||
AesWeatherSource weatherSourceId = static_cast<AesWeatherSource::inner_enum>(m_ui->cbWeather->currentData().toInt());
|
||||
AesWeatherSource weatherSourceId = static_cast<AesWeatherSource>(m_ui->cbWeather->currentData().toInt());
|
||||
const QPointF p(m_ui->positionEdit->coordinate());
|
||||
const Core::GeoPosition2D pos(p.x(), p.y());
|
||||
const NContaminationModifyRequest req(m_aesItem.id(),
|
||||
|
||||
+6
-6
@@ -81,12 +81,12 @@ void TechnicalAreaEdit::enableUiElements(bool enable)
|
||||
m_ui->sbWidth->setEnabled(enable);
|
||||
m_ui->pbClear->setEnabled(enable);
|
||||
m_ui->leIdentifier->setEnabled(enable || isOnlyNameModifiable());
|
||||
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();
|
||||
auto baseData = m_dtc->technicalArea(m_aesItem.id());
|
||||
@@ -137,7 +137,7 @@ void TechnicalAreaEdit::setData(const TechnicalArea &area, 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::fromStdString(area.name()));
|
||||
m_ui->sbWidth->setValue(area.area().width());
|
||||
@@ -161,9 +161,9 @@ inline void TechnicalAreaEdit::fillCbx()
|
||||
|
||||
|
||||
m_ui->cbType->clear();
|
||||
m_ui->cbType->addItem(AreaEffectSimulation::toString(AesTechnicalAreaType_def::TatMout), AesTechnicalAreaType_def::TatMout);
|
||||
m_ui->cbType->addItem(AreaEffectSimulation::toString(AesTechnicalAreaType::TatMout), AesTechnicalAreaType::TatMout);
|
||||
if ( enableSoundZones )
|
||||
m_ui->cbType->addItem(AreaEffectSimulation::toString(AesTechnicalAreaType_def::TatSoundZone), AesTechnicalAreaType_def::TatSoundZone);
|
||||
m_ui->cbType->addItem(AreaEffectSimulation::toString(AesTechnicalAreaType::TatSoundZone), AesTechnicalAreaType::TatSoundZone);
|
||||
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ void TechnicalAreaEdit::onRectData(const QPointF ¢erPoint, double width, dou
|
||||
bool TechnicalAreaEdit::apply()
|
||||
{
|
||||
std::string name = m_ui->leIdentifier->text().toStdString();
|
||||
AesTechnicalAreaType type = static_cast<AesTechnicalAreaType::inner_enum>(m_ui->cbType->currentData().toInt());
|
||||
AesTechnicalAreaType type = static_cast<AesTechnicalAreaType>(m_ui->cbType->currentData().toInt());
|
||||
QPointF bottomLeft(Polygons::centerPoint2BottomLeft(m_ui->positionEdit->coordinate(),
|
||||
m_ui->sbWidth->value(),
|
||||
m_ui->sbHeight->value(),
|
||||
|
||||
Reference in new issue
Block a user