Close Schusstafel + KDChart plugin floors: cesPluginGeoPairing/OreOnlineReportsGuiPlugin in GROUP12 (presence-gated), image bakes KDChart
DDS member fixes (GeoPairing, OnlineReports charts/dialogs); FindKDChart/FindSchusstafel find-module wiring
This commit is contained in:
9 files changed
+160
-45
No files matched your search
+6
-6
@@ -84,17 +84,17 @@ void DetailedChartModel::onDynamicParticipantDataChanged(const ParticipantManage
|
||||
{
|
||||
Q_UNUSED(modType);
|
||||
|
||||
const ParticipantManagement::StateInformation &stateInfo = m_config.ppmDtc->youngestStateInformation(data.stateHistory());
|
||||
const ParticipantManagement::StateInformation &stateInfo = m_config.ppmDtc->youngestStateInformation(data.stateHistory);
|
||||
|
||||
if (!m_config.participantIds.contains(data.participantId()) ||
|
||||
stateInfo.vulnerabilityState() > ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
|
||||
if (!m_config.participantIds.contains(data.participantId) ||
|
||||
stateInfo.vulnerabilityState > ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
|
||||
return;
|
||||
|
||||
|
||||
for (auto it = m_participantStates.begin(); it != m_participantStates.end(); ++it)
|
||||
it.value() -= data.participantId();
|
||||
it.value() -= data.participantId;
|
||||
|
||||
m_participantStates[stateInfo.vulnerabilityState()] += data.participantId();
|
||||
m_participantStates[stateInfo.vulnerabilityState] += data.participantId;
|
||||
|
||||
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1));
|
||||
}
|
||||
@@ -113,7 +113,7 @@ DetailedChartModel::DetailedChartModel(const AbstractChartModel::ChartConfig &co
|
||||
|
||||
auto cb = [this](const ParticipantManagement::DynamicParticipantData & data)
|
||||
{
|
||||
if (!m_config.participantIds.contains(data.participantId()))
|
||||
if (!m_config.participantIds.contains(data.participantId))
|
||||
return;
|
||||
onDynamicParticipantDataChanged(data, DataModification::eAdded);
|
||||
};
|
||||
|
||||
+8
-8
@@ -56,18 +56,18 @@ void SimpleChartModel::onDynamicParticipantDataChanged(const ParticipantManageme
|
||||
{
|
||||
Q_UNUSED(modType);
|
||||
|
||||
if (!m_config.participantIds.contains(data.participantId()))
|
||||
if (!m_config.participantIds.contains(data.participantId))
|
||||
return;
|
||||
|
||||
const ParticipantManagement::StateInformation &stateInfo = m_config.ppmDtc->youngestStateInformation(data.stateHistory());
|
||||
const ParticipantManagement::StateInformation &stateInfo = m_config.ppmDtc->youngestStateInformation(data.stateHistory);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Participant id = " << data.participantId();
|
||||
DEBUG_LOG(m_logger) << "State Info Vulnerability = " << stateInfo.vulnerabilityState();
|
||||
DEBUG_LOG(m_logger) << "Participant id = " << data.participantId;
|
||||
DEBUG_LOG(m_logger) << "State Info Vulnerability = " << static_cast<int>(stateInfo.vulnerabilityState);
|
||||
|
||||
if (stateInfo.vulnerabilityState() < ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
|
||||
setCombatReady(data.participantId());
|
||||
if (stateInfo.vulnerabilityState < ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
|
||||
setCombatReady(data.participantId);
|
||||
else
|
||||
setKilled(data.participantId());
|
||||
setKilled(data.participantId);
|
||||
|
||||
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1));
|
||||
}
|
||||
@@ -76,7 +76,7 @@ SimpleChartModel::SimpleChartModel(const AbstractChartModel::ChartConfig &config
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
auto cb = [this](const ParticipantManagement::DynamicParticipantData & data)
|
||||
{
|
||||
if (!m_config.participantIds.contains(data.participantId()))
|
||||
if (!m_config.participantIds.contains(data.participantId))
|
||||
return;
|
||||
onDynamicParticipantDataChanged(data, DataModification::eAdded);
|
||||
};
|
||||
|
||||
+4
-4
@@ -160,10 +160,10 @@ bool CreateReportDialog::apply()
|
||||
{
|
||||
ParticipantManagement::ParticipantData data = m_participantModel->getParticipantData(index);
|
||||
|
||||
if (data.id() != 0 &&
|
||||
data.equipmentNumber().has_value() &&
|
||||
typeIds.contains(data.typeId()))
|
||||
participantIds.insert(data.id());
|
||||
if (data.id != 0 &&
|
||||
data.equipmentNumber.has_value() &&
|
||||
typeIds.contains(data.typeId))
|
||||
participantIds.insert(data.id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ ReportDialog::ReportDialog(const AbstractChartModel::ChartConfig &config, QWidge
|
||||
for (int32_t participantId :config.participantIds)
|
||||
{
|
||||
ParticipantManagement::Participant participant = config.ppmDtc->participant(participantId);
|
||||
ParticipantManagement::TypeClass typeClass = config.ppmDtc->type(participant.typeId()).typeClass();
|
||||
ParticipantManagement::TypeClass typeClass = config.ppmDtc->type(participant.typeId).typeClass;
|
||||
|
||||
participantIdsByTypeClass[typeClass] += participantId;
|
||||
}
|
||||
|
||||
+6
-6
@@ -22,7 +22,7 @@ bool TypeModel::init()
|
||||
{
|
||||
m_ppmDtc->types([this](const ParticipantManagement::Type &type)
|
||||
{
|
||||
if (m_ppmDtc->isTypeInUse(type.id()))
|
||||
if (m_ppmDtc->isTypeInUse(type.id))
|
||||
insertRow(type);
|
||||
});
|
||||
|
||||
@@ -33,7 +33,7 @@ int TypeModel::getTypeId(const QModelIndex &index) const
|
||||
{
|
||||
if (!indexIsValid(index))
|
||||
return -1;
|
||||
return m_vecData.at(index.row()).id();
|
||||
return m_vecData.at(index.row()).id;
|
||||
}
|
||||
|
||||
QVariant TypeModel::data(const QModelIndex &index, int role) const
|
||||
@@ -46,9 +46,9 @@ QVariant TypeModel::data(const QModelIndex &index, int role) const
|
||||
switch (index.column())
|
||||
{
|
||||
case 0:
|
||||
return ParticipantManagement::toString(entry.typeClass());
|
||||
return ParticipantManagement::toString(entry.typeClass);
|
||||
case 1:
|
||||
return QString::fromStdString(entry.name());
|
||||
return QString::fromStdString(entry.name);
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
@@ -56,8 +56,8 @@ QVariant TypeModel::data(const QModelIndex &index, int role) const
|
||||
bool TypeModel::isFiltered(const ParticipantManagement::Type &data, DataModification modType) const
|
||||
{
|
||||
Q_UNUSED(modType);
|
||||
return (data.typeClass() == ParticipantManagement::TypeClass::Unit ||
|
||||
data.typeClass() == ParticipantManagement::TypeClass::SupportUnit);
|
||||
return (data.typeClass == ParticipantManagement::TypeClass::Unit ||
|
||||
data.typeClass == ParticipantManagement::TypeClass::SupportUnit);
|
||||
}
|
||||
|
||||
}
|
||||
+16
-16
@@ -136,24 +136,24 @@ void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
||||
while (i.hasNext())
|
||||
{
|
||||
i.next();
|
||||
SInt32 vulnerabilityState = i.value().vulnerabilityState;
|
||||
Float64 lat = i.value().pos().lat() * 180 / M_PI;
|
||||
Float64 lon = i.value().pos().lon() * 180 / M_PI;
|
||||
SInt32 vulnerabilityState = static_cast<SInt32>(i.value().vulnerabilityState);
|
||||
Float64 lat = i.value().pos.lat * 180 / M_PI;
|
||||
Float64 lon = i.value().pos.lon * 180 / M_PI;
|
||||
DEBUG_LOG(m_logger) << "GeoPairing::calculateAirFire"
|
||||
<< "\nl_Updater->update : " << i.key()
|
||||
<< "\n: participantId=" << i.value().participantId()
|
||||
<< "\n participantTypeId= " << i.value().participantTypeId()
|
||||
<< "\n: participantId=" << i.value().participantId
|
||||
<< "\n participantTypeId= " << i.value().participantTypeId
|
||||
<< "\n pos lat=" << lat
|
||||
<< "\n lon=" << lon
|
||||
<< "\n alt=" << i.value().pos().z()
|
||||
<< "\n posTime=" << i.value().sampleTime()
|
||||
<< "\n alt=" << i.value().pos.z
|
||||
<< "\n posTime=" << i.value().sampleTime
|
||||
<< "\n state=" << i.value().vulnerabilityState
|
||||
<< "\n state (SInt32)=" << vulnerabilityState;
|
||||
l_Updater->update(i.value().participantId(),
|
||||
l_Updater->update(i.value().participantId,
|
||||
lat,
|
||||
lon,
|
||||
i.value().pos().z(),
|
||||
i.value().sampleTime() / 1000, //s
|
||||
i.value().pos.z,
|
||||
i.value().sampleTime / 1000, //s
|
||||
vulnerabilityState);
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
||||
if (l_TargetFound != l_CachedTrackingState || l_TimeoutPassed)
|
||||
{
|
||||
// prepare response for player
|
||||
m_reportTarget.playerId = i.value().participantId();
|
||||
m_reportTarget.playerId = i.value().participantId;
|
||||
m_reportTarget.sendData.clear();
|
||||
m_reportTarget.sendData.append(0xEB); // Report Target Detection
|
||||
|
||||
@@ -843,11 +843,11 @@ bool GeoPairing::geoPairingData(const std::shared_ptr<N_Ballistic::BallisticServ
|
||||
while (i.hasNext())
|
||||
{
|
||||
i.next();
|
||||
DEBUG_LOG(m_logger) << i.key() << ": participantId=" << i.value().participantId()
|
||||
<< " participantTypeId= " << i.value().participantTypeId()
|
||||
<< " pos lat=" << i.value().pos().lat()
|
||||
<< " pos lon=" << i.value().pos().lon()
|
||||
<< " z=" << i.value().pos().z();
|
||||
DEBUG_LOG(m_logger) << i.key() << ": participantId=" << i.value().participantId
|
||||
<< " participantTypeId= " << i.value().participantTypeId
|
||||
<< " pos lat=" << i.value().pos.lat
|
||||
<< " pos lon=" << i.value().pos.lon
|
||||
<< " z=" << i.value().pos.z;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user