Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+115
-116
@@ -83,11 +83,10 @@
|
||||
namespace SituationMap
|
||||
{
|
||||
|
||||
AdapterDds::AdapterDds(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START DDDDDDDD" ;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" ;
|
||||
AdapterDds::AdapterDds(QObject *parent) : QObject(parent),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START DDDDDDDD" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" ;
|
||||
}
|
||||
|
||||
AdapterDds::~AdapterDds()
|
||||
@@ -120,7 +119,7 @@ AdapterDds::~AdapterDds()
|
||||
|
||||
bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<MovementTrackManager> &movementTrackMgr, bool resourceMode)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START" ;
|
||||
|
||||
if (!map || !pluginProvider)
|
||||
return false;
|
||||
@@ -143,7 +142,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
participantLayername,
|
||||
"Participant2SituationMap"));
|
||||
if (!m_particpants->init(&m_map->layerFactory(), m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
|
||||
|
||||
|
||||
@@ -169,7 +168,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
drawOrder,
|
||||
"HitlineInfo2SituationMap"));
|
||||
if (!m_hitlineInfo2SituationMap->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
{
|
||||
@@ -183,7 +182,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
drawOrder,
|
||||
"BldHitlineInfo2SituationMap"));
|
||||
if (!m_bldHitlineInfo2SituationMap->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -243,7 +242,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if(!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
|
||||
@@ -274,7 +273,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
{
|
||||
@@ -288,7 +287,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
{
|
||||
@@ -302,7 +301,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(contIdx)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
{
|
||||
@@ -316,7 +315,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
{
|
||||
@@ -330,7 +329,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
|
||||
@@ -355,7 +354,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
int drawOrder = 0;
|
||||
@@ -374,7 +373,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
{
|
||||
@@ -391,7 +390,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
|
||||
@@ -403,16 +402,16 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
drawOrder++,
|
||||
"ChargeEffectToMap"));
|
||||
if (!m_chargeEffects->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed (ChargeEffectToMap)";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed (ChargeEffectToMap)";
|
||||
else
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " ChargeEffect2Map for ChargeEffect prepared";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " ChargeEffect2Map for ChargeEffect prepared";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (m_map->mode() == Mode::Mode_3D)
|
||||
{
|
||||
INFO_LOG() << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral";
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral";
|
||||
initRenderer3D_AesCentral_Booby(layernameAesCentral, {AreaEffectSimulation::AesType_def::AtBoobyTrap, AreaEffectSimulation::AesType_def::AtOffRouteMine});
|
||||
}
|
||||
|
||||
@@ -427,7 +426,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG()<<Q_FUNC_INFO <<" init failed";
|
||||
ERROR_LOG(m_logger)<<Q_FUNC_INFO <<" init failed";
|
||||
}
|
||||
|
||||
{
|
||||
@@ -441,7 +440,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG()<<Q_FUNC_INFO <<" init failed";
|
||||
ERROR_LOG(m_logger)<<Q_FUNC_INFO <<" init failed";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -460,7 +459,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
{
|
||||
@@ -474,7 +473,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
{
|
||||
@@ -488,7 +487,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
{
|
||||
@@ -502,7 +501,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
|
||||
@@ -519,7 +518,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
|
||||
@@ -536,7 +535,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
|
||||
@@ -554,7 +553,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
|
||||
@@ -570,7 +569,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
m_aes2MapCont[static_cast<int>(aesType)] = sim2Map;
|
||||
}
|
||||
if (!sim2Map->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
|
||||
@@ -609,9 +608,9 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
emergencyCallLayername,
|
||||
0, "EmergencyCallToMap"));
|
||||
if (!m_emergencyCalls->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed (EmergencyCallToMap)";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed (EmergencyCallToMap)";
|
||||
else
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " EmergencyCallToMap for AlmEmergencyCalls prepared";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " EmergencyCallToMap for AlmEmergencyCalls prepared";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -627,7 +626,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
const bool enableDamageVisualization =
|
||||
ps->value(QStringLiteral("SituationMap"), QStringLiteral("enableDamageVisualizationAtBuilding2Map")).toBool();
|
||||
if (!m_buildings->init(m_pluginProvider, enableDamageVisualization))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
|
||||
|
||||
|
||||
@@ -641,7 +640,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
drawOrder++,
|
||||
"TrainingAreaToSituationMap"));
|
||||
if (!m_trainingAreas->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
m_specialAreas = QSharedPointer<SpecialAreaToSituationMap>(new SpecialAreaToSituationMap(m_map->objectFactory(),
|
||||
@@ -649,7 +648,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
drawOrder++,
|
||||
"SpecialAreaToSituationMap"));
|
||||
if (!m_specialAreas->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
|
||||
|
||||
|
||||
@@ -658,7 +657,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
drawOrder++,
|
||||
"MountingPointToMap"));
|
||||
if (!m_mountingPoints->init(m_pluginProvider, resourceMode))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
|
||||
|
||||
|
||||
@@ -667,7 +666,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
drawOrder++,
|
||||
"SoundAreaToMap"));
|
||||
if (!m_soundAreas->init(m_pluginProvider, resourceMode))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
|
||||
|
||||
if (!resourceMode)
|
||||
@@ -678,7 +677,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
drawOrder++,
|
||||
"MsePointToMap"));
|
||||
if (!m_msePoints->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
|
||||
|
||||
m_mseBridges = QSharedPointer<MSEBridgeToMap>(new MSEBridgeToMap(m_map->objectFactory(),
|
||||
@@ -686,7 +685,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
drawOrder++,
|
||||
"MseBridgeToMap"));
|
||||
if (!m_mseBridges->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
|
||||
@@ -695,7 +694,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
drawOrder++,
|
||||
"ShootbackAreaToSituationMap"));
|
||||
if (!m_shootbackAreas->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
|
||||
const bool bIsOfTypeOrganizer =
|
||||
(m_pluginProvider->operatorId() == 99) ||
|
||||
@@ -709,7 +708,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
drawOrder++,
|
||||
"GuezIed2SituationMap"));
|
||||
if (!m_guezIeds->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
}
|
||||
|
||||
|
||||
@@ -719,7 +718,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
drawOrder++,
|
||||
"NineLiner2SituationMap"));
|
||||
if (!m_guezNasat9Liner->init(m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
|
||||
|
||||
|
||||
@@ -730,14 +729,14 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
|
||||
if (m_buildingOwnership)
|
||||
if (!m_buildingOwnership->init(m_map, m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
|
||||
if ((m_map->mode() == Mode::Mode_3D) && (m_buildingContamination.isNull()))
|
||||
m_buildingContamination = QSharedPointer<BuildingContamination>(new BuildingContamination(drawOrder++, this));
|
||||
|
||||
if (m_buildingContamination)
|
||||
if (!m_buildingContamination->init(m_map, m_pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed";
|
||||
|
||||
|
||||
|
||||
@@ -776,7 +775,7 @@ bool AdapterDds::init(Map *map, PluginProvider *pluginProvider, QPointer<Movemen
|
||||
}
|
||||
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" ;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -785,7 +784,7 @@ bool AdapterDds::initRenderer3D_AesExtrusion()
|
||||
if (m_map->mode() != Mode::Mode_3D)
|
||||
return false;
|
||||
|
||||
INFO_LOG() << Q_FUNC_INFO << " START";
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
|
||||
|
||||
@@ -800,15 +799,15 @@ bool AdapterDds::initRenderer3D_AesExtrusion()
|
||||
|
||||
|
||||
connect(m_map, &Map::partysChangedDelayed, this, [this] () {
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " partysChangedDelayed ********";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " partysChangedDelayed ********";
|
||||
|
||||
|
||||
bool successAes = assignUniqueValueRendererAesCentral3DExtrusion(layernameAes);
|
||||
if (successAes)
|
||||
INFO_LOG() << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral3DExtrusion okay" << " ('" << layernameAes << "')";
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral3DExtrusion okay" << " ('" << layernameAes << "')";
|
||||
else
|
||||
for (int i=0; i<5; ++i)
|
||||
ERROR_LOG() << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral3DExtrusion failed" << " ('" << layernameAes << "')";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral3DExtrusion failed" << " ('" << layernameAes << "')";
|
||||
|
||||
|
||||
|
||||
@@ -824,14 +823,14 @@ bool AdapterDds::initRenderer3D_AesExtrusion()
|
||||
|
||||
bool successAes = assignUniqueValueRendererAesCentral3DExtrusion(layernameAes);
|
||||
if (successAes)
|
||||
INFO_LOG() << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral3DExtrusion okay" << " ('" << layernameAes << "')";
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral3DExtrusion okay" << " ('" << layernameAes << "')";
|
||||
else
|
||||
for (int i=0; i<5; ++i)
|
||||
ERROR_LOG() << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral3DExtrusion failed" << " ('" << layernameAes << "')";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral3DExtrusion failed" << " ('" << layernameAes << "')";
|
||||
});
|
||||
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -844,18 +843,18 @@ bool AdapterDds::initRenderer3D_AesCentral_Booby(const QString &layernameAesCent
|
||||
|
||||
|
||||
|
||||
INFO_LOG() << Q_FUNC_INFO << " START, layernameAesCentral=" << layernameAesCentral;
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " START, layernameAesCentral=" << layernameAesCentral;
|
||||
|
||||
connect(m_map, &Map::partysChangedDelayed, this, [this, layernameAesCentral, aesTypesForReRunIfPartyColorChanges] () {
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " partysChangedDelayed ********";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " partysChangedDelayed ********";
|
||||
|
||||
|
||||
bool successAesCentral = assignUniqueValueRendererAesCentral(layernameAesCentral);
|
||||
if (successAesCentral)
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral okay" << " ('" << layernameAesCentral << "')";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral okay" << " ('" << layernameAesCentral << "')";
|
||||
else
|
||||
for (int i=0; i<5; ++i)
|
||||
ERROR_LOG() << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral failed" << " ('" << layernameAesCentral << "')";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral failed" << " ('" << layernameAesCentral << "')";
|
||||
|
||||
|
||||
|
||||
@@ -873,18 +872,18 @@ bool AdapterDds::initRenderer3D_AesCentral_Booby(const QString &layernameAesCent
|
||||
|
||||
bool successAesCentral = assignUniqueValueRendererAesCentral(layernameAesCentral);
|
||||
if (successAesCentral)
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral okay" << " ('" << layernameAesCentral << "')";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral okay" << " ('" << layernameAesCentral << "')";
|
||||
else
|
||||
for (int i=0; i<5; ++i)
|
||||
ERROR_LOG() << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral failed" << " ('" << layernameAesCentral << "')";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " assignUniqueValueRendererAesCentral failed" << " ('" << layernameAesCentral << "')";
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AdapterDds::assignUniqueValueRendererAesCentral(const QString &layername)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, layername ='" << layername << "'" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, layername ='" << layername << "'" ;
|
||||
|
||||
QVector<LayerFactory::UniqueValueDataAesCentral::TYPE> typeVec;
|
||||
typeVec << LayerFactory::UniqueValueDataAesCentral::TYPE::CONE;
|
||||
@@ -893,7 +892,7 @@ bool AdapterDds::assignUniqueValueRendererAesCentral(const QString &layername)
|
||||
const PartyIdToColorFunctor::ColorMap &colorMap = m_map->partyIdToColorFunctor().colorMap();
|
||||
if (colorMap.isEmpty())
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " colorMap is empty";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " colorMap is empty";
|
||||
return false;
|
||||
}
|
||||
QVector<QColor> colVec;
|
||||
@@ -904,7 +903,7 @@ bool AdapterDds::assignUniqueValueRendererAesCentral(const QString &layername)
|
||||
|
||||
for (const PartyIdToColorFunctor::PartyData &partyData : std::as_const(colorMap))
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " partyName=" << partyData.m_name << "'" << " partyColor=" << partyData.m_color.name() << "'";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " partyName=" << partyData.m_name << "'" << " partyColor=" << partyData.m_color.name() << "'";
|
||||
colVec << partyData.m_color;
|
||||
|
||||
|
||||
@@ -972,7 +971,7 @@ bool AdapterDds::assignUniqueValueRendererAesCentral(const QString &layername)
|
||||
}
|
||||
}
|
||||
|
||||
INFO_LOG() << Q_FUNC_INFO
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO
|
||||
<< " typeVec.size() = " << typeVec.size()
|
||||
<< " colVec.size() = " << colVec.size() << " (colorMap.size() = " << colorMap.size() << ")"
|
||||
<< " radiuss.size() = " << radiuss.size()
|
||||
@@ -990,27 +989,27 @@ bool AdapterDds::assignUniqueValueRendererAesCentral(const QString &layername)
|
||||
uvCont);
|
||||
}
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END, layername ='" << layername << "'" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, layername ='" << layername << "'" ;
|
||||
return success;
|
||||
}
|
||||
|
||||
bool AdapterDds::assignUniqueValueRendererAesCentral3DExtrusion(const QString &layername)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START, layername ='" << layername << "'" ;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START, layername ='" << layername << "'" ;
|
||||
|
||||
QVector<QColor> colVec;
|
||||
{
|
||||
const PartyIdToColorFunctor::ColorMap &colorMap = m_map->partyIdToColorFunctor().colorMap();
|
||||
if (colorMap.isEmpty())
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " colorMap is empty";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " colorMap is empty";
|
||||
return false;
|
||||
}
|
||||
|
||||
colVec.reserve(colorMap.size());
|
||||
for (const PartyIdToColorFunctor::PartyData &partyData : colorMap)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " partyName=" << partyData.m_name << "'" << " partyColor=" << partyData.m_color.name() << "'";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " partyName=" << partyData.m_name << "'" << " partyColor=" << partyData.m_color.name() << "'";
|
||||
colVec << partyData.m_color
|
||||
<< partyData.m_lightColor;
|
||||
}
|
||||
@@ -1062,18 +1061,18 @@ bool AdapterDds::assignUniqueValueRendererAesCentral3DExtrusion(const QString &l
|
||||
fieldnames,
|
||||
uvCont);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END, layername ='" << layername << "'"
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, layername ='" << layername << "'"
|
||||
<< " success = " << success;
|
||||
return success;
|
||||
}
|
||||
|
||||
bool AdapterDds::run()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (m_isRunning)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " already running" ;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " already running" ;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1129,11 +1128,11 @@ bool AdapterDds::run()
|
||||
m_isRunning = success;
|
||||
|
||||
|
||||
INFO_LOG() << Q_FUNC_INFO << " connect to SymbolDictionary::changed" ;
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " connect to SymbolDictionary::changed" ;
|
||||
connect(&m_map->symbolDictionary(), &AdvancedSymbology::SymbolDictionary::changed,
|
||||
this, &AdapterDds::startChangedDelayTimer, Qt::UniqueConnection);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" ;
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -1144,12 +1143,12 @@ bool AdapterDds::isRunning() const
|
||||
|
||||
bool AdapterDds::stop()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START" ;
|
||||
|
||||
if (m_pluginProvider && !m_pluginProvider->isSessionValid())
|
||||
{
|
||||
m_isRunning = false;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " no session anymore: ignore 'stop' -> return";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " no session anymore: ignore 'stop' -> return";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1195,13 +1194,13 @@ bool AdapterDds::stop()
|
||||
|
||||
m_isRunning = false;
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
void AdapterDds::clearObjects()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
const QList<Sim2SituationMapBase *> &sim2Map = listOfSim2Map();
|
||||
for (Sim2SituationMapBase *item : std::as_const(sim2Map))
|
||||
@@ -1247,23 +1246,23 @@ void AdapterDds::clearObjects()
|
||||
|
||||
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
ResourceManagerMode AdapterDds::resourceManagerMode() const
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
if (!m_mountingPoints)
|
||||
return ResourceManagerMode::Undefined;
|
||||
|
||||
ResourceManagerMode rmm = m_mountingPoints->resourceManagerMode();
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return rmm;
|
||||
}
|
||||
|
||||
bool AdapterDds::setResourceManagerMode(ResourceManagerMode rmm)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
if (!m_mountingPoints)
|
||||
return false;
|
||||
|
||||
@@ -1272,26 +1271,26 @@ bool AdapterDds::setResourceManagerMode(ResourceManagerMode rmm)
|
||||
|
||||
emit resourceManagerModeChanged(m_mountingPoints->resourceManagerMode());
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return success;
|
||||
}
|
||||
|
||||
bool AdapterDds::showExpiredEmergencyCalls(bool bShowExpired)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (!m_emergencyCalls)
|
||||
return false;
|
||||
|
||||
m_emergencyCalls->showExpired(bShowExpired);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool AdapterDds::uniqueMapId2SimId(UniqueMapId uniqueMapIdIn, int32_t &simIdOut)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START"
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"
|
||||
<< " uniqueMapId=" << uniqueMapIdIn;
|
||||
|
||||
if (!SituationMap::isUniqueMapIdValid(uniqueMapIdIn))
|
||||
@@ -1309,7 +1308,7 @@ bool AdapterDds::uniqueMapId2SimId(UniqueMapId uniqueMapIdIn, int32_t &simIdOut)
|
||||
|
||||
bool AdapterDds::unifiedMapObjectData(UniqueMapId uniqueMapIdIn, UnifiedMapObjectData &umodOut) const
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START"
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"
|
||||
<< " uniqueMapId=" << uniqueMapIdIn;
|
||||
|
||||
if (!SituationMap::isUniqueMapIdValid(uniqueMapIdIn))
|
||||
@@ -1332,14 +1331,14 @@ UniqueMapId AdapterDds::simId2UniqueMapIdParticipant(int32_t simId) const
|
||||
}
|
||||
RefPointer<Participant> AdapterDds::simId2Participant(int32_t simId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, simId=" << simId ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, simId=" << simId ;
|
||||
|
||||
UniqueMapId mapId = simId2UniqueMapIdParticipant(simId);
|
||||
if (!isUniqueMapIdValid(mapId))
|
||||
return RefPointer<Participant>();
|
||||
|
||||
RefPointer<Participant> mapObj = m_map->objectFactory().get<Participant>(mapId);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" ;
|
||||
return mapObj;
|
||||
}
|
||||
|
||||
@@ -1355,14 +1354,14 @@ UniqueMapId AdapterDds::simId2UniqueMapIdAes(int32_t simId) const
|
||||
}
|
||||
RefPointer<AbstractMapObject> AdapterDds::simId2Aes(int32_t simId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, simId=" << simId ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, simId=" << simId ;
|
||||
|
||||
UniqueMapId mapId = simId2UniqueMapIdAes(simId);
|
||||
if (!isUniqueMapIdValid(mapId))
|
||||
return RefPointer<AbstractMapObject>();
|
||||
|
||||
RefPointer<AbstractMapObject> mapObj = m_map->objectFactory().get(mapId);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" ;
|
||||
return mapObj;
|
||||
}
|
||||
|
||||
@@ -1375,14 +1374,14 @@ UniqueMapId AdapterDds::simId2UniqueMapIdBuilding(int32_t simId) const
|
||||
}
|
||||
RefPointer<BuildingOutline> AdapterDds::simId2Building(int32_t simId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
|
||||
UniqueMapId mapId = simId2UniqueMapIdBuilding(simId);
|
||||
if (!isUniqueMapIdValid(mapId))
|
||||
return RefPointer<BuildingOutline>();
|
||||
|
||||
RefPointer<BuildingOutline> mapObj = m_map->objectFactory().get<BuildingOutline>(mapId);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" ;
|
||||
return mapObj;
|
||||
}
|
||||
|
||||
@@ -1394,14 +1393,14 @@ UniqueMapId AdapterDds::simId2UniqueMapIdBridge(int32_t simId) const
|
||||
}
|
||||
RefPointer<BuildingOutline> AdapterDds::simId2Bridge(int32_t simId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
|
||||
UniqueMapId mapId = simId2UniqueMapIdBridge(simId);
|
||||
if (!isUniqueMapIdValid(mapId))
|
||||
return RefPointer<BuildingOutline>();
|
||||
|
||||
RefPointer<BuildingOutline> mapObj = m_map->objectFactory().get<BuildingOutline>(mapId);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" ;
|
||||
return mapObj;
|
||||
}
|
||||
|
||||
@@ -1414,14 +1413,14 @@ UniqueMapId AdapterDds::simId2UniqueMapIdMountingPoint(int32_t simId) const
|
||||
|
||||
RefPointer<GeoImage> AdapterDds::simId2MountingPoint(int32_t simId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
|
||||
UniqueMapId mapId = simId2UniqueMapIdMountingPoint(simId);
|
||||
if (!isUniqueMapIdValid(mapId))
|
||||
return RefPointer<GeoImage>();
|
||||
|
||||
RefPointer<GeoImage> mapObj = m_map->objectFactory().get<GeoImage>(mapId);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" ;
|
||||
return mapObj;
|
||||
}
|
||||
|
||||
@@ -1433,14 +1432,14 @@ UniqueMapId AdapterDds::simId2UniqueMapIdGuezIed(int32_t simId) const
|
||||
}
|
||||
RefPointer<Participant> AdapterDds::simId2GuezIed(int32_t simId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
|
||||
UniqueMapId mapId = simId2UniqueMapIdGuezIed(simId);
|
||||
if (!isUniqueMapIdValid(mapId))
|
||||
return RefPointer<Participant>();
|
||||
|
||||
RefPointer<Participant> mapObj = m_map->objectFactory().get<Participant>(mapId);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" ;
|
||||
return mapObj;
|
||||
}
|
||||
|
||||
@@ -1453,14 +1452,14 @@ UniqueMapId AdapterDds::simId2UniqueMapIdChargeEffect(int32_t simId) const
|
||||
|
||||
RefPointer<SingleFire> AdapterDds::simId2ChargeEffect(int32_t simId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
|
||||
UniqueMapId mapId = simId2UniqueMapIdChargeEffect(simId);
|
||||
if (!isUniqueMapIdValid(mapId))
|
||||
return RefPointer<SingleFire>();
|
||||
|
||||
RefPointer<SingleFire> mapObj = m_map->objectFactory().get<SingleFire>(mapId);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" ;
|
||||
return mapObj;
|
||||
}
|
||||
|
||||
@@ -1473,7 +1472,7 @@ UniqueMapId AdapterDds::simId2UniqueMapIdTrainingArea(int32_t simId) const
|
||||
|
||||
RefPointer<Polygon> AdapterDds::simId2TrainingArea(int32_t simId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
|
||||
UniqueMapId mapId = simId2UniqueMapIdTrainingArea(simId);
|
||||
if (!isUniqueMapIdValid(mapId))
|
||||
@@ -1481,7 +1480,7 @@ RefPointer<Polygon> AdapterDds::simId2TrainingArea(int32_t simId)
|
||||
|
||||
using MAP_T = TrainingAreaToSituationMap::MAP_T;
|
||||
RefPointer<MAP_T> mapObj = m_map->objectFactory().get<MAP_T>(mapId);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" ;
|
||||
return mapObj;
|
||||
}
|
||||
|
||||
@@ -1494,7 +1493,7 @@ UniqueMapId AdapterDds::simId2UniqueMapIdSpecialArea(int32_t simId) const
|
||||
|
||||
RefPointer<Polygon> AdapterDds::simId2SpecialArea(int32_t simId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
|
||||
UniqueMapId mapId = simId2UniqueMapIdSpecialArea(simId);
|
||||
if (!isUniqueMapIdValid(mapId))
|
||||
@@ -1502,7 +1501,7 @@ RefPointer<Polygon> AdapterDds::simId2SpecialArea(int32_t simId)
|
||||
|
||||
using MAP_T = SpecialAreaToSituationMap::MAP_T;
|
||||
RefPointer<MAP_T> mapObj = m_map->objectFactory().get<MAP_T>(mapId);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" ;
|
||||
return mapObj;
|
||||
}
|
||||
|
||||
@@ -1515,7 +1514,7 @@ UniqueMapId AdapterDds::simId2UniqueMapIdShootbackArea(int32_t simId) const
|
||||
|
||||
RefPointer<Polygon> AdapterDds::simId2ShootbackArea(int32_t simId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, simId=" << simId;
|
||||
|
||||
UniqueMapId mapId = simId2UniqueMapIdShootbackArea(simId);
|
||||
if (!isUniqueMapIdValid(mapId))
|
||||
@@ -1523,7 +1522,7 @@ RefPointer<Polygon> AdapterDds::simId2ShootbackArea(int32_t simId)
|
||||
|
||||
using MAP_T = ShootbackAreaToSituationMap::MAP_T;
|
||||
RefPointer<MAP_T> mapObj = m_map->objectFactory().get<MAP_T>(mapId);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" ;
|
||||
return mapObj;
|
||||
}
|
||||
|
||||
@@ -1551,7 +1550,7 @@ UniqueMapId AdapterDds::simId2UniqueMapId(MapObjectType mot, int32_t simId) cons
|
||||
case MapObjectType::MOT_Aes:
|
||||
case MapObjectType::MOT_GuezIed:
|
||||
{
|
||||
ERROR_LOG() << " not supported yet!!!";
|
||||
ERROR_LOG(m_logger) << " not supported yet!!!";
|
||||
Q_FALLTHROUGH();
|
||||
}
|
||||
default:
|
||||
@@ -1589,7 +1588,7 @@ QVector<UniqueMapId> AdapterDds::simIds2UniqueMapIds(MapObjectType mot, QVector<
|
||||
case MapObjectType::MOT_Aes:
|
||||
case MapObjectType::MOT_GuezIed:
|
||||
{
|
||||
ERROR_LOG() << " not supported yet!!!";
|
||||
ERROR_LOG(m_logger) << " not supported yet!!!";
|
||||
Q_FALLTHROUGH();
|
||||
}
|
||||
default:
|
||||
@@ -1614,7 +1613,7 @@ RefPointer<AbstractMapObject> AdapterDds::simId2MapObject(MapObjectType mot, int
|
||||
return {};
|
||||
|
||||
RefPointer<AbstractMapObject> mapObj = m_map->objectFactory().get(uniqueMapId);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" ;
|
||||
return mapObj;
|
||||
}
|
||||
|
||||
@@ -1640,7 +1639,7 @@ Sim2SituationMapBase *AdapterDds::situationMapBase(MapObjectType mot) const
|
||||
case MapObjectType::MOT_Building:
|
||||
case MapObjectType::MOT_GuezIed:
|
||||
{
|
||||
ERROR_LOG() << " not supported yet!!!";
|
||||
ERROR_LOG(m_logger) << " not supported yet!!!";
|
||||
Q_FALLTHROUGH();
|
||||
}
|
||||
default:
|
||||
@@ -1778,7 +1777,7 @@ bool AdapterDds::setOwnPositionVisible(bool enable)
|
||||
|
||||
void AdapterDds::onSymbolDictionaryChanged()
|
||||
{
|
||||
INFO_LOG() << Q_FUNC_INFO << " START, workspaceId" << m_pluginProvider->workspaceId();
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " START, workspaceId" << m_pluginProvider->workspaceId();
|
||||
|
||||
if (m_particpants)
|
||||
m_particpants->reRenderObjects();
|
||||
@@ -1798,7 +1797,7 @@ void AdapterDds::onSymbolDictionaryChanged()
|
||||
|
||||
|
||||
|
||||
INFO_LOG() << Q_FUNC_INFO << " END, workspaceId" << m_pluginProvider->workspaceId();
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " END, workspaceId" << m_pluginProvider->workspaceId();
|
||||
}
|
||||
|
||||
|
||||
@@ -1864,7 +1863,7 @@ void AdapterDds::onMapObjectChangedUpdateDrawOrder(UniqueMapId uniqueMapId)
|
||||
RefPointer<AbstractMapObject> mapObj = objFac.get<AbstractMapObject>(curUniqueMapId);
|
||||
if (!mapObj)
|
||||
{
|
||||
WARNING_LOG() << Q_FUNC_INFO << " not found in objFac"
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " not found in objFac"
|
||||
<< " curUniqueMapId = " << curUniqueMapId;
|
||||
return;
|
||||
}
|
||||
@@ -1872,10 +1871,10 @@ void AdapterDds::onMapObjectChangedUpdateDrawOrder(UniqueMapId uniqueMapId)
|
||||
mapObj->setDrawOrder(++drawOrderCounter);
|
||||
if (!mapObj->updateView())
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " debugInfo='" << mapObj->debugInfo() << "'"
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " debugInfo='" << mapObj->debugInfo() << "'"
|
||||
<< " updateView failed";
|
||||
}
|
||||
INFO_LOG() << Q_FUNC_INFO << " debugInfo='" << mapObj->debugInfo() << "'"
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " debugInfo='" << mapObj->debugInfo() << "'"
|
||||
<< " set DrawOder to: " << drawOrderCounter;
|
||||
}
|
||||
}
|
||||
@@ -1889,7 +1888,7 @@ void AdapterDds::onMapObjectRemoved(UniqueMapId uniqueMapId)
|
||||
|
||||
void AdapterDds::onParticipantOwnPositionChanged(const Point3D &newPos, int64_t sampleTime)
|
||||
{
|
||||
DEBUG_LOG() << "Own Position Changed";
|
||||
DEBUG_LOG(m_logger) << "Own Position Changed";
|
||||
|
||||
if(!m_map)
|
||||
return;
|
||||
|
||||
+2
@@ -234,12 +234,14 @@ private slots:
|
||||
void onParticipantOwnPositionChanged(const Point3D &newPos, int64_t sampleTime);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void startChangedDelayTimer();
|
||||
void startOwnPositionOutdatedTimer();
|
||||
QList<Sim2SituationMapBase *> listOfSim2Map() const;
|
||||
QList<Sim2SituationMapBase *> listOfAes2Map() const;
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool m_isShowOwnPosition{true};
|
||||
bool m_isRunning{false};
|
||||
QTimer *m_changedDelayTimer{nullptr};
|
||||
|
||||
+31
-32
@@ -135,22 +135,21 @@ public:
|
||||
|
||||
|
||||
|
||||
BuildingContamination::BuildingContamination(int drawOrder, QObject *parent)
|
||||
: BaseClass(parent)
|
||||
, d(new Private())
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
BuildingContamination::BuildingContamination(int drawOrder, QObject *parent) : BaseClass(parent)
|
||||
, d(new Private()),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
d->m_drawOrder = drawOrder;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
BuildingContamination::~BuildingContamination()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
this->stop();
|
||||
|
||||
delete d;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool BuildingContamination::init(Map *map, PluginProvider *pluginProvider)
|
||||
@@ -178,17 +177,17 @@ void BuildingContamination::removeAllObjects()
|
||||
|
||||
bool BuildingContamination::run()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (!d->m_map)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no m_map";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no m_map";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_bldDtc)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no m_bldDtc";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no m_bldDtc";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -223,7 +222,7 @@ bool BuildingContamination::run()
|
||||
|
||||
RefPointer<Cube> cube = d->getCreateCube(buildingId, floorId);
|
||||
if (!cube)
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no cube created";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no cube created";
|
||||
|
||||
cube->setVisibility(d->m_visible);
|
||||
cube->setDrawOrder(d->m_drawOrder);
|
||||
@@ -234,7 +233,7 @@ bool BuildingContamination::run()
|
||||
cube->setHeight(height);
|
||||
|
||||
bool success = cube->updateView();
|
||||
INFO_LOG() << Q_FUNC_INFO << " cube->updateView " << success;
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " cube->updateView " << success;
|
||||
};
|
||||
|
||||
|
||||
@@ -245,15 +244,15 @@ bool BuildingContamination::run()
|
||||
}
|
||||
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
void BuildingContamination::stop()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_bldDtc->disconnect(this);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool BuildingContamination::isVisible() const
|
||||
@@ -269,7 +268,7 @@ bool BuildingContamination::setVisible(bool visible)
|
||||
|
||||
void BuildingContamination::onBuildingStateChanged(const Buildings::BuildingState &data, DataModification modType)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
const int buildingId = data.id();
|
||||
|
||||
@@ -286,19 +285,19 @@ void BuildingContamination::onBuildingStateChanged(const Buildings::BuildingStat
|
||||
break;
|
||||
|
||||
}
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void BuildingContamination::onResetBuildingState()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
d->removeCube();
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void BuildingContamination::updateBuilding(int buildingId)
|
||||
{
|
||||
DEBUG_LOG() << "update Building " << buildingId;
|
||||
DEBUG_LOG(m_logger) << "update Building " << buildingId;
|
||||
|
||||
const Buildings::BuildingState &bos = m_bldDtc->buildingState(buildingId);
|
||||
|
||||
@@ -307,7 +306,7 @@ void BuildingContamination::updateBuilding(int buildingId)
|
||||
|
||||
const auto contaminations = bos.contaminationStates();
|
||||
|
||||
DEBUG_LOG() << "Statecount " << contaminations.size();
|
||||
DEBUG_LOG(m_logger) << "Statecount " << contaminations.size();
|
||||
|
||||
|
||||
QSet<int> contaminatedFloors;
|
||||
@@ -320,7 +319,7 @@ void BuildingContamination::updateBuilding(int buildingId)
|
||||
rooms.insert(room);
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "contaminated rooms " << rooms.size();
|
||||
DEBUG_LOG(m_logger) << "contaminated rooms " << rooms.size();
|
||||
|
||||
for (int room : rooms)
|
||||
{
|
||||
@@ -331,7 +330,7 @@ void BuildingContamination::updateBuilding(int buildingId)
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "contaminated floors " << contaminatedFloors.size();
|
||||
DEBUG_LOG(m_logger) << "contaminated floors " << contaminatedFloors.size();
|
||||
|
||||
|
||||
|
||||
@@ -357,7 +356,7 @@ void BuildingContamination::updateBuilding(int buildingId)
|
||||
|
||||
const bool isContaminaed = contaminatedFloors.contains(floorId);
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO
|
||||
<< " floorId=" << floorId
|
||||
<< " height=" << height
|
||||
<< " partyId=" << isContaminaed;
|
||||
@@ -383,7 +382,7 @@ void BuildingContamination::updateBuilding(int buildingId)
|
||||
cube->setHeight(height);
|
||||
|
||||
if (!cube->updateView())
|
||||
ERROR_LOG() << Q_FUNC_INFO << " cube->updateView() failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " cube->updateView() failed";
|
||||
|
||||
}
|
||||
|
||||
@@ -409,7 +408,7 @@ int BuildingContamination::findFloorIdByRoomId(int roomId) noexcept(false)
|
||||
InfrastructureManagement::StructureElement roomSe;
|
||||
if (!m_ismDtc->getStructureElementById(roomId, roomSe))
|
||||
{
|
||||
ERROR_LOG() << "getStructureElementById roomId=" << roomId << " not found";
|
||||
ERROR_LOG(m_logger) << "getStructureElementById roomId=" << roomId << " not found";
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -457,12 +456,12 @@ bool BuildingContamination::getRoom(int roomSeId, InfrastructureManagement::Stru
|
||||
|
||||
PositionCont BuildingContamination::retrieveBuildingGeometry(int buildingId, int floorId) const
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START"
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"
|
||||
<< " buildingId=" << buildingId
|
||||
<< " floorId=" << floorId;
|
||||
if (!m_ismDtc)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no m_ismDtc";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no m_ismDtc";
|
||||
return PositionCont();
|
||||
}
|
||||
|
||||
@@ -474,7 +473,7 @@ PositionCont BuildingContamination::retrieveBuildingGeometry(int buildingId, int
|
||||
{
|
||||
const InfrastructureManagement::MainFootprint &mainFootprint = m_ismDtc->mainFootprint(buildingId);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START"
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"
|
||||
<< " mainFootprint.elements().size()=" << mainFootprint.elements().size();
|
||||
|
||||
relPositions.reserve(mainFootprint.elements().size());
|
||||
@@ -581,7 +580,7 @@ PositionCont BuildingContamination::retrieveBuildingGeometry(int buildingId, int
|
||||
const Esri::ArcGISRuntime::ImmutablePointCollection &pointCollection = immutablePart.points();
|
||||
const int size = pointCollection.size();
|
||||
|
||||
INFO_LOG() << " pointCollection.size = " << pointCollection.size()
|
||||
INFO_LOG(m_logger) << " pointCollection.size = " << pointCollection.size()
|
||||
<< " - buildingId = " << buildingId
|
||||
<< ", mse.name = " << mse.name();
|
||||
|
||||
@@ -597,7 +596,7 @@ PositionCont BuildingContamination::retrieveBuildingGeometry(int buildingId, int
|
||||
}
|
||||
#endif
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return absPositionsGeo;
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -56,6 +56,7 @@ protected Q_SLOTS:
|
||||
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void updateBuilding(int buildingId);
|
||||
int findFloorIdByRoomId(int roomId);
|
||||
bool getRoom(int roomSeId, InfrastructureManagement::StructureElement &roomSe);
|
||||
|
||||
+25
-26
@@ -211,22 +211,21 @@ public:
|
||||
|
||||
|
||||
|
||||
BuildingOwnership::BuildingOwnership(int drawOrder, QObject *parent)
|
||||
: BaseClass(parent)
|
||||
, d(new Private())
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
BuildingOwnership::BuildingOwnership(int drawOrder, QObject *parent) : BaseClass(parent)
|
||||
, d(new Private()),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
d->m_drawOrder = drawOrder;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
BuildingOwnership::~BuildingOwnership()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
this->stop();
|
||||
|
||||
delete d;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool BuildingOwnership::init(Map *map, PluginProvider *pluginProvider)
|
||||
@@ -256,17 +255,17 @@ void BuildingOwnership::removeAllObjects()
|
||||
|
||||
bool BuildingOwnership::run()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (!d->m_map)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no m_map";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no m_map";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_cesDtc)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no m_cesDtc";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no m_cesDtc";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -301,7 +300,7 @@ bool BuildingOwnership::run()
|
||||
|
||||
RefPointer<Cube> cube = d->getCreateCube(buildingId, floorId);
|
||||
if (!cube)
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no cube created";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no cube created";
|
||||
|
||||
cube->setVisibility(d->m_visible);
|
||||
cube->setDrawOrder(d->m_drawOrder);
|
||||
@@ -312,7 +311,7 @@ bool BuildingOwnership::run()
|
||||
cube->setHeight(height);
|
||||
|
||||
bool success = cube->updateView();
|
||||
INFO_LOG() << Q_FUNC_INFO << " cube->updateView " << success;
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " cube->updateView " << success;
|
||||
};
|
||||
|
||||
|
||||
@@ -323,15 +322,15 @@ bool BuildingOwnership::run()
|
||||
}
|
||||
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
void BuildingOwnership::stop()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_cesDtc->disconnect(this);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool BuildingOwnership::isVisible() const
|
||||
@@ -347,7 +346,7 @@ bool BuildingOwnership::setVisible(bool visible)
|
||||
|
||||
void BuildingOwnership::onBuildingOwnershipChanged(const CentralEffectSimulation::BuildingOwnership &data, DataModification modType)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
const int buildingId = data.buildingId();
|
||||
|
||||
@@ -364,14 +363,14 @@ void BuildingOwnership::onBuildingOwnershipChanged(const CentralEffectSimulation
|
||||
break;
|
||||
|
||||
}
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void BuildingOwnership::onResetBuildingOwnership()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
d->removeCube();
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void BuildingOwnership::updateBuilding(int buildingId)
|
||||
@@ -416,7 +415,7 @@ void BuildingOwnership::updateBuilding(int buildingId)
|
||||
|
||||
const int partyId = floor2Party.value(floorId, -1);
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO
|
||||
<< " floorId=" << floorId
|
||||
<< " height=" << height
|
||||
<< " partyId=" << partyId;
|
||||
@@ -436,7 +435,7 @@ void BuildingOwnership::updateBuilding(int buildingId)
|
||||
cube->setHeight(height);
|
||||
|
||||
if (!cube->updateView())
|
||||
ERROR_LOG() << Q_FUNC_INFO << " cube->updateView() failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " cube->updateView() failed";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -447,12 +446,12 @@ PositionCont BuildingOwnership::retrieveBuildingGeometry(int buildingId, int flo
|
||||
|
||||
PositionCont BuildingOwnership::retrieveBuildingGeometryInternal(int buildingId, int floorId) const
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START"
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"
|
||||
<< " buildingId=" << buildingId
|
||||
<< " floorId=" << floorId;
|
||||
if (!m_ismDtc)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no m_ismDtc";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no m_ismDtc";
|
||||
return PositionCont();
|
||||
}
|
||||
|
||||
@@ -464,7 +463,7 @@ PositionCont BuildingOwnership::retrieveBuildingGeometryInternal(int buildingId,
|
||||
{
|
||||
const InfrastructureManagement::MainFootprint &mainFootprint = m_ismDtc->mainFootprint(buildingId);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START"
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"
|
||||
<< " mainFootprint.elements().size()=" << mainFootprint.elements().size();
|
||||
|
||||
relPositions.reserve(mainFootprint.elements().size());
|
||||
@@ -588,7 +587,7 @@ PositionCont BuildingOwnership::retrieveBuildingGeometryInternal(int buildingId,
|
||||
}
|
||||
#endif
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return absPositionsGeo;
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -56,6 +56,7 @@ protected Q_SLOTS:
|
||||
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
friend class BuildingGeometryCache;
|
||||
void updateBuilding(int buildingId);
|
||||
PositionCont retrieveBuildingGeometry(int buildingId, int floorId) const;
|
||||
|
||||
+22
-22
@@ -33,10 +33,10 @@ bool DusMineStateProxy::init(PluginProvider *pluginProvider)
|
||||
|
||||
bool DusMineStateProxy::run()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
if (!m_aesDtc)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no dtc";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no dtc";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -59,9 +59,9 @@ bool DusMineStateProxy::run()
|
||||
|
||||
void DusMineStateProxy::stop()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
this->disconnect();
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool DusMineStateProxy::dusMineStateAndPositionDatas(const std::function<void (const DusMineStateAndPositionData &)> &cb)
|
||||
@@ -94,7 +94,7 @@ bool DusMineStateProxy::handleChanged(const AreaEffectSimulation::DusMineState &
|
||||
if (ddsData.id() != 0)
|
||||
return false;
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, ddsData.id()=" << ddsData.id()
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, ddsData.id()=" << ddsData.id()
|
||||
<< " ddsData.mines().size() = " << ddsData.mines().size();
|
||||
|
||||
if (modType == DataModification::eRemoved)
|
||||
@@ -112,7 +112,7 @@ bool DusMineStateProxy::handleChanged(const AreaEffectSimulation::AesItemView &d
|
||||
if (ddsData.id() != AreaEffectSimulation::AesType::AtMineAreaSingleMines)
|
||||
return false;
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, ddsData.id()=" << ddsData.id()
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, ddsData.id()=" << ddsData.id()
|
||||
<< " ddsData.form().size() = " << ddsData.form().size();
|
||||
|
||||
if (modType == DataModification::eRemoved)
|
||||
@@ -158,14 +158,14 @@ bool DusMineStateProxy::publishNewMap()
|
||||
|
||||
m_map = mapContVeryNew;
|
||||
|
||||
DEBUG_LOG() << "Publishing new dus-mine map to situationMap adapter";
|
||||
DEBUG_LOG(m_logger) << "Publishing new dus-mine map to situationMap adapter";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const QMap<int32_t, DusMineStateAndPositionData> DusMineStateProxy::getFromDds()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, ddsData.id()=" << m_lastDusMineState.id()
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, ddsData.id()=" << m_lastDusMineState.id()
|
||||
<< " ddsData.mines().size() = " << m_lastDusMineState.mines().size();
|
||||
|
||||
QMap<int32_t, DusMineStateAndPositionData> mapCont;
|
||||
@@ -178,7 +178,7 @@ const QMap<int32_t, DusMineStateAndPositionData> DusMineStateProxy::getFromDds()
|
||||
int idx = 0;
|
||||
for (const AreaEffectSimulation::DusMine &mine : mines)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO
|
||||
<< " idx=" << idx++
|
||||
<< ", eqId=" << mine.eqId()
|
||||
<< ", chargeTypeId=" << mine.chargeTypeId();
|
||||
@@ -188,14 +188,14 @@ const QMap<int32_t, DusMineStateAndPositionData> DusMineStateProxy::getFromDds()
|
||||
|
||||
if (size != m_lastItemView.form().size())
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " ddsData.id()=" << m_lastDusMineState.id()
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " ddsData.id()=" << m_lastDusMineState.id()
|
||||
<< " size does not match"
|
||||
<< " ddsData.mines().size() = " << mines.size()
|
||||
<< " itemView.form().size() = " << m_lastItemView.form().size();
|
||||
return mapCont;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " ddsData.id()=" << m_lastDusMineState.id()
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " ddsData.id()=" << m_lastDusMineState.id()
|
||||
<< " size ::"
|
||||
<< " ddsData.mines().size() = " << mines.size()
|
||||
<< " itemView.form().size() = " << m_lastItemView.form().size();
|
||||
@@ -211,7 +211,7 @@ const QMap<int32_t, DusMineStateAndPositionData> DusMineStateProxy::getFromDds()
|
||||
pos
|
||||
);
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " i=" << i << ", id/eqId=" << dusMine.eqId() << ", pos=" << pos;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " i=" << i << ", id/eqId=" << dusMine.eqId() << ", pos=" << pos;
|
||||
|
||||
mapCont.insert(dusMine.eqId(), dmsDdsData);
|
||||
}
|
||||
@@ -248,7 +248,7 @@ bool MineAreaNull2SituationMap::init(PluginProvider *pluginProvider)
|
||||
{
|
||||
m_dusMineStateProxy = new DusMineStateProxy(this);
|
||||
if (!m_dusMineStateProxy->init(pluginProvider))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " init failed for DusMineStateProxy";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " init failed for DusMineStateProxy";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -256,11 +256,11 @@ bool MineAreaNull2SituationMap::init(PluginProvider *pluginProvider)
|
||||
|
||||
bool MineAreaNull2SituationMap::run()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (!m_dusMineStateProxy)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no DusMineStateProxy";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no DusMineStateProxy";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ bool MineAreaNull2SituationMap::run()
|
||||
handleChanged(data, DataModification::eAdded);
|
||||
});
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -330,10 +330,10 @@ bool MineAreaNull2SituationMap::unifiedMapObjectData(UniqueMapId uniqueMapId, Un
|
||||
|
||||
bool MineAreaNull2SituationMap::updateVisibility(const Aes2SituationMap::DDS_TYPE &ddsData, RefPointer<Aes2SituationMap::MAP_TYPE> mapObj)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, simId=" << getSimId(ddsData);
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, simId=" << getSimId(ddsData);
|
||||
if (!BaseClass::updateVisibility(ddsData, mapObj))
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " BaseClass::updateVisibility failed, simId=" << getSimId(ddsData);
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " BaseClass::updateVisibility failed, simId=" << getSimId(ddsData);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -350,9 +350,9 @@ bool MineAreaNull2SituationMap::updateVisibility(const Aes2SituationMap::DDS_TYP
|
||||
}
|
||||
|
||||
if (bUpdateView && !mapObj->updateView())
|
||||
ERROR_LOG()<< Q_FUNC_INFO << " simId = " << getSimId(ddsData) << " XXXX updateView failed";
|
||||
ERROR_LOG(m_logger)<< Q_FUNC_INFO << " simId = " << getSimId(ddsData) << " XXXX updateView failed";
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ void MineAreaNull2SituationMap::onAesDisplayFilterChanged(AreaEffectSimulation::
|
||||
bool MineAreaNull2SituationMap::updateElementImpl(const Sim2SituationMap::DDS_T &ddsData,
|
||||
RefPointer<MAP_T> mapObj)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
|
||||
mapObj->setVisibility(ObjectAppearance::Tactical, false);
|
||||
@@ -413,7 +413,7 @@ bool MineAreaNull2SituationMap::updateElementImpl(const Sim2SituationMap::DDS_T
|
||||
mapObj->setTextModifier(Participant::TextModifier::M_HigherFormation, QString::number(simId_eqId));
|
||||
|
||||
updateVisibility(ddsData, mapObj);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -69,6 +69,8 @@ public:
|
||||
Core::GeoPosition2D position() const { return m_form_param; }
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
int32_t m_id_param;
|
||||
AreaEffectSimulation::ChargeStruct m_chargeStruct;
|
||||
Core::GeoPosition2D m_form_param;
|
||||
|
||||
+3
-4
@@ -25,9 +25,8 @@ QString toString(SpecialChargeType value)
|
||||
return QStringLiteral("SpecialChargeTypeERROR");
|
||||
}
|
||||
|
||||
PdmHandler::PdmHandler(const std::shared_ptr<ProjectDataManagement::Interface::Dtc> &dtcPdm)
|
||||
: m_dtcPdm(dtcPdm)
|
||||
{}
|
||||
PdmHandler::PdmHandler(const std::shared_ptr<ProjectDataManagement::Interface::Dtc> &dtcPdm) : m_dtcPdm(dtcPdm),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {}
|
||||
|
||||
|
||||
void PdmHandler::initializePdm()
|
||||
@@ -85,7 +84,7 @@ ProjectDataManagement::ChargeType PdmHandler::chargeTypeFromId(int chargeTypeId)
|
||||
auto it = m_chargeTypes.constFind(chargeTypeId);
|
||||
if (it == m_chargeTypes.cend())
|
||||
{
|
||||
WARNING_LOG() << "Could not find charge type with id " << chargeTypeId;
|
||||
WARNING_LOG(m_logger) << "Could not find charge type with id " << chargeTypeId;
|
||||
return ProjectDataManagement::ChargeType();
|
||||
}
|
||||
return it.value();
|
||||
|
||||
+2
@@ -67,11 +67,13 @@ public:
|
||||
QVector<ProjectDataManagement::CasEffect> casEffects(const AreaEffectSimulation::ChargeStruct &chargeStruct);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void initializePdm();
|
||||
void onChargeTypeChanged(const ProjectDataManagement::ChargeType &data, DataModification mod);
|
||||
void onGearTypeChargeTypeChanged(const ProjectDataManagement::GearTypeChargeType &data, DataModification mod);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_dtcPdm;
|
||||
QMap<int, ProjectDataManagement::ChargeType> m_chargeTypes;
|
||||
QMap<int, ProjectDataManagement::GearTypeChargeType> m_gearTypeChargeTypes;
|
||||
|
||||
+19
-19
@@ -161,7 +161,7 @@ public:
|
||||
mapObj->updateView();
|
||||
|
||||
if (!mapObj->updateView())
|
||||
ERROR_LOG() << Q_FUNC_INFO << " updateElement failed, "
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " updateElement failed, "
|
||||
<< " uniqueMapId = " << uniqueMapId
|
||||
<< " debugInfo='" << mapObj->debugInfo() << "'";
|
||||
}
|
||||
@@ -265,7 +265,7 @@ protected:
|
||||
|
||||
virtual bool createElement(const DDS_T &ddsData)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START"
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"
|
||||
<< " simId = " << getSimId(ddsData);
|
||||
|
||||
const int32_t simId = getSimId(ddsData);
|
||||
@@ -273,7 +273,7 @@ protected:
|
||||
|
||||
if (m_simId2UniqueMapId.contains(simId))
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " mapObject already exists"
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " mapObject already exists"
|
||||
<< " simId = " << simId;
|
||||
return true;
|
||||
}
|
||||
@@ -283,7 +283,7 @@ protected:
|
||||
RefPointer<MAP_T> mapObj = m_objFac.create<MAP_T>(layername, debugInfo);
|
||||
if (!mapObj)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " creation failed"
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " creation failed"
|
||||
<< " simId = " << simId;
|
||||
return false;
|
||||
}
|
||||
@@ -297,14 +297,14 @@ protected:
|
||||
const UniqueMapId uniqueMapId = mapObj->uniqueMapId();
|
||||
if (!isUniqueMapIdValid(uniqueMapId))
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " uniqueMapId invalid"
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " uniqueMapId invalid"
|
||||
<< " simId = " << simId;
|
||||
return false;
|
||||
}
|
||||
m_simId2UniqueMapId[simId] = uniqueMapId;
|
||||
m_uniqueMapId2SimId[uniqueMapId] = simId;
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " END";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ protected:
|
||||
|
||||
bool updateElement(const DDS_T &ddsData)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START"
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START"
|
||||
<< " simId = " << getSimId(ddsData);
|
||||
const int32_t simId = getSimId(ddsData);
|
||||
|
||||
@@ -320,14 +320,14 @@ protected:
|
||||
const UniqueMapId uniqueMapId = m_simId2UniqueMapId.value(simId, INVALID_MAP_ID);
|
||||
if (!isUniqueMapIdValid(uniqueMapId))
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " not found" << " simId = " << simId;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " not found" << " simId = " << simId;
|
||||
return false;
|
||||
}
|
||||
|
||||
RefPointer<MAP_T> mapObj = m_objFac.get<MAP_T>(uniqueMapId);
|
||||
if (!mapObj)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " not found in objFac"
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " not found in objFac"
|
||||
<< " simId = " << simId
|
||||
<< " uniqueMapId = " << uniqueMapId;
|
||||
return false;
|
||||
@@ -336,7 +336,7 @@ protected:
|
||||
bool success = updateElementImpl(ddsData, mapObj);
|
||||
if (!success)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " updateElementImpl failed, "
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " updateElementImpl failed, "
|
||||
<< " simId = " << getSimId(ddsData);
|
||||
return false;
|
||||
}
|
||||
@@ -347,7 +347,7 @@ protected:
|
||||
|
||||
if (!mapObj->updateView())
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " updateElement failed, "
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " updateElement failed, "
|
||||
<< " simId = " << getSimId(ddsData);
|
||||
return false;
|
||||
}
|
||||
@@ -355,26 +355,26 @@ protected:
|
||||
|
||||
emit mapObjectChanged(uniqueMapId);
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " END";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
bool removeElement(const DDS_T &ddsData)
|
||||
{
|
||||
const int32_t simId = getSimId(ddsData);
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START" << " simId = " << simId;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START" << " simId = " << simId;
|
||||
return removeElement(simId);
|
||||
}
|
||||
|
||||
virtual bool removeElement(const int32_t simId)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START" << " simId = " << simId;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START" << " simId = " << simId;
|
||||
|
||||
|
||||
const UniqueMapId uniqueMapId = m_simId2UniqueMapId.value(simId, INVALID_MAP_ID);
|
||||
if (!isUniqueMapIdValid(uniqueMapId))
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " not found"
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " not found"
|
||||
<< ", simId = " << simId;
|
||||
return false;
|
||||
}
|
||||
@@ -388,12 +388,12 @@ protected:
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " not found in objFac"
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " not found in objFac"
|
||||
<< " simId = " << simId
|
||||
<< " uniqueMapId = " << uniqueMapId;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " END";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
|
||||
|
||||
emit mapObjectRemoved(uniqueMapId);
|
||||
@@ -422,7 +422,7 @@ protected:
|
||||
|
||||
bool handleChanged(const DDS_T &ddsData, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START"
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START"
|
||||
<< " modType = " << modType
|
||||
<< " simId = " << getSimId(ddsData);
|
||||
|
||||
@@ -445,7 +445,7 @@ protected:
|
||||
success = this->removeElement(ddsData);
|
||||
break;
|
||||
}
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " END";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
+10
-11
@@ -86,11 +86,10 @@ void ConfigureSingleMapUrl::onClose()
|
||||
|
||||
|
||||
|
||||
ConfigureMapUrlsWidget::ConfigureMapUrlsWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, m_ui(new Ui::Configure_Urls_Widget)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
ConfigureMapUrlsWidget::ConfigureMapUrlsWidget(QWidget *parent) : QWidget(parent)
|
||||
, m_ui(new Ui::Configure_Urls_Widget),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_ui->setupUi(this);
|
||||
|
||||
connect(m_ui->pbUp, &QPushButton::clicked, this, &ConfigureMapUrlsWidget::onUpClicked);
|
||||
@@ -99,14 +98,14 @@ ConfigureMapUrlsWidget::ConfigureMapUrlsWidget(QWidget *parent)
|
||||
connect(m_ui->pbModify, &QPushButton::clicked, this, &ConfigureMapUrlsWidget::onModfiyClicked);
|
||||
connect(m_ui->pbRemove, &QPushButton::clicked, this, &ConfigureMapUrlsWidget::onRemoveClicked);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
ConfigureMapUrlsWidget::~ConfigureMapUrlsWidget()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
delete m_ui;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void ConfigureMapUrlsWidget::setModel(ConfigureMapUrlModel *model)
|
||||
@@ -171,7 +170,7 @@ void ConfigureMapUrlsWidget::onAddClicked()
|
||||
}
|
||||
void ConfigureMapUrlsWidget::addSingleUrl()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (!m_configureMapUrlModel)
|
||||
return;
|
||||
@@ -200,7 +199,7 @@ void ConfigureMapUrlsWidget::onModfiyClicked()
|
||||
}
|
||||
void ConfigureMapUrlsWidget::modifySingleUrl()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (!m_configureMapUrlModel)
|
||||
return;
|
||||
@@ -214,7 +213,7 @@ void ConfigureMapUrlsWidget::modifySingleUrl()
|
||||
|
||||
void ConfigureMapUrlsWidget::onRemoveClicked()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
int currentRow = m_ui->tvLayer->currentIndex().row();
|
||||
m_configureMapUrlModel->removeRow(currentRow);
|
||||
|
||||
+2
@@ -60,6 +60,8 @@ protected Q_SLOTS:
|
||||
void onClose();
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
Ui::Configure_Single_Url *m_ui;
|
||||
LtsWidgets::LtsDialogButtonBox *m_buttonBox;
|
||||
};
|
||||
|
||||
+38
-38
@@ -22,7 +22,7 @@ ConfigureMapUrls::ConfigureMapUrls(QWidget *parent)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_ui(new Ui::Configure_Urls)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
m_ui->setupUi(this);
|
||||
|
||||
@@ -56,24 +56,24 @@ ConfigureMapUrls::ConfigureMapUrls(QWidget *parent)
|
||||
|
||||
setOnlineHelpFilename(QStringLiteral("Configuration_of_Modells_SLPKs"));
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
ConfigureMapUrls::~ConfigureMapUrls()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
delete m_ui;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool ConfigureMapUrls::init(PluginProvider *pluginProvider)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_pluginProvider = pluginProvider;
|
||||
|
||||
if (!m_pluginProvider)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no pluginProvider";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no pluginProvider";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -81,14 +81,14 @@ bool ConfigureMapUrls::init(PluginProvider *pluginProvider)
|
||||
m_asmDtc = m_pluginProvider->asmDtc();
|
||||
if (!m_asmDtc)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Can not retrieve AssetManagement::DTC";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " Can not retrieve AssetManagement::DTC";
|
||||
bRet = false;
|
||||
}
|
||||
|
||||
m_asmFtc = m_pluginProvider->asmFtc();
|
||||
if (!m_asmFtc)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Can not retrieve AssetManagement::FTC";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " Can not retrieve AssetManagement::FTC";
|
||||
bRet = false;
|
||||
}
|
||||
|
||||
@@ -100,16 +100,16 @@ bool ConfigureMapUrls::init(PluginProvider *pluginProvider)
|
||||
fillTrainingAreaCbx();
|
||||
syncTaToGui();
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return bRet;
|
||||
}
|
||||
|
||||
void ConfigureMapUrls::fillTrainingAreaCbx()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
if (!m_asmDtc)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no dtc";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no dtc";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -135,18 +135,18 @@ void ConfigureMapUrls::fillTrainingAreaCbx()
|
||||
const int newTrainingAreaId = m_ui->cbTrainingArea->currentData().toInt();
|
||||
if (!retrieveTaOfService(newTrainingAreaId))
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " retrieveTrainingAreaOfService failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " retrieveTrainingAreaOfService failed";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void ConfigureMapUrls::onSelectedTrainingAreaChanged(const QString & )
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
const int newTrainingAreaId = m_ui->cbTrainingArea->currentData().toInt();
|
||||
if (m_trainingArea.id() == newTrainingAreaId)
|
||||
return;
|
||||
@@ -159,23 +159,23 @@ void ConfigureMapUrls::onSelectedTrainingAreaChanged(const QString & )
|
||||
apply();
|
||||
if (!retrieveTaOfService(newTrainingAreaId))
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " retrieveTrainingAreaOfService failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " retrieveTrainingAreaOfService failed";
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case LtsWidgets::Button::Cancel:
|
||||
INFO_LOG() << Q_FUNC_INFO << " set back to m_trainingArea.id() = " << m_trainingArea.id();
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " set back to m_trainingArea.id() = " << m_trainingArea.id();
|
||||
m_ui->cbTrainingArea->setCurrentIndex(m_ui->cbTrainingArea->findData(QVariant(m_trainingArea.id()), Qt::UserRole));
|
||||
break;
|
||||
case LtsWidgets::Button::Discard:
|
||||
if (!retrieveTaOfService(newTrainingAreaId))
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " retrieveTrainingAreaOfService failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " retrieveTrainingAreaOfService failed";
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG() << Q_FUNC_INFO << " got unexpected!!!";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " got unexpected!!!";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -183,22 +183,22 @@ void ConfigureMapUrls::onSelectedTrainingAreaChanged(const QString & )
|
||||
{
|
||||
if (!retrieveTaOfService(newTrainingAreaId))
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " retrieveTrainingAreaOfService failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " retrieveTrainingAreaOfService failed";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
syncTaToGui();
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool ConfigureMapUrls::retrieveTaOfService(int trainingAreaId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, trainingAreaId=" << trainingAreaId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, trainingAreaId=" << trainingAreaId;
|
||||
|
||||
if (!m_asmDtc)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no dtc";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no dtc";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -210,14 +210,14 @@ bool ConfigureMapUrls::retrieveTaOfService(int trainingAreaId)
|
||||
AssetManagement::TrainingArea ta = m_asmDtc->trainingArea(trainingAreaId);
|
||||
if (ta.id() != trainingAreaId)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " switch to m_trainingArea failed (taId=" << trainingAreaId << ")";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " switch to m_trainingArea failed (taId=" << trainingAreaId << ")";
|
||||
return false;
|
||||
}
|
||||
m_trainingArea = ta;
|
||||
INFO_LOG() << Q_FUNC_INFO << " switch to m_trainingArea " << m_trainingArea.id()
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " switch to m_trainingArea " << m_trainingArea.id()
|
||||
<< ", ta" << ta;
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ void basicConfig(ConfigureMapUrlsWidget *tv, bool showTypeMinMax = true)
|
||||
|
||||
void ConfigureMapUrls::syncTaToGui()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
ConfigureMapUrlsWidget *w;
|
||||
|
||||
@@ -259,7 +259,7 @@ void ConfigureMapUrls::syncTaToGui()
|
||||
if (w && w->model())
|
||||
{
|
||||
w->model()->setData(vecToVec(m_trainingArea.map2D()));
|
||||
TRACE_LOG() << Q_FUNC_INFO << " model->rowCount()" << w->model()->rowCount();
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " model->rowCount()" << w->model()->rowCount();
|
||||
}
|
||||
basicConfig(w);
|
||||
|
||||
@@ -274,7 +274,7 @@ void ConfigureMapUrls::syncTaToGui()
|
||||
if (w && w->model())
|
||||
{
|
||||
w->model()->setData(vecToVec(m_trainingArea.scene3D()));
|
||||
TRACE_LOG() << Q_FUNC_INFO << " model->rowCount()" << w->model()->rowCount();
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " model->rowCount()" << w->model()->rowCount();
|
||||
}
|
||||
basicConfig(w);
|
||||
|
||||
@@ -288,12 +288,12 @@ void ConfigureMapUrls::syncTaToGui()
|
||||
w->model()->setData(vecToVec(m_trainingArea.sceneObjects()));
|
||||
basicConfig(w, false);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void ConfigureMapUrls::syncGuiToTa()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
ConfigureMapUrlsWidget *w;
|
||||
|
||||
@@ -326,7 +326,7 @@ void ConfigureMapUrls::syncGuiToTa()
|
||||
item.mapDescriptionTypeId(AssetManagement::MapDescriptionType_def::SceneObj);
|
||||
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void ConfigureMapUrls::retranslate()
|
||||
@@ -337,11 +337,11 @@ void ConfigureMapUrls::retranslate()
|
||||
|
||||
bool ConfigureMapUrls::apply()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (!m_asmFtc)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Can not retrieve AssetManagement::FTC";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " Can not retrieve AssetManagement::FTC";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -352,24 +352,24 @@ bool ConfigureMapUrls::apply()
|
||||
return m_asmFtc->trainingAreaModifyRequest(m_trainingArea, this);
|
||||
});
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END, scucess=" << success;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, scucess=" << success;
|
||||
return success;
|
||||
}
|
||||
|
||||
void ConfigureMapUrls::onTrainingAreaModifyReply(const Core::FunctionReplyObject &reply)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (reply.error())
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << "Got onTrainingAreaModifyReply error: " << reply();
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << "Got onTrainingAreaModifyReply error: " << reply();
|
||||
return;
|
||||
}
|
||||
INFO_LOG() << Q_FUNC_INFO << " Got onTrainingAreaModifyReply with id " << reply.id();
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " Got onTrainingAreaModifyReply with id " << reply.id();
|
||||
|
||||
m_requestHelper->requestReply(reply);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
@@ -46,6 +46,8 @@ public:
|
||||
bool init(PluginProvider *pluginProvider);
|
||||
|
||||
protected:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void fillTrainingAreaCbx();
|
||||
bool retrieveTaOfService(int trainingAreaId);
|
||||
void syncTaToGui();
|
||||
|
||||
+5
-5
@@ -99,14 +99,14 @@ MapObjectModel::MapObjectModel(QObject *parent)
|
||||
},
|
||||
parent)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
MapObjectModel::~MapObjectModel()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void MapObjectModel::initModel(Map *map)
|
||||
@@ -441,7 +441,7 @@ UniqueMapId MapObjectModel::uniqueMapIdOfIndex(const QModelIndex &index) const
|
||||
|
||||
void MapObjectModel::onDataChanged(UniqueMapId uniqueMapId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, uniqueMapId=" << uniqueMapId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, uniqueMapId=" << uniqueMapId;
|
||||
|
||||
|
||||
int row = findRowForUniqueMapId(uniqueMapId);
|
||||
|
||||
+2
@@ -168,9 +168,11 @@ public:
|
||||
void setSourceModel(QAbstractItemModel *sourceModel) override;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const override;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
MapObjectModel *m_sourceModel = nullptr;
|
||||
};
|
||||
|
||||
|
||||
+23
-24
@@ -306,40 +306,39 @@ void MapObjectSelectionLtsDialog::onServiceMonitorRequestedAdd()
|
||||
|
||||
|
||||
|
||||
MapObjectSelectionWidget::MapObjectSelectionWidget(QWidget *parent)
|
||||
: BaseClass(parent)
|
||||
, m_ui(new Ui::MapObjectSelectionDialog)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
MapObjectSelectionWidget::MapObjectSelectionWidget(QWidget *parent) : BaseClass(parent)
|
||||
, m_ui(new Ui::MapObjectSelectionDialog),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_ui->setupUi(this);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
MapObjectSelectionWidget::~MapObjectSelectionWidget()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
|
||||
clearSelectionOfMapObjects(true);
|
||||
|
||||
|
||||
delete m_ui;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool MapObjectSelectionWidget::init(Map *map, AdapterDds *adapterDds)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (!map)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no map";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no map";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!adapterDds)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no adapterDds";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no adapterDds";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -351,7 +350,7 @@ bool MapObjectSelectionWidget::init(Map *map, AdapterDds *adapterDds)
|
||||
connect(&m_map->partyIdToColorFunctor(), &PartyIdToColorFunctor::partyChanged,
|
||||
this, &MapObjectSelectionWidget::onPartyIdsChanged, Qt::UniqueConnection);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -417,11 +416,11 @@ void MapObjectSelectionWidget::setMapObjectsToDisplay(const Map::RefPointerMapOb
|
||||
|
||||
void MapObjectSelectionWidget::setMapObjectsToDisplay(const QVector<UniqueMapId> &uniqueMapIds)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, uniqueMapIds.size()=" << uniqueMapIds.size();
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, uniqueMapIds.size()=" << uniqueMapIds.size();
|
||||
|
||||
if (m_map.isNull())
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no map";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no map";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -481,7 +480,7 @@ void MapObjectSelectionWidget::setMapObjectsToDisplay(const QVector<UniqueMapId>
|
||||
if (m_adapterDds->unifiedMapObjectData(uniqueMapId, umodOut))
|
||||
mapObjectDataVec.append(dataFromUnified(uniqueMapId, umodOut));
|
||||
else
|
||||
ERROR_LOG() << Q_FUNC_INFO << " unifiedMapObjectData failed, uniqueMapId=" << uniqueMapId;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " unifiedMapObjectData failed, uniqueMapId=" << uniqueMapId;
|
||||
|
||||
}
|
||||
|
||||
@@ -491,7 +490,7 @@ void MapObjectSelectionWidget::setMapObjectsToDisplay(const QVector<UniqueMapId>
|
||||
m_ui->ltsDataView->setSortIndicator(MapObjectModel::Columns::EQUIPMENT_NUMBER, Qt::AscendingOrder);
|
||||
m_ui->ltsDataView->setSortIndicator(MapObjectModel::Columns::PARTY, Qt::AscendingOrder);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END, uniqueMapIds.size()=" << uniqueMapIds.size();
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, uniqueMapIds.size()=" << uniqueMapIds.size();
|
||||
}
|
||||
|
||||
|
||||
@@ -563,7 +562,7 @@ QVector<int> MapObjectSelectionWidget::visibleBuildingIds() const
|
||||
|
||||
bool MapObjectSelectionWidget::addMapObject(const UniqueMapId &uniqueMapId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, uniqueMapId=" << uniqueMapId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, uniqueMapId=" << uniqueMapId;
|
||||
|
||||
if (m_map.isNull() || m_adapterDds.isNull() || m_mapObjectModel.isNull())
|
||||
return false;
|
||||
@@ -575,13 +574,13 @@ bool MapObjectSelectionWidget::addMapObject(const UniqueMapId &uniqueMapId)
|
||||
if (m_adapterDds->unifiedMapObjectData(uniqueMapId, umodOut))
|
||||
return m_mapObjectModel->addMapObjectData(dataFromUnified(uniqueMapId, umodOut));
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END, uniqueMapId=" << uniqueMapId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, uniqueMapId=" << uniqueMapId;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MapObjectSelectionWidget::updateMapObject(const UniqueMapId &uniqueMapId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, uniqueMapId=" << uniqueMapId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, uniqueMapId=" << uniqueMapId;
|
||||
|
||||
if (m_map.isNull() || m_adapterDds.isNull() || !m_mapObjectModel)
|
||||
return false;
|
||||
@@ -593,20 +592,20 @@ bool MapObjectSelectionWidget::updateMapObject(const UniqueMapId &uniqueMapId)
|
||||
if (m_adapterDds->unifiedMapObjectData(uniqueMapId, umodOut))
|
||||
return m_mapObjectModel->updateMapObjectData(dataFromUnified(uniqueMapId, umodOut));
|
||||
|
||||
ERROR_LOG() << Q_FUNC_INFO << " unifiedMapObjectData failed, uniqueMapId=" << uniqueMapId;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END, uniqueMapId=" << uniqueMapId;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " unifiedMapObjectData failed, uniqueMapId=" << uniqueMapId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, uniqueMapId=" << uniqueMapId;
|
||||
return false;
|
||||
}
|
||||
|
||||
void MapObjectSelectionWidget::onMapObjectRemoved(UniqueMapId uniqueMapId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, uniqueMapId=" << uniqueMapId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, uniqueMapId=" << uniqueMapId;
|
||||
|
||||
if (!m_mapObjectModel)
|
||||
return;
|
||||
|
||||
m_mapObjectModel->remove(uniqueMapId);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END, uniqueMapId=" << uniqueMapId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, uniqueMapId=" << uniqueMapId;
|
||||
}
|
||||
|
||||
void MapObjectSelectionWidget::onPartyIdsChanged()
|
||||
@@ -647,7 +646,7 @@ void MapObjectSelectionWidget::onMapObjectClicked(UniqueMapId uniqueMapId)
|
||||
|
||||
void MapObjectSelectionWidget::onMapObjectEntered(const QModelIndex &index)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (!m_mapObjectModel)
|
||||
return;
|
||||
|
||||
+5
-6
@@ -14,10 +14,9 @@
|
||||
namespace SituationMap
|
||||
{
|
||||
|
||||
LayersModel::LayersModel(LtsSession::LtsSession *session, QObject *parent)
|
||||
: QAbstractTableModel(parent)
|
||||
, m_session(session)
|
||||
{}
|
||||
LayersModel::LayersModel(LtsSession::LtsSession *session, QObject *parent) : QAbstractTableModel(parent)
|
||||
, m_session(session),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {}
|
||||
|
||||
bool LayersModel::initModel(Map *situationMap)
|
||||
{
|
||||
@@ -61,9 +60,9 @@ bool LayersModel::initModel(Map *situationMap)
|
||||
insertRow(li);
|
||||
}
|
||||
|
||||
INFO_LOG() << "initModel - #layers: " << m_vecData.size();
|
||||
INFO_LOG(m_logger) << "initModel - #layers: " << m_vecData.size();
|
||||
for (const LayerInfo &item : std::as_const(m_vecData))
|
||||
INFO_LOG() << "initModel - layers: " << item.layerName;
|
||||
INFO_LOG(m_logger) << "initModel - layers: " << item.layerName;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
@@ -63,6 +63,7 @@ Q_SIGNALS:
|
||||
void layerDataChanged(const QString &layerName, int newValue, int column);
|
||||
void isVisibleChanged(const QString &layerName, bool isVisible);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
LtsSession::LtsSession *m_session{nullptr};
|
||||
QVector<LayerInfo> m_vecData;
|
||||
QStringList m_layerDisplayNameFilterList{};
|
||||
|
||||
+154
-154
File diff suppressed because it is too large.
Load diff
+2
@@ -64,6 +64,8 @@ Q_SIGNALS:
|
||||
void aboutToCloseSignal();
|
||||
|
||||
protected:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void aboutToClose() override;
|
||||
void retranslate() override;
|
||||
};
|
||||
|
||||
+14
-14
@@ -187,20 +187,20 @@ LayerControlDialog::LayerControlDialog(QWidget *parent)
|
||||
, m_layersModel(nullptr)
|
||||
, m_ui(new Ui::LayerControlDialog)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_ui->setupUi(this);
|
||||
m_ui->tvLayer->setItemDelegate(new SpinBoxDelegate(this));
|
||||
setOnlineHelpFilename(QStringLiteral("Situation-Layer_Control"));
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
LayerControlDialog::~LayerControlDialog()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
delete m_layersModel;
|
||||
delete m_ui;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void LayerControlDialog::retranslate()
|
||||
@@ -210,7 +210,7 @@ void LayerControlDialog::retranslate()
|
||||
|
||||
bool LayerControlDialog::init(LtsSession::LtsSession *session, SituationMap::Map *map)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START " << " map=" << map;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START " << " map=" << map;
|
||||
|
||||
if (!session || !map)
|
||||
return false;
|
||||
@@ -344,7 +344,7 @@ bool LayerControlDialog::init(LtsSession::LtsSession *session, SituationMap::Map
|
||||
m_ui->tbBaseSurfaceOpacity->hide();
|
||||
}
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END " << " map=" << map;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END " << " map=" << map;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -416,7 +416,7 @@ void LayerControlDialog::onLoadButtonClicked()
|
||||
|
||||
void LayerControlDialog::onMapReady()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
|
||||
onZoomSliderInit();
|
||||
@@ -425,7 +425,7 @@ void LayerControlDialog::onMapReady()
|
||||
m_ui->slBaseSurfaceOpacity->setValue(static_cast<int>(m_situationMap->baseSurfaceOpacity()*100.0f));
|
||||
m_ui->slBaseSurfaceOpacity->setToolTip(QString::number(m_ui->slBaseSurfaceOpacity->value()));
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void LayerControlDialog::onMapDestroyed()
|
||||
@@ -435,13 +435,13 @@ void LayerControlDialog::onMapDestroyed()
|
||||
|
||||
void LayerControlDialog::onLayerParamterChanged()
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " XXXXXXXXX ";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " XXXXXXXXX ";
|
||||
if (!m_situationMap)
|
||||
return;
|
||||
|
||||
if (m_ignoreLayerParameterChanged)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " skip due to m_ignoreLayerParameterChanged";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " skip due to m_ignoreLayerParameterChanged";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -472,7 +472,7 @@ void LayerControlDialog::onRotationOfMapChanged(double rotation)
|
||||
|
||||
void LayerControlDialog::onZoomSliderInit()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << "'" << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << "'" << " START";
|
||||
|
||||
if (!m_ui || !m_ui->slZoom)
|
||||
return;
|
||||
@@ -483,7 +483,7 @@ void LayerControlDialog::onZoomSliderInit()
|
||||
|
||||
if (m_ui->slZoom->minimum() == m_ui->slZoom->maximum())
|
||||
{
|
||||
WARNING_LOG() << Q_FUNC_INFO << " min/max value are identical"
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " min/max value are identical"
|
||||
<< " minimum=" << m_ui->slZoom->minimum()
|
||||
<< " maximum=" << m_ui->slZoom->maximum()
|
||||
<< " value=" << m_ui->slZoom->value();
|
||||
@@ -491,7 +491,7 @@ void LayerControlDialog::onZoomSliderInit()
|
||||
m_ui->slZoom->setMinimum(static_cast<int>(sqrt(500)));
|
||||
m_ui->slZoom->setMaximum(static_cast<int>(sqrt(100000)));
|
||||
|
||||
WARNING_LOG() << Q_FUNC_INFO << " min/max value are identical"
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " min/max value are identical"
|
||||
<< " minimum=" << m_ui->slZoom->minimum()
|
||||
<< " maximum=" << m_ui->slZoom->maximum()
|
||||
<< " value=" << m_ui->slZoom->value();
|
||||
@@ -504,7 +504,7 @@ void LayerControlDialog::onZoomSliderInit()
|
||||
onMapExtentChanged();
|
||||
m_ui->slZoom->blockSignals(false);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << "'" << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << "'" << " END";
|
||||
}
|
||||
|
||||
void LayerControlDialog::onZoomSliderValueChanged()
|
||||
|
||||
+2
@@ -39,6 +39,8 @@ public:
|
||||
bool init(LtsSession::LtsSession *session, SituationMap::Map *map);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
|
||||
private Q_SLOTS:
|
||||
|
||||
+31
-32
@@ -17,12 +17,11 @@ static inline bool isScreenIdValid(const OperatorManagement::ActiveApp &item)
|
||||
}
|
||||
|
||||
|
||||
RegisterAppHandler::RegisterAppHandler()
|
||||
: BaseClass()
|
||||
, m_updateTimer(new QTimer(this))
|
||||
{
|
||||
INFO_LOG() << "RAH c_tor";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
RegisterAppHandler::RegisterAppHandler() : BaseClass()
|
||||
, m_updateTimer(new QTimer(this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
INFO_LOG(m_logger) << "RAH c_tor";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
m_activeApp.id(-1);
|
||||
m_activeApp.appId(-1);
|
||||
@@ -35,20 +34,20 @@ RegisterAppHandler::RegisterAppHandler()
|
||||
m_updateTimer->setSingleShot(true);
|
||||
m_updateTimer->setInterval(5000);
|
||||
connect(m_updateTimer, &QTimer::timeout, this, &RegisterAppHandler::onUpdateTimeout);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
RegisterAppHandler::~RegisterAppHandler()
|
||||
{
|
||||
INFO_LOG() << "RAH d_tor";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
INFO_LOG(m_logger) << "RAH d_tor";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
Q_ASSERT(m_finalized);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void RegisterAppHandler::finalize()
|
||||
{
|
||||
INFO_LOG() << "RAH finalize";
|
||||
INFO_LOG(m_logger) << "RAH finalize";
|
||||
|
||||
|
||||
QMetaObject::invokeMethod(this, [this]()
|
||||
@@ -56,7 +55,7 @@ void RegisterAppHandler::finalize()
|
||||
if (m_updateTimer)
|
||||
m_updateTimer->stop();
|
||||
deRegisterApp(m_activeApp);
|
||||
INFO_LOG() << "RAH finalize DONE";
|
||||
INFO_LOG(m_logger) << "RAH finalize DONE";
|
||||
deleteLater();
|
||||
m_finalized = true;
|
||||
});
|
||||
@@ -122,7 +121,7 @@ void RegisterAppHandler::deRegisterApp(QObject *plugin)
|
||||
|
||||
void RegisterAppHandler::registerApp(const OperatorManagement::ActiveApp &item)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START " << item;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START " << item;
|
||||
|
||||
if (m_activeApp == item)
|
||||
return;
|
||||
@@ -134,50 +133,50 @@ void RegisterAppHandler::registerApp(const OperatorManagement::ActiveApp &item)
|
||||
if (m_activeApp.id() <= 0)
|
||||
m_updateTimer->start();
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END " << item;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END " << item;
|
||||
}
|
||||
|
||||
void RegisterAppHandler::deRegisterApp(const OperatorManagement::ActiveApp &item)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START " << item;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START " << item;
|
||||
if (!isScreenIdValid(item))
|
||||
return;
|
||||
|
||||
if (m_activeApp.id() <= 0)
|
||||
{
|
||||
WARNING_LOG() << Q_FUNC_INFO << " nothing was registered, skip DeRegister - " << m_activeApp;
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " nothing was registered, skip DeRegister - " << m_activeApp;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!removeRequest())
|
||||
WARNING_LOG() << "removeRequest failed";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" << item;
|
||||
WARNING_LOG(m_logger) << "removeRequest failed";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" << item;
|
||||
}
|
||||
|
||||
bool RegisterAppHandler::updateRequest()
|
||||
{
|
||||
if (!m_opmFtc)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no fltFtc!";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no fltFtc!";
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG() << Q_FUNC_INFO << " startSingleRequest " << m_activeApp;
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " startSingleRequest " << m_activeApp;
|
||||
|
||||
try
|
||||
{
|
||||
INFO_LOG() << "RAH update";
|
||||
INFO_LOG(m_logger) << "RAH update";
|
||||
m_activeApp.id(m_opmFtc->activeAppUpdateRequest(m_activeApp));
|
||||
}
|
||||
catch(const std::runtime_error &err)
|
||||
{
|
||||
ERROR_LOG() << "failed to update active app: " << err.what();
|
||||
ERROR_LOG(m_logger) << "failed to update active app: " << err.what();
|
||||
Q_ASSERT(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " m_requestHelper->getRepliedId() " << m_activeApp.id();
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " m_requestHelper->getRepliedId() " << m_activeApp.id();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -188,7 +187,7 @@ bool RegisterAppHandler::removeRequest()
|
||||
|
||||
if (!m_opmFtc)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no fltFtc!";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no fltFtc!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -197,13 +196,13 @@ bool RegisterAppHandler::removeRequest()
|
||||
|
||||
try
|
||||
{
|
||||
INFO_LOG() << "RAH remove";
|
||||
INFO_LOG(m_logger) << "RAH remove";
|
||||
m_opmFtc->activeAppRemoveRequest(Core::RemoveElementRequest(m_activeApp.id()));
|
||||
return true;
|
||||
}
|
||||
catch (const std::runtime_error &err)
|
||||
{
|
||||
ERROR_LOG() << "failed to remove active app: " << err.what();
|
||||
ERROR_LOG(m_logger) << "failed to remove active app: " << err.what();
|
||||
Q_ASSERT(false);
|
||||
return false;
|
||||
}
|
||||
@@ -211,9 +210,9 @@ bool RegisterAppHandler::removeRequest()
|
||||
|
||||
void RegisterAppHandler::onUpdateTimeout()
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START" << " m_opmFtc = " << m_opmFtc
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START" << " m_opmFtc = " << m_opmFtc
|
||||
<< " m_activeApp = " << m_activeApp;
|
||||
INFO_LOG() << "RAH timer";
|
||||
INFO_LOG(m_logger) << "RAH timer";
|
||||
updateRequest();
|
||||
}
|
||||
|
||||
@@ -226,22 +225,22 @@ void RegisterAppHandler::handleSvcStartupRequest(const OperatorManagement::Activ
|
||||
if ((data.operatorId() < 0) &&
|
||||
(m_activeApp.appId() >= 0))
|
||||
{
|
||||
INFO_LOG() << Q_FUNC_INFO << " startUpRequest recognized, reDo updateRequest";
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " startUpRequest recognized, reDo updateRequest";
|
||||
updateRequest();
|
||||
}
|
||||
}
|
||||
|
||||
void RegisterAppHandler::onScreenIdChanged(int screenId, int screenContainerId, int screenTypeId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, screenId=" << screenId << ", screenContainerId=" << screenContainerId << ", screenTypeId=" << screenTypeId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, screenId=" << screenId << ", screenContainerId=" << screenContainerId << ", screenTypeId=" << screenTypeId;
|
||||
|
||||
INFO_LOG() << Q_FUNC_INFO << " screenId: " << m_activeApp.screenId() << " -> " << screenId;
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " screenId: " << m_activeApp.screenId() << " -> " << screenId;
|
||||
m_activeApp.screenTypeId(screenTypeId);
|
||||
m_activeApp.screenId(screenId);
|
||||
m_activeApp.screenContainerId(screenContainerId);
|
||||
updateRequest();
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END, screenId=" << screenId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, screenId=" << screenId;
|
||||
}
|
||||
|
||||
}
|
||||
+14
-14
@@ -29,19 +29,19 @@ MapWidgetControl::MapWidgetControl(const QString &menuGroup, QWidget *parent)
|
||||
, m_tb2D3D(nullptr)
|
||||
, m_session(nullptr)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_ui->setupUi(this);
|
||||
|
||||
setOnlineHelpFilename(QStringLiteral("Situation-Map_Widgets"));
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
MapWidgetControl::~MapWidgetControl()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
delete m_ui;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void MapWidgetControl::retranslate()
|
||||
@@ -52,7 +52,7 @@ void MapWidgetControl::retranslate()
|
||||
|
||||
bool MapWidgetControl::init(SituationMap::Map *map, LtsSession::LtsSession *session )
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START " << " map=" << map;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START " << " map=" << map;
|
||||
|
||||
if (!map)
|
||||
return false;
|
||||
@@ -62,12 +62,12 @@ bool MapWidgetControl::init(SituationMap::Map *map, LtsSession::LtsSession *sess
|
||||
|
||||
if (m_situationMap == nullptr)
|
||||
{
|
||||
ERROR_LOG() << "invalid situation map given";
|
||||
ERROR_LOG(m_logger) << "invalid situation map given";
|
||||
return false;
|
||||
}
|
||||
|
||||
reBuildUi();
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END " << " map=" << map;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END " << " map=" << map;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ bool MapWidgetControl::isReplay() const
|
||||
{
|
||||
if (m_situationMap == nullptr)
|
||||
{
|
||||
ERROR_LOG() << "cannot check if situation map is in replay, no situation map available";
|
||||
ERROR_LOG(m_logger) << "cannot check if situation map is in replay, no situation map available";
|
||||
return false;
|
||||
}
|
||||
return m_situationMap->isReplay();
|
||||
@@ -104,7 +104,7 @@ void MapWidgetControl::onChangeModeRequested()
|
||||
{
|
||||
if (m_tb2D3D == nullptr)
|
||||
{
|
||||
ERROR_LOG() << "cannot process change mode request, no 2D/3D option available";
|
||||
ERROR_LOG(m_logger) << "cannot process change mode request, no 2D/3D option available";
|
||||
return;
|
||||
}
|
||||
m_tb2D3D->setEnabled(false);
|
||||
@@ -133,7 +133,7 @@ void MapWidgetControl::reBuildUi()
|
||||
|
||||
if (m_situationMap == nullptr)
|
||||
{
|
||||
ERROR_LOG() << "cannot rebuild ui, no situation map available";
|
||||
ERROR_LOG(m_logger) << "cannot rebuild ui, no situation map available";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -344,12 +344,12 @@ void MapWidgetControl::enaDisa()
|
||||
|
||||
if (m_situationMap == nullptr)
|
||||
{
|
||||
ERROR_LOG() << "cannot enable/disable ui, no situation map available";
|
||||
ERROR_LOG(m_logger) << "cannot enable/disable ui, no situation map available";
|
||||
return;
|
||||
}
|
||||
if ( m_tb2D3D && !enable3dMap)
|
||||
{
|
||||
DEBUG_LOG() << "m_tb2D3D->hide();"
|
||||
DEBUG_LOG(m_logger) << "m_tb2D3D->hide();"
|
||||
<< "m_enable3dMap=" << enable3dMap;
|
||||
m_tb2D3D->hide();
|
||||
}
|
||||
@@ -362,13 +362,13 @@ void MapWidgetControl::enaDisa()
|
||||
case Mode::Mode_2D:
|
||||
m_tb2D3D->setText(tr("Switch to 3D"));
|
||||
m_tb2D3D->setIcon(QIcon(QLatin1String("icon:map_3d.svg")));
|
||||
DEBUG_LOG() << "m_tb2D3D Switch to 3D"
|
||||
DEBUG_LOG(m_logger) << "m_tb2D3D Switch to 3D"
|
||||
<< "enable3dMap=" << enable3dMap;
|
||||
break;
|
||||
case Mode::Mode_3D:
|
||||
m_tb2D3D->setText(tr("Switch to 2D"));
|
||||
m_tb2D3D->setIcon(QIcon(QLatin1String("icon:map_2d.svg")));
|
||||
DEBUG_LOG() << "m_tb2D3D Switch to 2D"
|
||||
DEBUG_LOG(m_logger) << "m_tb2D3D Switch to 2D"
|
||||
<< "enable3dMap=" << enable3dMap;
|
||||
break;
|
||||
default:
|
||||
|
||||
+2
@@ -47,6 +47,8 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
struct MenuWidgetPosition
|
||||
{
|
||||
int row;
|
||||
|
||||
+54
-54
@@ -174,24 +174,24 @@ SituationMapInit::SituationMapInit(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(SituationMap::getLogger("SituationMapInit"))
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
SituationMapInit::~SituationMapInit()
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (m_pluginProvider == nullptr)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " !m_pluginProvider";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " !m_pluginProvider";
|
||||
m_adapterDds.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_pluginProvider->isSessionValid())
|
||||
{
|
||||
INFO_LOG() << Q_FUNC_INFO << " no session anymore: return";
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " no session anymore: return";
|
||||
m_adapterDds.clear();
|
||||
return;
|
||||
}
|
||||
@@ -211,30 +211,30 @@ SituationMapInit::~SituationMapInit()
|
||||
|
||||
if (m_situationMap)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " MapCache: DELETE ...., isNull = " << m_situationMap->property(MapCacheState).isNull();
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " MapCache: DELETE ...., property = '" << (m_situationMap ? m_situationMap->property(MapCacheState).toString().toStdString() : "-") << "'";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " MapCache: DELETE ...., isNull = " << m_situationMap->property(MapCacheState).isNull();
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " MapCache: DELETE ...., property = '" << (m_situationMap ? m_situationMap->property(MapCacheState).toString().toStdString() : "-") << "'";
|
||||
|
||||
if (m_situationMap->property(MapCacheState).isNull())
|
||||
{
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " MapCache: DELETE YES";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " MapCache: DELETE YES";
|
||||
delete m_situationMap;
|
||||
m_situationMap.clear();
|
||||
} else {
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " MapCache: DELETE NO, setParent->null";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " MapCache: DELETE NO, setParent->null";
|
||||
m_situationMap->setParent(nullptr, true);
|
||||
m_situationMap->setProperty(MapCacheState, QVariant());
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " DELETE situationMap: YES";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " DELETE situationMap: YES";
|
||||
delete m_situationMap;
|
||||
m_situationMap.clear();
|
||||
#endif
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ ThatPartyIdToColorFunctor::ThatPartyIdToColorFunctor(const std::shared_ptr<Parti
|
||||
, m_ppmDtc(ppmDtc)
|
||||
, m_logger(SituationMap::getLogger("ThatPartyIdToColorFunctor"))
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
m_ppmDtc->waitForHistoricalDataParty(1000);
|
||||
|
||||
@@ -255,12 +255,12 @@ ThatPartyIdToColorFunctor::ThatPartyIdToColorFunctor(const std::shared_ptr<Parti
|
||||
{
|
||||
onPartyChanged(data);
|
||||
});
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void ThatPartyIdToColorFunctor::onPartyChanged(const ParticipantManagement::Party &data, DataModification modType)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START"
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"
|
||||
<< ", modType= " << modType
|
||||
<< " partyId=" << data.id()
|
||||
<< " partyName='" << data.name() << "'"
|
||||
@@ -286,16 +286,16 @@ void ThatPartyIdToColorFunctor::onPartyChanged(const ParticipantManagement::Part
|
||||
|
||||
bool SituationMapInit::initPluginProvider(SituationMap::PluginProvider *pluginProvider)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START " << " session=" << pluginProvider;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START " << " session=" << pluginProvider;
|
||||
|
||||
m_pluginProvider = pluginProvider;
|
||||
|
||||
if (!m_pluginProvider)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no plugin provider!";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no plugin provider!";
|
||||
return false;
|
||||
}
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START " << " session=" << pluginProvider;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START " << " session=" << pluginProvider;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -303,11 +303,11 @@ bool SituationMapInit::initPluginProvider(SituationMap::PluginProvider *pluginPr
|
||||
|
||||
bool SituationMapInit::initAdapter(QPointer<MovementTrackManager> &movementTrackMgr, bool resourceMode)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (!m_pluginProvider)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no plugin provider!";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no plugin provider!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ bool SituationMapInit::initAdapter(QPointer<MovementTrackManager> &movementTrack
|
||||
|
||||
if (!m_adapterDds->init(m_situationMap, m_pluginProvider, movementTrackMgr, resourceMode))
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " m_adapterDds->init failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " m_adapterDds->init failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ bool SituationMapInit::initAdapter(QPointer<MovementTrackManager> &movementTrack
|
||||
connect(m_adapterDds.data(), &AdapterDds::participantPositionChanged,
|
||||
this, &SituationMapInit::participantPositionChanged);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ bool SituationMapInit::clearObjects()
|
||||
if (remainingObjectsCount != 0)
|
||||
{
|
||||
|
||||
WARNING_LOG() << Q_FUNC_INFO << " remainingObjectsCount should be '0', is: " << remainingObjectsCount;
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " remainingObjectsCount should be '0', is: " << remainingObjectsCount;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -468,7 +468,7 @@ bool SituationMapInit::enableGearRanges(int participantId, bool enable)
|
||||
return false;
|
||||
ptr->setRangesVisibility(enable);
|
||||
if (!ptr->updateView())
|
||||
ERROR_LOG() << "Couldn't updateview after setting setRangesVisibility(" << enable << ") for SimId: " << participantId;
|
||||
ERROR_LOG(m_logger) << "Couldn't updateview after setting setRangesVisibility(" << enable << ") for SimId: " << participantId;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -519,7 +519,7 @@ bool SituationMapInit::centerMapToAesObject(int entityId)
|
||||
|
||||
if (!bbox.isValid())
|
||||
{
|
||||
WARNING_LOG() << Q_FUNC_INFO
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO
|
||||
<< " boundingBox not valid: bbox=" << bbox;
|
||||
return false;
|
||||
}
|
||||
@@ -542,7 +542,7 @@ bool SituationMapInit::centerMapToBuildingObject(int entityId)
|
||||
|
||||
if (!bbox.isValid())
|
||||
{
|
||||
WARNING_LOG() << Q_FUNC_INFO
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO
|
||||
<< " boundingBox not valid: bbox=" << bbox;
|
||||
return false;
|
||||
}
|
||||
@@ -587,7 +587,7 @@ bool SituationMapInit::centerMapToMapObject(MapObjectType mot, int entityId)
|
||||
|
||||
if (!bbox.isValid())
|
||||
{
|
||||
WARNING_LOG() << Q_FUNC_INFO
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO
|
||||
<< " boundingBox not valid: bbox=" << bbox;
|
||||
return false;
|
||||
}
|
||||
@@ -800,7 +800,7 @@ void SituationMapInit::modifyViewshed(double alpha, double innerRadius, double o
|
||||
if (m_viewshedId >= 0)
|
||||
m_situationMap->viewshed().modify(m_viewshedId, alpha, innerRadius, observerHeight, targetHeight, beamAngle);
|
||||
else
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " m_viewshedId invalid (" << m_viewshedId << ")";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " m_viewshedId invalid (" << m_viewshedId << ")";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -886,22 +886,22 @@ SituationMap::RB::RubberbandFactory &SituationMapInit::rubberbandFactory()
|
||||
|
||||
ResourceManagerMode SituationMapInit::resourceManagerMode() const
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
if (!m_adapterDds)
|
||||
return ResourceManagerMode::Undefined;
|
||||
|
||||
ResourceManagerMode rmm = m_adapterDds->resourceManagerMode();
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return rmm;
|
||||
}
|
||||
bool SituationMapInit::setResourceManagerMode(ResourceManagerMode rmm)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
if (!m_adapterDds)
|
||||
return false;
|
||||
|
||||
bool success = m_adapterDds->setResourceManagerMode(rmm);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -953,7 +953,7 @@ static QVector<BaseUrl> convertMapDecription2BaseUrlVec(const std::vector<AssetM
|
||||
|
||||
bool SituationMapInit::trainingAreaExists() const
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (!m_pluginProvider->exmDtc() || !m_pluginProvider->asmDtc())
|
||||
return false;
|
||||
@@ -968,7 +968,7 @@ bool SituationMapInit::trainingAreaExists() const
|
||||
|
||||
const AssetManagement::TrainingArea &ta = m_pluginProvider->asmDtc()->trainingArea(trainingAreaId);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END, trainingAreaExists = " << (ta.id() == trainingAreaId);
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, trainingAreaExists = " << (ta.id() == trainingAreaId);
|
||||
return (ta.id() == trainingAreaId);
|
||||
}
|
||||
|
||||
@@ -986,7 +986,7 @@ MapSettingsJson SituationMapInit::getMapSettingsFromService() const
|
||||
|
||||
if (ta.id() != trainingAreaId)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " TrainingArea does not exists (yet)";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " TrainingArea does not exists (yet)";
|
||||
return msj;
|
||||
}
|
||||
|
||||
@@ -1002,7 +1002,7 @@ MapSettingsJson SituationMapInit::getMapSettingsFromService() const
|
||||
|
||||
bool SituationMapInit::initMap(bool enableSelection, SituationMap::Mode mapMode, const SituationMap::Viewpoint2D &viewPoint)
|
||||
{
|
||||
INFO_LOG() << Q_FUNC_INFO << " START, enableSelection=" << enableSelection
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " START, enableSelection=" << enableSelection
|
||||
<< ", mapMode=" << mapMode;
|
||||
|
||||
#ifdef USE_MAP_CACHE
|
||||
@@ -1023,11 +1023,11 @@ bool SituationMapInit::initMap(bool enableSelection, SituationMap::Mode mapMode,
|
||||
{
|
||||
m_situationMap = mapCacheItemRef.m_mapWidget;
|
||||
m_situationMap->setProperty(MapCacheState, QVariant(QStringLiteral("3D/reUsed/taken")));
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " MapCache: ReUse Mode_3D"
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " MapCache: ReUse Mode_3D"
|
||||
<< " (updatesEnabled()=" << m_situationMap->updatesEnabled() << ")";
|
||||
reUsing = true;
|
||||
} else {
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " MapCache: CREATE Mode_3D";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " MapCache: CREATE Mode_3D";
|
||||
m_situationMap = SituationMap::Map::create();
|
||||
mapCacheItemRef.m_mapWidget = m_situationMap;
|
||||
mapCacheItemRef.m_mapWidget->setProperty(MapCacheState, QVariant(QStringLiteral("3D/created")));
|
||||
@@ -1081,7 +1081,7 @@ bool SituationMapInit::initMap(bool enableSelection, SituationMap::Mode mapMode,
|
||||
#endif
|
||||
|
||||
|
||||
INFO_LOG() << Q_FUNC_INFO << " ***** initMap:"
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " ***** initMap:"
|
||||
<< ", mapMode=" << mapMode
|
||||
<< ", m_pluginProvider->toString=" << m_pluginProvider->toString()
|
||||
<< ", exerciseId()= " << m_pluginProvider->exerciseId();
|
||||
@@ -1102,7 +1102,7 @@ bool SituationMapInit::initMap(bool enableSelection, SituationMap::Mode mapMode,
|
||||
|
||||
const bool bTrainingAreaExists = this->trainingAreaExists();
|
||||
|
||||
INFO_LOG() << Q_FUNC_INFO << " bTrainingAreaExists=" << bTrainingAreaExists
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " bTrainingAreaExists=" << bTrainingAreaExists
|
||||
<< ", m_pluginProvider->toString " << m_pluginProvider->toString();
|
||||
|
||||
bool bIsOfTypeOrganizer =
|
||||
@@ -1130,7 +1130,7 @@ bool SituationMapInit::initMap(bool enableSelection, SituationMap::Mode mapMode,
|
||||
{
|
||||
int tries = waitForTa->property("tries").toInt();
|
||||
|
||||
INFO_LOG() << Q_FUNC_INFO << " waiting for trainingAreaExists " << trainingAreaExists() << ", tries = " << tries;
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for trainingAreaExists " << trainingAreaExists() << ", tries = " << tries;
|
||||
|
||||
if (this->trainingAreaExists())
|
||||
{
|
||||
@@ -1139,7 +1139,7 @@ bool SituationMapInit::initMap(bool enableSelection, SituationMap::Mode mapMode,
|
||||
|
||||
const MapSettingsJson &mapSettingsFromService = getMapSettingsFromService();
|
||||
if (!initMapPart2(mapMode, viewPoint, &mapSettingsFromService))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " initMapPart2 failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " initMapPart2 failed";
|
||||
}
|
||||
|
||||
if (tries > 30)
|
||||
@@ -1152,7 +1152,7 @@ bool SituationMapInit::initMap(bool enableSelection, SituationMap::Mode mapMode,
|
||||
<< " giving up";
|
||||
|
||||
if (!initMapPart2(mapMode, viewPoint))
|
||||
ERROR_LOG() << Q_FUNC_INFO << " initMapPart2 failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " initMapPart2 failed";
|
||||
return;
|
||||
}
|
||||
waitForTa->setProperty("tries", ++tries);
|
||||
@@ -1163,7 +1163,7 @@ bool SituationMapInit::initMap(bool enableSelection, SituationMap::Mode mapMode,
|
||||
return true;
|
||||
}
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END, success=" << success;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, success=" << success;
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -1171,7 +1171,7 @@ bool SituationMapInit::initMapPart2(SituationMap::Mode mapMode,
|
||||
const SituationMap::Viewpoint2D &viewPoint,
|
||||
const MapSettingsJson* mapSettingJson)
|
||||
{
|
||||
INFO_LOG() << Q_FUNC_INFO << " mapSettingJson=" << mapSettingJson;
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " mapSettingJson=" << mapSettingJson;
|
||||
|
||||
bool success = true;
|
||||
|
||||
@@ -1183,7 +1183,7 @@ bool SituationMapInit::initMapPart2(SituationMap::Mode mapMode,
|
||||
return false;
|
||||
}
|
||||
else
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " ***** MapIniFile found: " << initFilePath;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " ***** MapIniFile found: " << initFilePath;
|
||||
|
||||
|
||||
SituationMap::MapSettings *mapSettings =
|
||||
@@ -1215,13 +1215,13 @@ bool SituationMapInit::initMapPart2(SituationMap::Mode mapMode,
|
||||
SituationMap::FunctionDialog::addButtonToMap(m_situationMap);
|
||||
#endif
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END, success=" << success;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, success=" << success;
|
||||
return success;
|
||||
}
|
||||
|
||||
void SituationMapInit::myMapWidgetDialogIsAboutToBeClosed()
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
|
||||
if (m_adapterDds)
|
||||
@@ -1239,7 +1239,7 @@ void SituationMapInit::myMapWidgetDialogIsAboutToBeClosed()
|
||||
|
||||
|
||||
|
||||
INFO_LOG() << Q_FUNC_INFO << " MapCache: prevent destruction";
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " MapCache: prevent destruction";
|
||||
m_situationMap->setParent(nullptr, true);
|
||||
|
||||
}
|
||||
@@ -1260,7 +1260,7 @@ bool SituationMapInit::updateAll()
|
||||
|
||||
if (!m_situationMap->isReady())
|
||||
{
|
||||
INFO_LOG() << Q_FUNC_INFO << " Map Not ready Yet: Skip ";
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " Map Not ready Yet: Skip ";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1270,19 +1270,19 @@ bool SituationMapInit::updateAll()
|
||||
|
||||
void SituationMapInit::onMapbeginDestroy()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
if (m_adapterDds)
|
||||
{
|
||||
m_adapterDds->stop();
|
||||
m_adapterDds.clear();
|
||||
}
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void SituationMapInit::onMapObjectsClicked(const SituationMap::Map::RefPointerMapObjectList &mapObjList,
|
||||
const QPointF &viewportPosition)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " ViewPort X: " << viewportPosition.x() << " Y: " << viewportPosition.y();
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " ViewPort X: " << viewportPosition.x() << " Y: " << viewportPosition.y();
|
||||
onMapObjectClickedByArea(mapObjList);
|
||||
}
|
||||
|
||||
@@ -1323,7 +1323,7 @@ void SituationMapInit::onMapObjectClickedByArea(const SituationMap::Map::RefPoin
|
||||
const auto &mapObj = mapObjList.front();
|
||||
{
|
||||
if (!m_adapterDds->onMapObjectClicked(mapObj))
|
||||
WARNING_LOG() << Q_FUNC_INFO << " Click on a map object but found no handler for it ... "
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " Click on a map object but found no handler for it ... "
|
||||
<< " mapObj: debugInfo='" << mapObj->debugInfo() << "'"
|
||||
<< " uniqueMapId=" << mapObj->uniqueMapId();
|
||||
}
|
||||
@@ -1338,7 +1338,7 @@ void SituationMapInit::onProcessMapObjectClicked(const QVector<SituationMap::Uni
|
||||
if (!m_adapterDds)
|
||||
return;
|
||||
if (!m_adapterDds->onMapObjectsClicked(uniqueMapIds))
|
||||
WARNING_LOG() << Q_FUNC_INFO << " onMapObjectsClicked failed ... ";
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " onMapObjectsClicked failed ... ";
|
||||
}
|
||||
|
||||
void SituationMapInit::onContextMenuRequested(const SituationMap::Map::RefPointerMapObjectList &mapObjList,
|
||||
|
||||
+1
@@ -162,6 +162,7 @@ private Q_SLOTS:
|
||||
void onViewshedFinished(long viewshedId);
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
virtual bool trainingAreaExists() const;
|
||||
virtual MapSettingsJson getMapSettingsFromService() const;
|
||||
private:
|
||||
|
||||
+2
@@ -118,6 +118,8 @@ protected Q_SLOTS:
|
||||
void onPartyChanged(const ParticipantManagement::Party &data, DataModification modType = DataModification::eAdded);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool m_doRemovePartyFlag = true;
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
||||
};
|
||||
|
||||
+3
-4
@@ -10,9 +10,8 @@
|
||||
|
||||
namespace SituationMap
|
||||
{
|
||||
TerrainProfileHandler::TerrainProfileHandler(const QString &menuGroup)
|
||||
: m_menuGroup(menuGroup)
|
||||
{}
|
||||
TerrainProfileHandler::TerrainProfileHandler(const QString &menuGroup) : m_menuGroup(menuGroup),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {}
|
||||
|
||||
TerrainProfileHandler::~TerrainProfileHandler()
|
||||
{
|
||||
@@ -55,7 +54,7 @@ bool TerrainProfileHandler::showTerrainProfileResults(long id, const QVector<QPa
|
||||
if (!m_situationMap || !m_session)
|
||||
return false;
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START" << " id=" << id << " results.size()=" << results.size();
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START" << " id=" << id << " results.size()=" << results.size();
|
||||
|
||||
const LtsWidgets::LayoutArea layoutArea = LtsWidgets::LayoutArea::eDialogTab;
|
||||
const QString &identifier = QStringLiteral("TerrainProfile");
|
||||
|
||||
+1
@@ -31,6 +31,7 @@ public:
|
||||
void clearTerrainProfile();
|
||||
bool showTerrainProfileResults(long id, const QVector<QPair<QPointF, double> > &results);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
QPointer<LtsSession::LtsSession> m_session;
|
||||
QPointer<SituationMap::Map> m_situationMap;
|
||||
QPointer<SituationMap::TerrainProfileDialog> m_terrainProfileDialog;
|
||||
|
||||
Reference in new issue
Block a user