Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d327c66c46 | ||
|
|
8e9594d25c | ||
|
|
3924b1e72b | ||
|
|
fb3e91ea4b | ||
|
|
e067c21b0d | ||
|
|
131a6714cf |
No files matched your search
@@ -1,4 +1,5 @@
|
|||||||
# export MIGRATE_PIPELINE_ROOT="/home/torsten/sandbox/qt6-migration-pipeline"
|
# export MIGRATE_PIPELINE_ROOT="/home/torsten/sandbox/qt6-migration-pipeline"
|
||||||
export MIGRATE_PIPELINE_ROOT="/home/nkana/repo/qt6-migration-pipeline"
|
export MIGRATE_PIPELINE_ROOT="/home/nkana/repo/qt6-migration-pipeline"
|
||||||
|
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=16000
|
||||||
export LANG=C.UTF-8
|
export LANG=C.UTF-8
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
@@ -210,8 +210,12 @@ OPTION(BUILD_PLUGINS_PLANEDITOR "Build PlanEditor plugin (requires Qt6 WebEngine
|
|||||||
OPTION(BUILD_PLUGINS_ONLINEHELP "Build OnlineHelp plugin (requires Qt6 WebEngine)" OFF)
|
OPTION(BUILD_PLUGINS_ONLINEHELP "Build OnlineHelp plugin (requires Qt6 WebEngine)" OFF)
|
||||||
OPTION(BUILD_PLUGINS_SERVICEMONITOR "Build ServiceMonitor plugin (requires Qt6 WebEngine)" OFF)
|
OPTION(BUILD_PLUGINS_SERVICEMONITOR "Build ServiceMonitor plugin (requires Qt6 WebEngine)" OFF)
|
||||||
OPTION(BUILD_PLUGINS_PARTICIPANT_ORG_CHART "Build ParticipantOrgChart (requires Qt6 WebEngine)" OFF)
|
OPTION(BUILD_PLUGINS_PARTICIPANT_ORG_CHART "Build ParticipantOrgChart (requires Qt6 WebEngine)" OFF)
|
||||||
OPTION(BUILD_PLUGINS_MSDL "Build MSDL module (requires Qt6 XmlPatterns)" OFF)
|
# MSDL/Saab no longer require Qt XmlPatterns (removed in Qt 6.0): their import
|
||||||
OPTION(BUILD_PLUGINS_SAAB "Build Saab module (requires Qt6 XmlPatterns)" OFF)
|
# code was re-implemented with Qt6::Xml (QDomDocument) for the schema check plus
|
||||||
|
# the external xmllint step for real XSD validation; MSDL additionally links
|
||||||
|
# XercesC + uses xsdc++-generated tree classes (needs libxerces-c-dev + xsdcxx).
|
||||||
|
OPTION(BUILD_PLUGINS_MSDL "Build MSDL module (needs XercesC + xsdc++)" OFF)
|
||||||
|
OPTION(BUILD_PLUGINS_SAAB "Build Saab module (Qt6::Xml only)" OFF)
|
||||||
OPTION(BUILD_RTI "Build RTI Connext DDS dependent modules" OFF)
|
OPTION(BUILD_RTI "Build RTI Connext DDS dependent modules" OFF)
|
||||||
OPTION(BUILD_VIEWER_ONLY "Build only Viewer module (no RTI required)" OFF)
|
OPTION(BUILD_VIEWER_ONLY "Build only Viewer module (no RTI required)" OFF)
|
||||||
# Add Lts/ include path globally for QosProfile and other Lts headers
|
# Add Lts/ include path globally for QosProfile and other Lts headers
|
||||||
@@ -360,6 +364,27 @@ if(NOT Qt6_FOUND)
|
|||||||
message(STATUS "Found Qt6 (minimal): ${Qt6Core_VERSION}")
|
message(STATUS "Found Qt6 (minimal): ${Qt6Core_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# MSDL/Saab import libs (gated by BUILD_PLUGINS_MSDL / BUILD_PLUGINS_SAAB) no
|
||||||
|
# longer use Qt XmlPatterns (QXmlSchema/QXmlSchemaValidator), which was removed
|
||||||
|
# in Qt 6.0. They were re-implemented with Qt6::Xml (QDomDocument) for the
|
||||||
|
# schema well-formedness check plus the external xmllint step for real XSD
|
||||||
|
# validation; MSDL additionally links XercesC and uses xsdc++-generated tree
|
||||||
|
# classes. No Qt6::XmlPatterns lookup is needed any more.
|
||||||
|
|
||||||
|
# Qt6::WebChannel (consumed by PpmOrgChartGuiPlugin's QWebChannel page setup):
|
||||||
|
# in Qt5 Qt5::WebEngineWidgets transitively linked Qt5::WebChannel (Qt5's
|
||||||
|
# webengine depended on webchannel), but Qt6 dropped that dependency, so the
|
||||||
|
# module must be found and linked explicitly. Separate QUIET find - never let
|
||||||
|
# a missing optional component flip Qt6_FOUND off.
|
||||||
|
if(NOT TARGET Qt6::WebChannel)
|
||||||
|
find_package(Qt6 6.2 COMPONENTS WebChannel QUIET)
|
||||||
|
if(Qt6WebChannel_FOUND)
|
||||||
|
message(STATUS "Found Qt6WebChannel")
|
||||||
|
else()
|
||||||
|
message(STATUS "Qt6WebChannel not found (PpmOrgChartGuiPlugin requires it; keep BUILD_PLUGINS_PARTICIPANT_ORG_CHART OFF)")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# Manual Qt6 configuration - create imported targets for available libraries
|
# Manual Qt6 configuration - create imported targets for available libraries
|
||||||
if(NOT TARGET Qt6::Core)
|
if(NOT TARGET Qt6::Core)
|
||||||
find_package(Qt6 6.2 COMPONENTS Core REQUIRED)
|
find_package(Qt6 6.2 COMPONENTS Core REQUIRED)
|
||||||
|
|||||||
+2
-1
@@ -125,7 +125,8 @@ class Shot
|
|||||||
Shot(const int32_t id, const osg::Vec3d& shooterPos, const osg::Vec3d& targetPos, int buildingIdSrc,
|
Shot(const int32_t id, const osg::Vec3d& shooterPos, const osg::Vec3d& targetPos, int buildingIdSrc,
|
||||||
int rommNumberSrc, int buildingIdDst, int rommNumberDst, int lineType, const osg::Vec4& color,
|
int rommNumberSrc, int buildingIdDst, int rommNumberDst, int lineType, const osg::Vec4& color,
|
||||||
unsigned int duration_s, unsigned int durationMax_s, double simTimeCreated)
|
unsigned int duration_s, unsigned int durationMax_s, double simTimeCreated)
|
||||||
: mId(id), mShooterPos(shooterPos), mTargetPos(targetPos), mBuildingIdSrc(buildingIdSrc),
|
: m_logger(BuildingViewer::getLogger("Shot")), mId(id), mShooterPos(shooterPos),
|
||||||
|
mTargetPos(targetPos), mBuildingIdSrc(buildingIdSrc),
|
||||||
mRoomNumberSrc(rommNumberSrc), mBuildingIdDst(buildingIdDst), mRoomNumberDst(rommNumberDst),
|
mRoomNumberSrc(rommNumberSrc), mBuildingIdDst(buildingIdDst), mRoomNumberDst(rommNumberDst),
|
||||||
mLineType(lineType), mColor(color), mDuration_s(duration_s), m_DurationMax_s(durationMax_s),
|
mLineType(lineType), mColor(color), mDuration_s(duration_s), m_DurationMax_s(durationMax_s),
|
||||||
mSimTimeCreated(simTimeCreated)
|
mSimTimeCreated(simTimeCreated)
|
||||||
|
|||||||
+1
@@ -180,6 +180,7 @@ CtrlImpl::CtrlImpl(dtEntity::EntityManager &em, QWidget *parentWidget)
|
|||||||
, mPaused(false)
|
, mPaused(false)
|
||||||
, mNonRealtimeMode(false)
|
, mNonRealtimeMode(false)
|
||||||
, mFrameRate(30)
|
, mFrameRate(30)
|
||||||
|
, m_logger(BuildingViewer::getLogger("CtrlImpl"))
|
||||||
{
|
{
|
||||||
if (!mEntityManager->GetES(mMapSystem) ||
|
if (!mEntityManager->GetES(mMapSystem) ||
|
||||||
!mEntityManager->GetES(mPlayerSystem))
|
!mEntityManager->GetES(mPlayerSystem))
|
||||||
|
|||||||
+2
-2
@@ -3,7 +3,7 @@
|
|||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
#include <QtWidgets/QVBoxLayout>
|
#include <QtWidgets/QVBoxLayout>
|
||||||
#include <QtCore/QEvent>
|
#include <QtCore/QEvent>
|
||||||
#include <QGLWidget>
|
#include <QtOpenGLWidgets/QOpenGLWidget>
|
||||||
#include <QWindow>
|
#include <QWindow>
|
||||||
#include <dtEntity/log.h>
|
#include <dtEntity/log.h>
|
||||||
|
|
||||||
@@ -176,7 +176,7 @@ void ViewWidget::viewModeChanged()
|
|||||||
|
|
||||||
bool ViewWidget::isOpenGlWindowExposed() const
|
bool ViewWidget::isOpenGlWindowExposed() const
|
||||||
{
|
{
|
||||||
QGLWidget *gl = qobject_cast<QGLWidget*>(m_pView);
|
QOpenGLWidget *gl = qobject_cast<QOpenGLWidget*>(m_pView);
|
||||||
if (!gl || !gl->windowHandle())
|
if (!gl || !gl->windowHandle())
|
||||||
return false;
|
return false;
|
||||||
return gl->windowHandle()->isExposed();
|
return gl->windowHandle()->isExposed();
|
||||||
|
|||||||
+4
-4
@@ -4,7 +4,6 @@
|
|||||||
#include <osg/Material>
|
#include <osg/Material>
|
||||||
#include <osg/BlendFunc>
|
#include <osg/BlendFunc>
|
||||||
#include <osg/BlendColor>
|
#include <osg/BlendColor>
|
||||||
#include <QStringRef>
|
|
||||||
#include <QtCore/QVector>
|
#include <QtCore/QVector>
|
||||||
|
|
||||||
namespace VCtrl
|
namespace VCtrl
|
||||||
@@ -87,10 +86,11 @@ void SplitVisitor::apply(osg::Group &node)
|
|||||||
for (unsigned int i = 0; i < node.getNumDescriptions(); ++i)
|
for (unsigned int i = 0; i < node.getNumDescriptions(); ++i)
|
||||||
{
|
{
|
||||||
QString descr = QString::fromStdString(node.getDescription(i));
|
QString descr = QString::fromStdString(node.getDescription(i));
|
||||||
const QVector<QStringRef> descprt = descr.splitRef(QLatin1Char(';'));
|
// Qt6: QStringRef removed; split()/splitRef() both return QVector<QString>
|
||||||
for (const QStringRef &prt : descprt)
|
const QVector<QString> descprt = descr.split(QLatin1Char(';'));
|
||||||
|
for (const QString &prt : descprt)
|
||||||
{
|
{
|
||||||
const QVector<QStringRef> items = prt.split(QLatin1Char('='));
|
const QVector<QString> items = prt.split(QLatin1Char('='));
|
||||||
if (items.size() == 2 && items[0] == QLatin1String("base_height"))
|
if (items.size() == 2 && items[0] == QLatin1String("base_height"))
|
||||||
h = items[1].toFloat();
|
h = items[1].toFloat();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ if(QT6_GUI_AVAILABLE)
|
|||||||
NGL_TARGET_LINK_LIBRARIES(BuildingViewerCommon
|
NGL_TARGET_LINK_LIBRARIES(BuildingViewerCommon
|
||||||
PRIVATE
|
PRIVATE
|
||||||
Qt6::OpenGL
|
Qt6::OpenGL
|
||||||
|
Qt6::OpenGLWidgets
|
||||||
${OPENGL_LIBRARIES}
|
${OPENGL_LIBRARIES}
|
||||||
${BGVIEWER_DTENTITYOSG_LIBRARY}
|
${BGVIEWER_DTENTITYOSG_LIBRARY}
|
||||||
${BGVIEWER_DTENTITY_LIBRARY}
|
${BGVIEWER_DTENTITY_LIBRARY}
|
||||||
@@ -126,6 +127,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(BuildingViewerCommon
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/BgViewer/viewerCtrl
|
${CMAKE_CURRENT_SOURCE_DIR}/BgViewer/viewerCtrl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../share
|
${CMAKE_CURRENT_SOURCE_DIR}/../share
|
||||||
${OSG_INCLUDE_DIR}
|
${OSG_INCLUDE_DIR}
|
||||||
|
${BGVIEWER_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
IF (NOT WIN32)
|
IF (NOT WIN32)
|
||||||
|
|||||||
+11
-8
@@ -3,6 +3,7 @@
|
|||||||
#include "bdv_communication_interface_internal.h"
|
#include "bdv_communication_interface_internal.h"
|
||||||
|
|
||||||
#include <ParticipantManagement/ppm_translation.h>
|
#include <ParticipantManagement/ppm_translation.h>
|
||||||
|
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||||
#include <QtCore/QTimer>
|
#include <QtCore/QTimer>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
@@ -29,7 +30,8 @@ static inline std::string createRoomNumberString(int roomNumber)
|
|||||||
}
|
}
|
||||||
|
|
||||||
CommunicationInterfaceInternal::CommunicationInterfaceInternal(VCtrl::ViewerInterface* pviewerInterface)
|
CommunicationInterfaceInternal::CommunicationInterfaceInternal(VCtrl::ViewerInterface* pviewerInterface)
|
||||||
: m_pviewerInterface(pviewerInterface)
|
: m_pviewerInterface(pviewerInterface),
|
||||||
|
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("BuildingViewer.CommunicationInterfaceInternal"))
|
||||||
{
|
{
|
||||||
assert(m_pviewerInterface);
|
assert(m_pviewerInterface);
|
||||||
}
|
}
|
||||||
@@ -203,10 +205,10 @@ void CommunicationInterfaceInternal::setTeamConfiguration(const QMap<qint32, Par
|
|||||||
for (const ParticipantManagement::Party& party : parties)
|
for (const ParticipantManagement::Party& party : parties)
|
||||||
{
|
{
|
||||||
BdvParty bdvParty;
|
BdvParty bdvParty;
|
||||||
bdvParty.id = party.id();
|
bdvParty.id = party.id;
|
||||||
bdvParty.name = ParticipantManagement::trPartyName(party.name());
|
bdvParty.name = ParticipantManagement::trPartyName(party.name);
|
||||||
|
|
||||||
const uint32_t argb = party.color();
|
const uint32_t argb = party.color;
|
||||||
bdvParty.color.w = (((argb >> 24) & 0xff) / 255.);
|
bdvParty.color.w = (((argb >> 24) & 0xff) / 255.);
|
||||||
bdvParty.color.x = (((argb >> 16) & 0xff) / 255.);
|
bdvParty.color.x = (((argb >> 16) & 0xff) / 255.);
|
||||||
bdvParty.color.y = (((argb >> 8) & 0xff) / 255.);
|
bdvParty.color.y = (((argb >> 8) & 0xff) / 255.);
|
||||||
@@ -256,9 +258,9 @@ void CommunicationInterfaceInternal::systemSetMountingPoint(const Infrastructure
|
|||||||
{
|
{
|
||||||
int buildingId = data.buildingId();
|
int buildingId = data.buildingId();
|
||||||
const QString& mountingPointName = filename;
|
const QString& mountingPointName = filename;
|
||||||
double x = data.relPosition().offsetX();
|
double x = data.relPosition().offsetX;
|
||||||
double y = data.relPosition().offsetY();
|
double y = data.relPosition().offsetY;
|
||||||
double z = data.relPosition().offsetZ();
|
double z = data.relPosition().offsetZ;
|
||||||
|
|
||||||
const std::string buildingIdStr = createBuildingIdString(buildingId);
|
const std::string buildingIdStr = createBuildingIdString(buildingId);
|
||||||
|
|
||||||
@@ -446,7 +448,8 @@ static inline bool isPlayerId(const std::string& playerIdString, int* playerId)
|
|||||||
const QString playerIdQString(QString::fromStdString(playerIdString));
|
const QString playerIdQString(QString::fromStdString(playerIdString));
|
||||||
bool bOk = false;
|
bool bOk = false;
|
||||||
if (playerIdQString.startsWith(QLatin1String(PLAYER_PREFIX)))
|
if (playerIdQString.startsWith(QLatin1String(PLAYER_PREFIX)))
|
||||||
*playerId = playerIdQString.midRef(QLatin1String(PLAYER_PREFIX).size()).toInt(&bOk);
|
// Qt6: QString::midRef removed; mid() returns the same substring by value.
|
||||||
|
*playerId = playerIdQString.mid(QLatin1String(PLAYER_PREFIX).size()).toInt(&bOk);
|
||||||
return bOk;
|
return bOk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#include <LtsAppManager/lts_app_manager.h>
|
#include <LtsAppManager/lts_app_manager.h>
|
||||||
#include <LtsPluginManager/lts_plugin_manager.h>
|
#include <LtsPluginManager/lts_plugin_manager.h>
|
||||||
#include <LtsSession/lts_session.h>
|
#include <LtsSession/lts_session.h>
|
||||||
|
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||||
#include <QtCore/QDir>
|
#include <QtCore/QDir>
|
||||||
#include <QtWidgets/QMessageBox>
|
#include <QtWidgets/QMessageBox>
|
||||||
#include <ngltools/ngltools_filesystem.h>
|
#include <ngltools/ngltools_filesystem.h>
|
||||||
@@ -22,7 +23,8 @@ static char* argv_dummy[] = {(char*)"Dummy"};
|
|||||||
|
|
||||||
BgViewerController::BgViewerController(QObject* parent)
|
BgViewerController::BgViewerController(QObject* parent)
|
||||||
: QObject(parent), m_mainloop(argc_dummy, argv_dummy, nullptr), m_widgetStolen(false), m_comIfc(nullptr),
|
: QObject(parent), m_mainloop(argc_dummy, argv_dummy, nullptr), m_widgetStolen(false), m_comIfc(nullptr),
|
||||||
m_pBgViewerDDSController(nullptr), m_bgvApp(nullptr), m_tickTimer(new QTimer(this))
|
m_pBgViewerDDSController(nullptr), m_bgvApp(nullptr), m_tickTimer(new QTimer(this)),
|
||||||
|
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("BuildingViewer.BgViewerController"))
|
||||||
{
|
{
|
||||||
m_tickTimer->setInterval(1000 / 25);
|
m_tickTimer->setInterval(1000 / 25);
|
||||||
connect(m_tickTimer, &QTimer::timeout, this, [this]() { m_mainloop.tick(); });
|
connect(m_tickTimer, &QTimer::timeout, this, [this]() { m_mainloop.tick(); });
|
||||||
|
|||||||
+164
-163
@@ -322,11 +322,11 @@ void BuildingViewerDdsController::uninitialize()
|
|||||||
|
|
||||||
QPointF BuildingViewerDdsController::toRelativePosition(const Core::GeoPosition& geoPos) const
|
QPointF BuildingViewerDdsController::toRelativePosition(const Core::GeoPosition& geoPos) const
|
||||||
{
|
{
|
||||||
if (std::isnan(geoPos.lon()) || std::isnan(geoPos.lat()) || qIsNull(geoPos.lon()) || qIsNull(geoPos.lat()))
|
if (std::isnan(geoPos.lon) || std::isnan(geoPos.lat) || qIsNull(geoPos.lon) || qIsNull(geoPos.lat))
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
LtsCoordTrans::UtmCoordinate coord(
|
LtsCoordTrans::UtmCoordinate coord(
|
||||||
LtsCoordTrans::UtmCoordinate::fromGeographic(geoPos.lon(), geoPos.lat(), m_baseCoordinate.zone));
|
LtsCoordTrans::UtmCoordinate::fromGeographic(geoPos.lon, geoPos.lat, m_baseCoordinate.zone));
|
||||||
return coord.relativeTo(m_baseCoordinate);
|
return coord.relativeTo(m_baseCoordinate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,7 +335,7 @@ LtsUtils::QPoint3D BuildingViewerDdsController::toRelative3D(const Core::GeoPosi
|
|||||||
const auto ret = toRelativePosition(geoPos);
|
const auto ret = toRelativePosition(geoPos);
|
||||||
if (ret.isNull())
|
if (ret.isNull())
|
||||||
return {};
|
return {};
|
||||||
return LtsUtils::QPoint3D(ret.x(), ret.y(), geoPos.z());
|
return LtsUtils::QPoint3D(ret.x(), ret.y(), geoPos.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BuildingViewerDdsController::clear()
|
bool BuildingViewerDdsController::clear()
|
||||||
@@ -371,12 +371,12 @@ bool BuildingViewerDdsController::calcBaseCoordinate(
|
|||||||
if (!bAtLeasOneFound)
|
if (!bAtLeasOneFound)
|
||||||
{
|
{
|
||||||
bAtLeasOneFound = true;
|
bAtLeasOneFound = true;
|
||||||
geoPosition = mse.geoPosition();
|
geoPosition = mse.geoPosition;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
geoPosition.lat() = std::min(geoPosition.lat(), mse.geoPosition().lat());
|
geoPosition.lat = std::min(geoPosition.lat, mse.geoPosition.lat);
|
||||||
geoPosition.lon() = std::min(geoPosition.lon(), mse.geoPosition().lon());
|
geoPosition.lon = std::min(geoPosition.lon, mse.geoPosition.lon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!bAtLeasOneFound)
|
if (!bAtLeasOneFound)
|
||||||
@@ -384,7 +384,7 @@ bool BuildingViewerDdsController::calcBaseCoordinate(
|
|||||||
WARNING_LOG(m_logger) << "No building available in exercise " << m_exerciseId;
|
WARNING_LOG(m_logger) << "No building available in exercise " << m_exerciseId;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_baseCoordinate = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPosition.lon(), geoPosition.lat());
|
m_baseCoordinate = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPosition.lon, geoPosition.lat);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,11 +422,11 @@ bool BuildingViewerDdsController::writeBuildingDataToXML(const QString& modelPat
|
|||||||
const auto bi = BuildingInfo::fromJson(ele.toObject());
|
const auto bi = BuildingInfo::fromJson(ele.toObject());
|
||||||
if (!bi.isValid())
|
if (!bi.isValid())
|
||||||
continue;
|
continue;
|
||||||
mse.id(bi.id);
|
mse.id = bi.id;
|
||||||
mse.angle(bi.angleDegree);
|
mse.angle = bi.angleDegree;
|
||||||
mse.geoPosition(Core::GeoPosition(bi.position.x(), bi.position.y(), bi.position.z()));
|
mse.geoPosition = Core::GeoPosition(bi.position.x(), bi.position.y(), bi.position.z());
|
||||||
mse.name(bi.name.toStdString());
|
mse.name = bi.name.toStdString();
|
||||||
mseMap.insert(mse.id(), mse);
|
mseMap.insert(mse.id, mse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -435,17 +435,17 @@ bool BuildingViewerDdsController::writeBuildingDataToXML(const QString& modelPat
|
|||||||
const auto mMap = m_ismDtc->mainStructureElements();
|
const auto mMap = m_ismDtc->mainStructureElements();
|
||||||
for (const auto& mse : mMap)
|
for (const auto& mse : mMap)
|
||||||
{
|
{
|
||||||
if (mse.modelId() == 0)
|
if (mse.modelId == 0)
|
||||||
continue;
|
continue;
|
||||||
if (!m_ismDtc->isElementAssignedToExercise(mse, m_exerciseId))
|
if (!m_ismDtc->isElementAssignedToExercise(mse, m_exerciseId))
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger)
|
DEBUG_LOG(m_logger)
|
||||||
<< "Not writing mse with id " << mse.id()
|
<< "Not writing mse with id " << mse.id
|
||||||
<< " to building xml file since it is not assigned to the current exercise which has id "
|
<< " to building xml file since it is not assigned to the current exercise which has id "
|
||||||
<< m_exerciseId;
|
<< m_exerciseId;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
mseMap.insert(mse.id(), mse);
|
mseMap.insert(mse.id, mse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
INFO_LOG(m_logger) << getSessionInfo()
|
INFO_LOG(m_logger) << getSessionInfo()
|
||||||
@@ -460,7 +460,7 @@ bool BuildingViewerDdsController::writeBuildingDataToXML(const QString& modelPat
|
|||||||
QXmlStreamWriter sw(&f);
|
QXmlStreamWriter sw(&f);
|
||||||
sw.setAutoFormatting(true);
|
sw.setAutoFormatting(true);
|
||||||
sw.setAutoFormattingIndent(2);
|
sw.setAutoFormattingIndent(2);
|
||||||
sw.setCodec("UTF-8");
|
// Qt6: QXmlStreamWriter::setCodec removed; it writes UTF-8 by default.
|
||||||
sw.writeStartDocument(QStringLiteral("1.0"), true);
|
sw.writeStartDocument(QStringLiteral("1.0"), true);
|
||||||
sw.writeStartElement(QStringLiteral("MetaData"));
|
sw.writeStartElement(QStringLiteral("MetaData"));
|
||||||
{
|
{
|
||||||
@@ -478,28 +478,28 @@ bool BuildingViewerDdsController::writeBuildingDataToXML(const QString& modelPat
|
|||||||
|
|
||||||
for (const InfrastructureManagement::MainStructureElement& mse : std::as_const(mseMap))
|
for (const InfrastructureManagement::MainStructureElement& mse : std::as_const(mseMap))
|
||||||
{
|
{
|
||||||
m_knownBuildings += mse.id();
|
m_knownBuildings += mse.id;
|
||||||
|
|
||||||
sw.writeStartElement(QStringLiteral("Model"));
|
sw.writeStartElement(QStringLiteral("Model"));
|
||||||
sw.writeAttribute(QStringLiteral("Type"), QStringLiteral("House"));
|
sw.writeAttribute(QStringLiteral("Type"), QStringLiteral("House"));
|
||||||
{
|
{
|
||||||
const QString name(QString::fromStdString(mse.name()));
|
const QString name(QString::fromStdString(mse.name));
|
||||||
sw.writeStartElement(QStringLiteral("Description"));
|
sw.writeStartElement(QStringLiteral("Description"));
|
||||||
sw.writeAttribute(QStringLiteral("Name"), name);
|
sw.writeAttribute(QStringLiteral("Name"), name);
|
||||||
sw.writeEndElement();
|
sw.writeEndElement();
|
||||||
sw.writeStartElement(QStringLiteral("Feature"));
|
sw.writeStartElement(QStringLiteral("Feature"));
|
||||||
sw.writeAttribute(QStringLiteral("Id"), BuildingViewer::databaseId2FeatureId(mse.id()));
|
sw.writeAttribute(QStringLiteral("Id"), BuildingViewer::databaseId2FeatureId(mse.id));
|
||||||
sw.writeEndElement();
|
sw.writeEndElement();
|
||||||
sw.writeStartElement(QStringLiteral("Orientation"));
|
sw.writeStartElement(QStringLiteral("Orientation"));
|
||||||
|
|
||||||
sw.writeAttribute(QStringLiteral("Angle"), QString::number(360 - mse.angle()));
|
sw.writeAttribute(QStringLiteral("Angle"), QString::number(360 - mse.angle));
|
||||||
sw.writeEndElement();
|
sw.writeEndElement();
|
||||||
|
|
||||||
const QPointF offset(toRelativePosition(mse.geoPosition()));
|
const QPointF offset(toRelativePosition(mse.geoPosition));
|
||||||
sw.writeStartElement(QStringLiteral("Position"));
|
sw.writeStartElement(QStringLiteral("Position"));
|
||||||
sw.writeAttribute(QStringLiteral("X"), QString::number(offset.x(), 'f', 13));
|
sw.writeAttribute(QStringLiteral("X"), QString::number(offset.x(), 'f', 13));
|
||||||
sw.writeAttribute(QStringLiteral("Y"), QString::number(offset.y(), 'f', 13));
|
sw.writeAttribute(QStringLiteral("Y"), QString::number(offset.y(), 'f', 13));
|
||||||
sw.writeAttribute(QStringLiteral("Z"), QString::number(mse.geoPosition().z(), 'f', 13));
|
sw.writeAttribute(QStringLiteral("Z"), QString::number(mse.geoPosition.z, 'f', 13));
|
||||||
sw.writeEndElement();
|
sw.writeEndElement();
|
||||||
sw.writeStartElement(QStringLiteral("File"));
|
sw.writeStartElement(QStringLiteral("File"));
|
||||||
sw.writeAttribute(QStringLiteral("Name"), name + QStringLiteral(".flt"));
|
sw.writeAttribute(QStringLiteral("Name"), name + QStringLiteral(".flt"));
|
||||||
@@ -552,7 +552,7 @@ void BuildingViewerDdsController::onReplayChanged(const SituationReplay::SitRepl
|
|||||||
{
|
{
|
||||||
Q_UNUSED(modType)
|
Q_UNUSED(modType)
|
||||||
|
|
||||||
switch (srp.state())
|
switch (srp.state)
|
||||||
{
|
{
|
||||||
case SituationReplay::SrpState::Stopped:
|
case SituationReplay::SrpState::Stopped:
|
||||||
m_connection->setSimuationPace(1.0);
|
m_connection->setSimuationPace(1.0);
|
||||||
@@ -560,7 +560,7 @@ void BuildingViewerDdsController::onReplayChanged(const SituationReplay::SitRepl
|
|||||||
break;
|
break;
|
||||||
case SituationReplay::SrpState::Started:
|
case SituationReplay::SrpState::Started:
|
||||||
case SituationReplay::SrpState::Resumed:
|
case SituationReplay::SrpState::Resumed:
|
||||||
m_connection->setSimuationPace(srp.pace());
|
m_connection->setSimuationPace(srp.pace);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case SituationReplay::SrpState::Paused:
|
case SituationReplay::SrpState::Paused:
|
||||||
@@ -629,7 +629,7 @@ void BuildingViewerDdsController::handleMountingPoint(const InfrastructureManage
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector3D position(mp.relPosition().offsetX(), mp.relPosition().offsetY(), mp.relPosition().offsetZ());
|
QVector3D position(mp.relPosition().offsetX, mp.relPosition().offsetY, mp.relPosition().offsetZ);
|
||||||
QString strfeatureID = BuildingViewer::databaseId2FeatureId(mp.buildingId());
|
QString strfeatureID = BuildingViewer::databaseId2FeatureId(mp.buildingId());
|
||||||
QString strMountingPointID = strfeatureID + QStringLiteral("_MountingPoint_") + QString::number(mountingPointId);
|
QString strMountingPointID = strfeatureID + QStringLiteral("_MountingPoint_") + QString::number(mountingPointId);
|
||||||
|
|
||||||
@@ -712,7 +712,7 @@ void BuildingViewerDdsController::setCurrentTrainingAreaMap(const QString& model
|
|||||||
|
|
||||||
bool BuildingViewerDdsController::isValidParticipant(const ParticipantManagement::Participant& participant) const
|
bool BuildingViewerDdsController::isValidParticipant(const ParticipantManagement::Participant& participant) const
|
||||||
{
|
{
|
||||||
if (participant.id() == 0)
|
if (participant.id == 0)
|
||||||
{
|
{
|
||||||
if (m_logger.isDebugEnabled())
|
if (m_logger.isDebugEnabled())
|
||||||
DEBUG_LOG(m_logger) << getSessionInfo()
|
DEBUG_LOG(m_logger) << getSessionInfo()
|
||||||
@@ -720,32 +720,32 @@ bool BuildingViewerDdsController::isValidParticipant(const ParticipantManagement
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (participant.isDeleted())
|
if (participant.isDeleted)
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << getSessionInfo() << "isValidParticipant: Not handling participant with id "
|
DEBUG_LOG(m_logger) << getSessionInfo() << "isValidParticipant: Not handling participant with id "
|
||||||
<< participant.id() << " since it is marked as 'deleted'";
|
<< participant.id << " since it is marked as 'deleted'";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_session == nullptr)
|
if (m_session == nullptr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!m_session->isVisibleParty(participant.partyId()))
|
if (!m_session->isVisibleParty(participant.partyId))
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << getSessionInfo() << "isValidParticipant: Not handling participant with id "
|
DEBUG_LOG(m_logger) << getSessionInfo() << "isValidParticipant: Not handling participant with id "
|
||||||
<< participant.id() << " since it is not visible for party with id "
|
<< participant.id << " since it is not visible for party with id "
|
||||||
<< participant.partyId();
|
<< participant.partyId;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_ppmDtc)
|
if (!m_ppmDtc)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
ParticipantManagement::TypeClass tc = m_ppmDtc->type(participant.typeId()).typeClass();
|
ParticipantManagement::TypeClass tc = m_ppmDtc->type(participant.typeId).typeClass;
|
||||||
if (tc == ParticipantManagement::TypeClass::SupportUnit || tc == ParticipantManagement::TypeClass::Unit)
|
if (tc == ParticipantManagement::TypeClass::SupportUnit || tc == ParticipantManagement::TypeClass::Unit)
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << getSessionInfo() << "isValidParticipant: Not handling participant with id "
|
DEBUG_LOG(m_logger) << getSessionInfo() << "isValidParticipant: Not handling participant with id "
|
||||||
<< participant.id() << " since its type is 'SupportUnit', 'Unit' or 'Structure'";
|
<< participant.id << " since its type is 'SupportUnit', 'Unit' or 'Structure'";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -787,7 +787,7 @@ void BuildingViewerDdsController::createParticipants()
|
|||||||
auto cb = [this, &positionMap, sizeL](const ParticipantManagement::Participant& part) {
|
auto cb = [this, &positionMap, sizeL](const ParticipantManagement::Participant& part) {
|
||||||
if (!isValidParticipant(part))
|
if (!isValidParticipant(part))
|
||||||
return;
|
return;
|
||||||
createParticipant(part, positionMap.value(part.id()), sizeL);
|
createParticipant(part, positionMap.value(part.id), sizeL);
|
||||||
};
|
};
|
||||||
m_ppmDtc->participants(cb);
|
m_ppmDtc->participants(cb);
|
||||||
|
|
||||||
@@ -826,7 +826,7 @@ void BuildingViewerDdsController::onBoobyTrapChanged(const AreaEffectSimulation:
|
|||||||
switch (modType)
|
switch (modType)
|
||||||
{
|
{
|
||||||
case DataModification::eModified:
|
case DataModification::eModified:
|
||||||
deleteParticipant(990000 + boobyTrap.id());
|
deleteParticipant(990000 + boobyTrap.id);
|
||||||
Q_FALLTHROUGH();
|
Q_FALLTHROUGH();
|
||||||
case DataModification::eAdded: {
|
case DataModification::eAdded: {
|
||||||
int sizeL = LtsUtils::OperatorSettings::getInstance()
|
int sizeL = LtsUtils::OperatorSettings::getInstance()
|
||||||
@@ -836,7 +836,7 @@ void BuildingViewerDdsController::onBoobyTrapChanged(const AreaEffectSimulation:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DataModification::eRemoved: {
|
case DataModification::eRemoved: {
|
||||||
deleteParticipant(990000 + boobyTrap.id());
|
deleteParticipant(990000 + boobyTrap.id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -851,17 +851,17 @@ void BuildingViewerDdsController::onParticipantChanged(const ParticipantManageme
|
|||||||
switch (modType)
|
switch (modType)
|
||||||
{
|
{
|
||||||
case DataModification::eModified:
|
case DataModification::eModified:
|
||||||
deleteParticipant(participant.id());
|
deleteParticipant(participant.id);
|
||||||
Q_FALLTHROUGH();
|
Q_FALLTHROUGH();
|
||||||
case DataModification::eAdded: {
|
case DataModification::eAdded: {
|
||||||
int sizeL = LtsUtils::OperatorSettings::getInstance()
|
int sizeL = LtsUtils::OperatorSettings::getInstance()
|
||||||
->value(QStringLiteral("BgViewer"), QStringLiteral("PlayerSymbolSize"), 20)
|
->value(QStringLiteral("BgViewer"), QStringLiteral("PlayerSymbolSize"), 20)
|
||||||
.toInt();
|
.toInt();
|
||||||
createParticipant(participant, m_ppmDtc->participantPosition(participant.id()), sizeL);
|
createParticipant(participant, m_ppmDtc->participantPosition(participant.id), sizeL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DataModification::eRemoved: {
|
case DataModification::eRemoved: {
|
||||||
deleteParticipant(participant.id());
|
deleteParticipant(participant.id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -878,8 +878,8 @@ void BuildingViewerDdsController::onDynParticipantChanged(const ParticipantManag
|
|||||||
case DataModification::eAdded:
|
case DataModification::eAdded:
|
||||||
case DataModification::eModified:
|
case DataModification::eModified:
|
||||||
if (m_ppmDtc)
|
if (m_ppmDtc)
|
||||||
createParticipant(m_ppmDtc->participant(data.participantId()),
|
createParticipant(m_ppmDtc->participant(data.participantId),
|
||||||
m_ppmDtc->participantPosition(data.participantId()), sizeL);
|
m_ppmDtc->participantPosition(data.participantId), sizeL);
|
||||||
break;
|
break;
|
||||||
case DataModification::eRemoved: {
|
case DataModification::eRemoved: {
|
||||||
break;
|
break;
|
||||||
@@ -890,12 +890,12 @@ void BuildingViewerDdsController::onDynParticipantChanged(const ParticipantManag
|
|||||||
void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManagement::HitLineInfo& hli,
|
void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManagement::HitLineInfo& hli,
|
||||||
DataModification modType)
|
DataModification modType)
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << "X 0000 onHitLineInfoChanged id=" << hli.id();
|
DEBUG_LOG(m_logger) << "X 0000 onHitLineInfoChanged id=" << hli.id;
|
||||||
|
|
||||||
if (modType == DataModification::eRemoved)
|
if (modType == DataModification::eRemoved)
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << "onHitLineInfoChanged removeHit id=" << hli.id();
|
DEBUG_LOG(m_logger) << "onHitLineInfoChanged removeHit id=" << hli.id;
|
||||||
m_connection->removeRoomHit(hli.id());
|
m_connection->removeRoomHit(hli.id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -903,24 +903,24 @@ void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManageme
|
|||||||
return;
|
return;
|
||||||
m_ppmDtc->waitForHistoricalDataParticipant();
|
m_ppmDtc->waitForHistoricalDataParticipant();
|
||||||
|
|
||||||
const ParticipantManagement::Participant& partSrc = m_ppmDtc->participant(hli.originatorParticipantId());
|
const ParticipantManagement::Participant& partSrc = m_ppmDtc->participant(hli.originatorParticipantId);
|
||||||
const ParticipantManagement::Participant& partDst = m_ppmDtc->participant(hli.injuryParticipantId());
|
const ParticipantManagement::Participant& partDst = m_ppmDtc->participant(hli.injuryParticipantId);
|
||||||
if (partSrc.id() == 0 || partDst.id() == 0)
|
if (partSrc.id == 0 || partDst.id == 0)
|
||||||
{
|
{
|
||||||
ERROR_LOG(m_logger) << "no knownn part: " << partSrc.id() << " dst: " << partDst.id();
|
ERROR_LOG(m_logger) << "no knownn part: " << partSrc.id << " dst: " << partDst.id;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString& strFeatureID = BuildingViewer::databaseId2FeatureId(hli.injuryBuildingId());
|
const QString& strFeatureID = BuildingViewer::databaseId2FeatureId(hli.injuryBuildingId);
|
||||||
if (!m_viewerInterface->isViewOpen(strFeatureID.toStdString()))
|
if (!m_viewerInterface->isViewOpen(strFeatureID.toStdString()))
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << "building not opened: hli.buildingId()=" << hli;
|
DEBUG_LOG(m_logger) << "building not opened: hli.buildingId()=" << hli;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hli.injuryBuildingId() != 0)
|
if (hli.injuryBuildingId != 0)
|
||||||
{
|
{
|
||||||
auto itBuildingHit = m_buildingHits.constFind(hli.injuryBuildingId());
|
auto itBuildingHit = m_buildingHits.constFind(hli.injuryBuildingId);
|
||||||
if (itBuildingHit != m_buildingHits.constEnd())
|
if (itBuildingHit != m_buildingHits.constEnd())
|
||||||
{
|
{
|
||||||
const QVector<BuildingHit>& bHits = itBuildingHit.value();
|
const QVector<BuildingHit>& bHits = itBuildingHit.value();
|
||||||
@@ -929,14 +929,14 @@ void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManageme
|
|||||||
for (const BuildingHit& bh : bHits)
|
for (const BuildingHit& bh : bHits)
|
||||||
{
|
{
|
||||||
|
|
||||||
const bool testFlag = (bh.chargeTypeId == hli.chargeTypeId() &&
|
const bool testFlag = (bh.chargeTypeId == hli.chargeTypeId &&
|
||||||
bh.originatorParticipantId == hli.originatorParticipantId() &&
|
bh.originatorParticipantId == hli.originatorParticipantId &&
|
||||||
hli.sampleTime() - m_hitlineDuration_ms < bh.sampleTime);
|
hli.sampleTime - m_hitlineDuration_ms < bh.sampleTime);
|
||||||
DEBUG_LOG(m_logger) << "testFlag " << testFlag;
|
DEBUG_LOG(m_logger) << "testFlag " << testFlag;
|
||||||
|
|
||||||
if (bh.chargeTypeId == hli.chargeTypeId() &&
|
if (bh.chargeTypeId == hli.chargeTypeId &&
|
||||||
bh.originatorParticipantId == hli.originatorParticipantId() &&
|
bh.originatorParticipantId == hli.originatorParticipantId &&
|
||||||
hli.sampleTime() - m_hitlineDuration_ms < bh.sampleTime)
|
hli.sampleTime - m_hitlineDuration_ms < bh.sampleTime)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -950,32 +950,32 @@ void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManageme
|
|||||||
DEBUG_LOG(m_logger) << "onHitLineInfoChanged createPlayerSymbols";
|
DEBUG_LOG(m_logger) << "onHitLineInfoChanged createPlayerSymbols";
|
||||||
createPlayerSymbols(partDst, sizeL);
|
createPlayerSymbols(partDst, sizeL);
|
||||||
|
|
||||||
LtsUtils::QPoint3D originatorSrc = toRelative3D(hli.originatorPos());
|
LtsUtils::QPoint3D originatorSrc = toRelative3D(hli.originatorPos);
|
||||||
LtsUtils::QPoint3D injuryDest = toRelative3D(hli.injuryPos());
|
LtsUtils::QPoint3D injuryDest = toRelative3D(hli.injuryPos);
|
||||||
|
|
||||||
DEBUG_LOG(m_logger) << "onHitLineInfoChanged playerHit"
|
DEBUG_LOG(m_logger) << "onHitLineInfoChanged playerHit"
|
||||||
<< " hli.originatorPos() z=" << hli.originatorPos().z()
|
<< " hli.originatorPos() z=" << hli.originatorPos.z
|
||||||
<< " hli.injuryPos() z=" << hli.injuryPos().z() << " Src=" << originatorSrc.x() << "/"
|
<< " hli.injuryPos() z=" << hli.injuryPos.z << " Src=" << originatorSrc.x() << "/"
|
||||||
<< originatorSrc.y() << "/" << originatorSrc.z() << " Dest= " << injuryDest.x() << "/"
|
<< originatorSrc.y() << "/" << originatorSrc.z() << " Dest= " << injuryDest.x() << "/"
|
||||||
<< injuryDest.y() << "/" << injuryDest.z()
|
<< injuryDest.y() << "/" << injuryDest.z()
|
||||||
<< " hli.originatorBuildingId=" << hli.originatorBuildingId()
|
<< " hli.originatorBuildingId=" << hli.originatorBuildingId
|
||||||
<< " hli.originatorRoomId=" << hli.originatorRoomId()
|
<< " hli.originatorRoomId=" << hli.originatorRoomId
|
||||||
<< " hli.injuryBuildingId=" << hli.injuryBuildingId()
|
<< " hli.injuryBuildingId=" << hli.injuryBuildingId
|
||||||
<< " hli.injuryRoomId=" << hli.injuryRoomId();
|
<< " hli.injuryRoomId=" << hli.injuryRoomId;
|
||||||
|
|
||||||
DEBUG_LOG(m_logger) << "Before z-correction:"
|
DEBUG_LOG(m_logger) << "Before z-correction:"
|
||||||
<< " Src=" << originatorSrc.x() << "/" << originatorSrc.y() << "/" << originatorSrc.z()
|
<< " Src=" << originatorSrc.x() << "/" << originatorSrc.y() << "/" << originatorSrc.z()
|
||||||
<< " Dest= " << injuryDest.x() << "/" << injuryDest.y() << "/" << injuryDest.z();
|
<< " Dest= " << injuryDest.x() << "/" << injuryDest.y() << "/" << injuryDest.z();
|
||||||
|
|
||||||
double zAddOriginator = m_buildingHeight.value(hli.originatorBuildingId(), 0);
|
double zAddOriginator = m_buildingHeight.value(hli.originatorBuildingId, 0);
|
||||||
double zAddInjury = m_buildingHeight.value(hli.injuryBuildingId(), 0);
|
double zAddInjury = m_buildingHeight.value(hli.injuryBuildingId, 0);
|
||||||
DEBUG_LOG(m_logger) << "z-correction: zAddOriginator=" << zAddOriginator;
|
DEBUG_LOG(m_logger) << "z-correction: zAddOriginator=" << zAddOriginator;
|
||||||
DEBUG_LOG(m_logger) << "z-correction: zAddInjury=" << zAddInjury;
|
DEBUG_LOG(m_logger) << "z-correction: zAddInjury=" << zAddInjury;
|
||||||
|
|
||||||
if (hli.originatorBuildingId() <= 0)
|
if (hli.originatorBuildingId <= 0)
|
||||||
zAddOriginator = zAddInjury;
|
zAddOriginator = zAddInjury;
|
||||||
|
|
||||||
if (hli.injuryBuildingId() <= 0)
|
if (hli.injuryBuildingId <= 0)
|
||||||
zAddInjury = zAddOriginator;
|
zAddInjury = zAddOriginator;
|
||||||
|
|
||||||
originatorSrc.setZ(originatorSrc.z() + zAddInjury);
|
originatorSrc.setZ(originatorSrc.z() + zAddInjury);
|
||||||
@@ -988,54 +988,55 @@ void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManageme
|
|||||||
int buildingIdSrc = -1;
|
int buildingIdSrc = -1;
|
||||||
int roomNumberSrc = -1;
|
int roomNumberSrc = -1;
|
||||||
{
|
{
|
||||||
auto itId2Number = m_roomId2RoomNumber.constFind(hli.originatorBuildingId());
|
auto itId2Number = m_roomId2RoomNumber.constFind(hli.originatorBuildingId);
|
||||||
if (itId2Number != m_roomId2RoomNumber.constEnd())
|
if (itId2Number != m_roomId2RoomNumber.constEnd())
|
||||||
{
|
{
|
||||||
const auto& mapRooms = itId2Number.value();
|
const auto& mapRooms = itId2Number.value();
|
||||||
const auto itRoom = mapRooms.constFind(hli.originatorRoomId());
|
const auto itRoom = mapRooms.constFind(hli.originatorRoomId);
|
||||||
if (itRoom != mapRooms.constEnd())
|
if (itRoom != mapRooms.constEnd())
|
||||||
{
|
{
|
||||||
buildingIdSrc = hli.originatorBuildingId();
|
buildingIdSrc = hli.originatorBuildingId;
|
||||||
roomNumberSrc = itRoom.value();
|
roomNumberSrc = itRoom.value();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
WARNING_LOG(m_logger) << "onHitLineInfoChanged: Room id can not be mapped! Building id: "
|
WARNING_LOG(m_logger) << "onHitLineInfoChanged: Room id can not be mapped! Building id: "
|
||||||
<< hli.injuryBuildingId() << ", originatorRoomId: " << hli.originatorRoomId();
|
<< hli.injuryBuildingId << ", originatorRoomId: " << hli.originatorRoomId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int buildingIdDst = -1;
|
int buildingIdDst = -1;
|
||||||
int roomNumberDst = -1;
|
int roomNumberDst = -1;
|
||||||
{
|
{
|
||||||
auto itId2Number = m_roomId2RoomNumber.constFind(hli.injuryBuildingId());
|
auto itId2Number = m_roomId2RoomNumber.constFind(hli.injuryBuildingId);
|
||||||
if (itId2Number != m_roomId2RoomNumber.constEnd())
|
if (itId2Number != m_roomId2RoomNumber.constEnd())
|
||||||
{
|
{
|
||||||
const auto& mapRooms = itId2Number.value();
|
const auto& mapRooms = itId2Number.value();
|
||||||
const auto itRoom = mapRooms.constFind(hli.injuryRoomId());
|
const auto itRoom = mapRooms.constFind(hli.injuryRoomId);
|
||||||
if (itRoom != mapRooms.constEnd())
|
if (itRoom != mapRooms.constEnd())
|
||||||
{
|
{
|
||||||
buildingIdDst = hli.injuryBuildingId();
|
buildingIdDst = hli.injuryBuildingId;
|
||||||
roomNumberDst = itRoom.value();
|
roomNumberDst = itRoom.value();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
WARNING_LOG(m_logger) << "onHitLineInfoChanged: Room id can not be mapped! Building id: "
|
WARNING_LOG(m_logger) << "onHitLineInfoChanged: Room id can not be mapped! Building id: "
|
||||||
<< hli.injuryBuildingId() << ", room id: " << hli.injuryRoomId();
|
<< hli.injuryBuildingId << ", room id: " << hli.injuryRoomId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_LOG(m_logger) << "After translate buildingId, roomId:"
|
DEBUG_LOG(m_logger) << "After translate buildingId, roomId:"
|
||||||
<< " hli.originatorBuildingId=" << hli.originatorBuildingId() << " -> " << buildingIdSrc
|
<< " hli.originatorBuildingId=" << hli.originatorBuildingId << " -> " << buildingIdSrc
|
||||||
<< " hli.originatorRoomId=" << hli.originatorRoomId() << " -> " << roomNumberSrc
|
<< " hli.originatorRoomId=" << hli.originatorRoomId << " -> " << roomNumberSrc
|
||||||
<< " hli.injuryBuildingId=" << hli.injuryBuildingId() << " -> " << buildingIdDst
|
<< " hli.injuryBuildingId=" << hli.injuryBuildingId << " -> " << buildingIdDst
|
||||||
<< " hli.injuryRoomId=" << hli.injuryBuildingId() << " -> " << roomNumberDst
|
<< " hli.injuryRoomId=" << hli.injuryBuildingId << " -> " << roomNumberDst
|
||||||
<< " hli.sampleTime=" << hli.sampleTime();
|
<< " hli.sampleTime=" << hli.sampleTime;
|
||||||
int lineType = 2;
|
int lineType = 2;
|
||||||
m_pdmDtc->chargeType(hli.chargeTypeId());
|
m_pdmDtc->chargeType(hli.chargeTypeId);
|
||||||
|
|
||||||
lineType = m_pdmDtc->getChargeTypeSpecialProperty(hli.chargeTypeId(), 0, 0);
|
// DDS enums are enum class; lineType is int.
|
||||||
|
lineType = static_cast<int>(m_pdmDtc->getChargeTypeSpecialProperty(hli.chargeTypeId, 0, 0));
|
||||||
|
|
||||||
m_connection->playerHit(hli.id(), partSrc.id(), partDst.id(), originatorSrc, injuryDest, buildingIdSrc,
|
m_connection->playerHit(hli.id, partSrc.id, partDst.id, originatorSrc, injuryDest, buildingIdSrc,
|
||||||
roomNumberSrc, buildingIdDst, roomNumberDst, lineType, hli.sampleTime());
|
roomNumberSrc, buildingIdDst, roomNumberDst, lineType, hli.sampleTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildingViewerDdsController::onPartyChanged(const ParticipantManagement::Party& party, DataModification modType)
|
void BuildingViewerDdsController::onPartyChanged(const ParticipantManagement::Party& party, DataModification modType)
|
||||||
@@ -1046,7 +1047,7 @@ void BuildingViewerDdsController::onPartyChanged(const ParticipantManagement::Pa
|
|||||||
int sizeL = LtsUtils::OperatorSettings::getInstance()
|
int sizeL = LtsUtils::OperatorSettings::getInstance()
|
||||||
->value(QStringLiteral("BgViewer"), QStringLiteral("PlayerSymbolSize"), 20)
|
->value(QStringLiteral("BgViewer"), QStringLiteral("PlayerSymbolSize"), 20)
|
||||||
.toInt();
|
.toInt();
|
||||||
updatePlayerSymbols(sizeL, party.id());
|
updatePlayerSymbols(sizeL, party.id);
|
||||||
syncTeams();
|
syncTeams();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1063,35 +1064,35 @@ void BuildingViewerDdsController::onPositionChanged(const ParticipantManagement:
|
|||||||
|
|
||||||
int buildingID = -1;
|
int buildingID = -1;
|
||||||
int roomNumber = -1;
|
int roomNumber = -1;
|
||||||
auto itId2Number = m_roomId2RoomNumber.constFind(position.buildingId());
|
auto itId2Number = m_roomId2RoomNumber.constFind(position.buildingId);
|
||||||
if (itId2Number != m_roomId2RoomNumber.constEnd())
|
if (itId2Number != m_roomId2RoomNumber.constEnd())
|
||||||
{
|
{
|
||||||
const auto& mapRooms = itId2Number.value();
|
const auto& mapRooms = itId2Number.value();
|
||||||
const auto itRoom = mapRooms.constFind(position.roomId());
|
const auto itRoom = mapRooms.constFind(position.roomId);
|
||||||
if (itRoom != mapRooms.constEnd())
|
if (itRoom != mapRooms.constEnd())
|
||||||
{
|
{
|
||||||
buildingID = position.buildingId();
|
buildingID = position.buildingId;
|
||||||
roomNumber = itRoom.value();
|
roomNumber = itRoom.value();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WARNING_LOG(m_logger) << "onPositionChanged: Room id can not be mapped! Building id: "
|
WARNING_LOG(m_logger) << "onPositionChanged: Room id can not be mapped! Building id: "
|
||||||
<< position.buildingId() << ", room id: " << position.roomId();
|
<< position.buildingId << ", room id: " << position.roomId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((roomNumber < 0) && (buildingID <= 0) && (position.buildingId() > 0) &&
|
if ((roomNumber < 0) && (buildingID <= 0) && (position.buildingId > 0) &&
|
||||||
(position.reportingSource() == Core::PositionReportingSource::Ops ||
|
(position.reportingSource == Core::PositionReportingSource::Ops ||
|
||||||
position.reportingSource() == Core::PositionReportingSource::Wls))
|
position.reportingSource == Core::PositionReportingSource::Wls))
|
||||||
{
|
{
|
||||||
buildingID = position.buildingId();
|
buildingID = position.buildingId;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int playerId = position.participantId();
|
const int playerId = position.participantId;
|
||||||
auto it = m_lastPositionTime.find(playerId);
|
auto it = m_lastPositionTime.find(playerId);
|
||||||
if (it == m_lastPositionTime.end())
|
if (it == m_lastPositionTime.end())
|
||||||
{
|
{
|
||||||
m_lastPositionTime.insert(playerId, position.sampleTime());
|
m_lastPositionTime.insert(playerId, position.sampleTime);
|
||||||
if (isOutdatedPosition(position))
|
if (isOutdatedPosition(position))
|
||||||
m_connection->setPlayerVisible(playerId, false);
|
m_connection->setPlayerVisible(playerId, false);
|
||||||
}
|
}
|
||||||
@@ -1099,7 +1100,7 @@ void BuildingViewerDdsController::onPositionChanged(const ParticipantManagement:
|
|||||||
{
|
{
|
||||||
if (isOutdatedPosition(it.value()) && !isOutdatedPosition(position))
|
if (isOutdatedPosition(it.value()) && !isOutdatedPosition(position))
|
||||||
m_connection->setPlayerVisible(playerId, true);
|
m_connection->setPlayerVisible(playerId, true);
|
||||||
it.value() = position.sampleTime();
|
it.value() = position.sampleTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buildingID <= 0 && roomNumber <= 0)
|
if (buildingID <= 0 && roomNumber <= 0)
|
||||||
@@ -1118,8 +1119,8 @@ void BuildingViewerDdsController::onPositionChanged(const ParticipantManagement:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_connection->playerPlace(position.participantId(), toRelative3D(position.pos()), buildingID, roomNumber,
|
m_connection->playerPlace(position.participantId, toRelative3D(position.pos), buildingID, roomNumber,
|
||||||
position.reportingSource());
|
position.reportingSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildingViewerDdsController::onParticipantGearEventChanged(const ParticipantManagement::ParticipantGearEvent& data,
|
void BuildingViewerDdsController::onParticipantGearEventChanged(const ParticipantManagement::ParticipantGearEvent& data,
|
||||||
@@ -1129,12 +1130,12 @@ void BuildingViewerDdsController::onParticipantGearEventChanged(const Participan
|
|||||||
{
|
{
|
||||||
case DataModification::eAdded:
|
case DataModification::eAdded:
|
||||||
case DataModification::eModified: {
|
case DataModification::eModified: {
|
||||||
m_participantGearEvents[data.participantId()] = data.sampleTime();
|
m_participantGearEvents[data.participantId] = data.sampleTime;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DataModification::eRemoved: {
|
case DataModification::eRemoved: {
|
||||||
|
|
||||||
const int playerId = data.participantId();
|
const int playerId = data.participantId;
|
||||||
m_participantGearEvents.remove(playerId);
|
m_participantGearEvents.remove(playerId);
|
||||||
m_connection->playerUpdatePlayerSymbol(playerId, buildPlayerSymbolFilePath(playerId, cColorSymbolId));
|
m_connection->playerUpdatePlayerSymbol(playerId, buildPlayerSymbolFilePath(playerId, cColorSymbolId));
|
||||||
break;
|
break;
|
||||||
@@ -1158,44 +1159,44 @@ void BuildingViewerDdsController::createParticipant(const ParticipantManagement:
|
|||||||
|
|
||||||
createPlayerSymbols(participant, sizeL);
|
createPlayerSymbols(participant, sizeL);
|
||||||
|
|
||||||
m_connection->playerCreate(participant.id(), participant.partyId(), buildPlayerSymbolFilePath(participant.id()),
|
m_connection->playerCreate(participant.id, participant.partyId, buildPlayerSymbolFilePath(participant.id),
|
||||||
toRelative3D(position.pos()), position.buildingId(),
|
toRelative3D(position.pos), position.buildingId,
|
||||||
m_roomId2RoomNumber.value(position.buildingId()).value(position.roomId()),
|
m_roomId2RoomNumber.value(position.buildingId).value(position.roomId),
|
||||||
position.reportingSource());
|
position.reportingSource);
|
||||||
|
|
||||||
const bool isOutdated = isOutdatedPosition(position);
|
const bool isOutdated = isOutdatedPosition(position);
|
||||||
const int participantId = participant.id();
|
const int participantId = participant.id;
|
||||||
const bool isValid =
|
const bool isValid =
|
||||||
(position.buildingId() > 0 && m_roomId2RoomNumber.value(position.buildingId()).value(position.roomId()) > 0);
|
(position.buildingId > 0 && m_roomId2RoomNumber.value(position.buildingId).value(position.roomId) > 0);
|
||||||
m_connection->setPlayerVisible(participantId, (!isOutdated && isValid));
|
m_connection->setPlayerVisible(participantId, (!isOutdated && isValid));
|
||||||
m_lastPositionTime.insert(participantId, position.sampleTime());
|
m_lastPositionTime.insert(participantId, position.sampleTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildingViewerDdsController::createBoobyTrap(const AreaEffectSimulation::BoobyTrap& trap, int sizeL)
|
void BuildingViewerDdsController::createBoobyTrap(const AreaEffectSimulation::BoobyTrap& trap, int sizeL)
|
||||||
{
|
{
|
||||||
if (trap.effectStateId() != AreaEffectSimulation::AesEffectState::EsActivated &&
|
if (trap.effectStateId != AreaEffectSimulation::AesEffectState::EsActivated &&
|
||||||
trap.effectStateId() != AreaEffectSimulation::AesEffectState::EsPrepared)
|
trap.effectStateId != AreaEffectSimulation::AesEffectState::EsPrepared)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ParticipantManagement::Participant participant;
|
ParticipantManagement::Participant participant;
|
||||||
if (trap.partyId().has_value())
|
if (trap.partyId.has_value())
|
||||||
participant.partyId() = trap.partyId().get();
|
participant.partyId = trap.partyId.get();
|
||||||
participant.designator() = trap.name();
|
participant.designator = trap.name;
|
||||||
participant.designator() = trap.name();
|
participant.designator = trap.name;
|
||||||
participant.id() = trap.id() + 990000;
|
participant.id = trap.id + 990000;
|
||||||
participant.sampleTime() = trap.sampleTime();
|
participant.sampleTime = trap.sampleTime;
|
||||||
participant.symbol() = "AP6D|CMPL|10011500002104000000";
|
participant.symbol = "AP6D|CMPL|10011500002104000000";
|
||||||
|
|
||||||
createPlayerSymbols(participant, sizeL);
|
createPlayerSymbols(participant, sizeL);
|
||||||
Core::GeoPosition pos;
|
Core::GeoPosition pos;
|
||||||
pos.lat() = trap.impactPosition().lat();
|
pos.lat = trap.impactPosition.lat;
|
||||||
pos.lon() = trap.impactPosition().lon();
|
pos.lon = trap.impactPosition.lon;
|
||||||
|
|
||||||
DEBUG_LOG(m_logger) << "Try create Booby trap with id " << trap.id() << " internal id " << participant.id();
|
DEBUG_LOG(m_logger) << "Try create Booby trap with id " << trap.id << " internal id " << participant.id;
|
||||||
DEBUG_LOG(m_logger) << "Try create Booby trap with pos " << pos.lat() << " " << pos.lon();
|
DEBUG_LOG(m_logger) << "Try create Booby trap with pos " << pos.lat << " " << pos.lon;
|
||||||
m_connection->playerCreate(participant.id(), participant.partyId(), buildPlayerSymbolFilePath(participant.id()),
|
m_connection->playerCreate(participant.id, participant.partyId, buildPlayerSymbolFilePath(participant.id),
|
||||||
toRelative3D(pos), -1, -1, Core::PositionReportingSource::External);
|
toRelative3D(pos), -1, -1, Core::PositionReportingSource::External);
|
||||||
m_connection->setPlayerVisible(participant.id(), true);
|
m_connection->setPlayerVisible(participant.id, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildingViewerDdsController::updatePlayerSymbols(const int sizeL, const int forParty)
|
void BuildingViewerDdsController::updatePlayerSymbols(const int sizeL, const int forParty)
|
||||||
@@ -1207,7 +1208,7 @@ void BuildingViewerDdsController::updatePlayerSymbols(const int sizeL, const int
|
|||||||
if (!isValidParticipant(participant))
|
if (!isValidParticipant(participant))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (forParty == -1 || participant.partyId() == forParty)
|
if (forParty == -1 || participant.partyId == forParty)
|
||||||
createPlayerSymbols(participant, sizeL);
|
createPlayerSymbols(participant, sizeL);
|
||||||
};
|
};
|
||||||
m_ppmDtc->participants(cb);
|
m_ppmDtc->participants(cb);
|
||||||
@@ -1219,9 +1220,9 @@ void BuildingViewerDdsController::createPlayerSymbols(const ParticipantManagemen
|
|||||||
SymbolInfo symbolinfo;
|
SymbolInfo symbolinfo;
|
||||||
for (int i = 0; i < m_vecFlashColors.size(); ++i)
|
for (int i = 0; i < m_vecFlashColors.size(); ++i)
|
||||||
{
|
{
|
||||||
Q_ASSERT(participant.id() != 0);
|
Q_ASSERT(participant.id != 0);
|
||||||
symbolinfo.participantId = participant.id();
|
symbolinfo.participantId = participant.id;
|
||||||
symbolinfo.strPathToSymbolFile = buildPlayerSymbolFilePath(participant.id(), i);
|
symbolinfo.strPathToSymbolFile = buildPlayerSymbolFilePath(participant.id, i);
|
||||||
symbolinfo.color = m_vecFlashColors.at(i);
|
symbolinfo.color = m_vecFlashColors.at(i);
|
||||||
symbolinfo.useThisSymbolNow = !symbolinfo.color.isValid();
|
symbolinfo.useThisSymbolNow = !symbolinfo.color.isValid();
|
||||||
createSymbolResultWatcher(participant, symbolinfo, sizeL);
|
createSymbolResultWatcher(participant, symbolinfo, sizeL);
|
||||||
@@ -1304,7 +1305,7 @@ void BuildingViewerDdsController::reCheckHitLine()
|
|||||||
|
|
||||||
for (const auto& hli : hitMap)
|
for (const auto& hli : hitMap)
|
||||||
{
|
{
|
||||||
if (hli.sampleTime() < (m_session->partitionTime() - 3000))
|
if (hli.sampleTime < (m_session->partitionTime() - 3000))
|
||||||
onBuildingHitLineInfoChanged(hli, DataModification::eAdded);
|
onBuildingHitLineInfoChanged(hli, DataModification::eAdded);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1332,17 +1333,17 @@ void BuildingViewerDdsController::updateBuildingRoomNames(
|
|||||||
const InfrastructureManagement::MainStructureElement& building)
|
const InfrastructureManagement::MainStructureElement& building)
|
||||||
{
|
{
|
||||||
|
|
||||||
const std::vector<InfrastructureManagement::StructureElement>& vecElements = building.elements();
|
const std::vector<InfrastructureManagement::StructureElement>& vecElements = building.elements;
|
||||||
|
|
||||||
int32_t buildingDatabaseId = building.id();
|
int32_t buildingDatabaseId = building.id;
|
||||||
QString featureID = BuildingViewer::databaseId2FeatureId(buildingDatabaseId);
|
QString featureID = BuildingViewer::databaseId2FeatureId(buildingDatabaseId);
|
||||||
for (const auto& se : vecElements)
|
for (const auto& se : vecElements)
|
||||||
{
|
{
|
||||||
if (se.structureElementTypeId() == InfrastructureManagement::StructureElementType::Building)
|
if (se.structureElementTypeId == InfrastructureManagement::StructureElementType::Building)
|
||||||
m_connection->excSetBuildingDisplayName(featureID, QString::fromStdString(se.displayName()));
|
m_connection->excSetBuildingDisplayName(featureID, QString::fromStdString(se.displayName));
|
||||||
if (se.structureElementTypeId() == InfrastructureManagement::StructureElementType::Room)
|
if (se.structureElementTypeId == InfrastructureManagement::StructureElementType::Room)
|
||||||
m_connection->excSetRoomDisplayName(featureID, QString::number(se.mountingPointId()),
|
m_connection->excSetRoomDisplayName(featureID, QString::number(se.mountingPointId),
|
||||||
QString::fromStdString(se.displayName()));
|
QString::fromStdString(se.displayName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1429,25 +1430,25 @@ void BuildingViewerDdsController::onBuildingStateChanged(const Buildings::Buildi
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
QMap<int, int> roomDestructions;
|
QMap<int, int> roomDestructions;
|
||||||
for (const Buildings::RoomState& rs : data.roomStates())
|
for (const Buildings::RoomState& rs : data.roomStates)
|
||||||
{
|
{
|
||||||
roomDestructions.insert(rs.mountingPointId(), rs.damagePercent());
|
roomDestructions.insert(rs.mountingPointId, rs.damagePercent);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_connection->buildingHit(data.id(), data.id(), data.damagePercent(), roomDestructions);
|
m_connection->buildingHit(data.id, data.id, data.damagePercent, roomDestructions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildingViewerDdsController::onBuildingHitLineInfoChanged(const Buildings::BuildingHitLineInfo& hli,
|
void BuildingViewerDdsController::onBuildingHitLineInfoChanged(const Buildings::BuildingHitLineInfo& hli,
|
||||||
DataModification modType)
|
DataModification modType)
|
||||||
{
|
{
|
||||||
int topidId = static_cast<int>(hli.id());
|
int topidId = static_cast<int>(hli.id);
|
||||||
|
|
||||||
DEBUG_LOG(m_logger) << "onBuildingHitLineInfoChanged: " << hli;
|
DEBUG_LOG(m_logger) << "onBuildingHitLineInfoChanged: " << hli;
|
||||||
|
|
||||||
const QString& strFeatureID = BuildingViewer::databaseId2FeatureId(hli.buildingId());
|
const QString& strFeatureID = BuildingViewer::databaseId2FeatureId(hli.buildingId);
|
||||||
if (!m_viewerInterface->isViewOpen(strFeatureID.toStdString()))
|
if (!m_viewerInterface->isViewOpen(strFeatureID.toStdString()))
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << "building not opened: hli.buildingId()=" << hli.buildingId();
|
DEBUG_LOG(m_logger) << "building not opened: hli.buildingId()=" << hli.buildingId;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1457,28 +1458,28 @@ void BuildingViewerDdsController::onBuildingHitLineInfoChanged(const Buildings::
|
|||||||
if (isRemove)
|
if (isRemove)
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << "onBuildingHitLineInfoChanged: remove ";
|
DEBUG_LOG(m_logger) << "onBuildingHitLineInfoChanged: remove ";
|
||||||
QVector<BuildingHit>& bhl = m_buildingHits[hli.buildingId()];
|
QVector<BuildingHit>& bhl = m_buildingHits[hli.buildingId];
|
||||||
|
|
||||||
auto it = std::find_if(bhl.begin(), bhl.end(), [hli](const BuildingHit& bh) { return (bh.id == hli.id()); });
|
auto it = std::find_if(bhl.begin(), bhl.end(), [hli](const BuildingHit& bh) { return (bh.id == hli.id); });
|
||||||
|
|
||||||
if (it != bhl.end())
|
if (it != bhl.end())
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << "bhl.erase(it)";
|
DEBUG_LOG(m_logger) << "bhl.erase(it)";
|
||||||
bhl.erase(it);
|
bhl.erase(it);
|
||||||
}
|
}
|
||||||
m_connection->removeRoomHit(hli.id());
|
m_connection->removeRoomHit(hli.id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BuildingHit bh;
|
BuildingHit bh;
|
||||||
bh.id = hli.id();
|
bh.id = hli.id;
|
||||||
bh.sampleTime = hli.sampleTime();
|
bh.sampleTime = hli.sampleTime;
|
||||||
bh.originatorParticipantId = hli.originatorParticipantId();
|
bh.originatorParticipantId = hli.originatorParticipantId;
|
||||||
bh.chargeTypeId = hli.chargeTypeId();
|
bh.chargeTypeId = hli.chargeTypeId;
|
||||||
|
|
||||||
bool contains = false;
|
bool contains = false;
|
||||||
for (const auto& it : m_buildingHits[hli.buildingId()])
|
for (const auto& it : m_buildingHits[hli.buildingId])
|
||||||
{
|
{
|
||||||
if (it.id == bh.id)
|
if (it.id == bh.id)
|
||||||
contains = true;
|
contains = true;
|
||||||
@@ -1486,13 +1487,13 @@ void BuildingViewerDdsController::onBuildingHitLineInfoChanged(const Buildings::
|
|||||||
if (!contains)
|
if (!contains)
|
||||||
{
|
{
|
||||||
|
|
||||||
m_buildingHits[hli.buildingId()].push_back(bh);
|
m_buildingHits[hli.buildingId].push_back(bh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int lineType = 2;
|
int lineType = 2;
|
||||||
|
|
||||||
m_connection->roomHit(topidId, hli.originatorParticipantId(), hli.buildingId(), hli.hitOnRoomId(),
|
m_connection->roomHit(topidId, hli.originatorParticipantId, hli.buildingId, hli.hitOnRoomId,
|
||||||
toRelative3D(hli.originatorPos()), lineType, isRemove ? 0 : hli.sampleTime());
|
toRelative3D(hli.originatorPos), lineType, isRemove ? 0 : hli.sampleTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildingViewerDdsController::onCleanupBuildingHitlines()
|
void BuildingViewerDdsController::onCleanupBuildingHitlines()
|
||||||
@@ -1509,33 +1510,33 @@ void BuildingViewerDdsController::onCleanupBuildingHitlines()
|
|||||||
void BuildingViewerDdsController::onMainStructureElementChanged(
|
void BuildingViewerDdsController::onMainStructureElementChanged(
|
||||||
const InfrastructureManagement::MainStructureElement& mse, DataModification modType)
|
const InfrastructureManagement::MainStructureElement& mse, DataModification modType)
|
||||||
{
|
{
|
||||||
if (!isBuildingKnown(mse.id()))
|
if (!isBuildingKnown(mse.id))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (modType)
|
switch (modType)
|
||||||
{
|
{
|
||||||
case DataModification::eAdded:
|
case DataModification::eAdded:
|
||||||
case DataModification::eModified: {
|
case DataModification::eModified: {
|
||||||
if (mse.modelId() != 0 && m_ismDtc->isElementAssignedToExercise(mse, m_exerciseId))
|
if (mse.modelId != 0 && m_ismDtc->isElementAssignedToExercise(mse, m_exerciseId))
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << "m_buildingHeight.insert id=" << mse.id() << " z=" << mse.geoPosition().z();
|
DEBUG_LOG(m_logger) << "m_buildingHeight.insert id=" << mse.id << " z=" << mse.geoPosition.z;
|
||||||
m_buildingHeight.insert(mse.id(), mse.geoPosition().z());
|
m_buildingHeight.insert(mse.id, mse.geoPosition.z);
|
||||||
QHash<int, int> roomId2RoomNumber;
|
QHash<int, int> roomId2RoomNumber;
|
||||||
for (const InfrastructureManagement::StructureElement& se : mse.elements())
|
for (const InfrastructureManagement::StructureElement& se : mse.elements)
|
||||||
{
|
{
|
||||||
if (se.structureElementTypeId() != InfrastructureManagement::StructureElementType::Room)
|
if (se.structureElementTypeId != InfrastructureManagement::StructureElementType::Room)
|
||||||
continue;
|
continue;
|
||||||
roomId2RoomNumber[se.id()] = se.mountingPointId();
|
roomId2RoomNumber[se.id] = se.mountingPointId;
|
||||||
}
|
}
|
||||||
m_roomId2RoomNumber[mse.id()] = roomId2RoomNumber;
|
m_roomId2RoomNumber[mse.id] = roomId2RoomNumber;
|
||||||
|
|
||||||
updateBuildingRoomNames(mse);
|
updateBuildingRoomNames(mse);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DataModification::eRemoved:
|
case DataModification::eRemoved:
|
||||||
m_roomId2RoomNumber.remove(mse.id());
|
m_roomId2RoomNumber.remove(mse.id);
|
||||||
m_buildingHeight.remove(mse.id());
|
m_buildingHeight.remove(mse.id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -89,7 +89,7 @@ class BuildingViewerDdsController : public QObject
|
|||||||
|
|
||||||
inline bool isOutdatedPosition(const ParticipantManagement::ParticipantPosition& position) const
|
inline bool isOutdatedPosition(const ParticipantManagement::ParticipantPosition& position) const
|
||||||
{
|
{
|
||||||
return position.participantId() <= 0 || isOutdatedPosition(position.sampleTime());
|
return position.participantId <= 0 || isOutdatedPosition(position.sampleTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool calcBaseCoordinate(const QMap<qint32, InfrastructureManagement::MainStructureElement>& mseMap);
|
bool calcBaseCoordinate(const QMap<qint32, InfrastructureManagement::MainStructureElement>& mseMap);
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ int32_t featureId2DatabaseId(const QString &strFeatureId)
|
|||||||
if (!strFeatureId.startsWith(gStrFeatureIdPrefix))
|
if (!strFeatureId.startsWith(gStrFeatureIdPrefix))
|
||||||
return -1;
|
return -1;
|
||||||
bool isOk = false;
|
bool isOk = false;
|
||||||
int32_t buildingDatabaseId = strFeatureId.midRef(gStrFeatureIdPrefix.size()).toInt(&isOk);
|
// Qt6: QString::midRef removed; mid() returns the same substring by value.
|
||||||
|
int32_t buildingDatabaseId = strFeatureId.mid(gStrFeatureIdPrefix.size()).toInt(&isOk);
|
||||||
return isOk ? buildingDatabaseId : -1;
|
return isOk ? buildingDatabaseId : -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+16
-14
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "bdv_edit_item.h"
|
#include "bdv_edit_item.h"
|
||||||
#include "ui_bdv_building_edit.h"
|
#include "ui_bdv_building_edit.h"
|
||||||
|
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||||
|
|
||||||
#include <Buildings/bld.hpp>
|
#include <Buildings/bld.hpp>
|
||||||
#include <Buildings/bld_ftc.h>
|
#include <Buildings/bld_ftc.h>
|
||||||
@@ -16,7 +17,8 @@ namespace BuildingViewer
|
|||||||
{
|
{
|
||||||
BuildingEdit::BuildingEdit(QWidget* parent)
|
BuildingEdit::BuildingEdit(QWidget* parent)
|
||||||
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel),
|
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel),
|
||||||
m_requestHelper(new LtsUtils::RequestHelper(this)), m_ui(new Ui::BuildingEdit)
|
m_requestHelper(new LtsUtils::RequestHelper(this)), m_ui(new Ui::BuildingEdit),
|
||||||
|
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("BuildingViewer.BuildingEdit"))
|
||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
@@ -69,7 +71,7 @@ bool BuildingEdit::init(int32_t buildingDatabaseId,
|
|||||||
m_bldFtc = bldFtc;
|
m_bldFtc = bldFtc;
|
||||||
|
|
||||||
InfrastructureManagement::MainStructureElement building = m_ismDtc->mainStructureElement(m_buildingDatabaseId);
|
InfrastructureManagement::MainStructureElement building = m_ismDtc->mainStructureElement(m_buildingDatabaseId);
|
||||||
m_buildingId = building.id();
|
m_buildingId = building.id;
|
||||||
|
|
||||||
buildModel();
|
buildModel();
|
||||||
m_buildingName = m_model->getBuildingName();
|
m_buildingName = m_model->getBuildingName();
|
||||||
@@ -158,14 +160,14 @@ bool BuildingEdit::apply()
|
|||||||
{
|
{
|
||||||
m_requestHelper->addRequest([this, fortifyFactors]() {
|
m_requestHelper->addRequest([this, fortifyFactors]() {
|
||||||
Buildings::SetFortifyFactorRequest fortifyRequest;
|
Buildings::SetFortifyFactorRequest fortifyRequest;
|
||||||
fortifyRequest.buildingId(m_buildingDatabaseId);
|
fortifyRequest.buildingId = m_buildingDatabaseId;
|
||||||
|
|
||||||
fortifyRequest.fortifyFactors().reserve(fortifyFactors.size());
|
fortifyRequest.fortifyFactors.reserve(fortifyFactors.size());
|
||||||
for (const auto& e : fortifyFactors)
|
for (const auto& e : fortifyFactors)
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << "push_back= databaseId=" << e.structureElementId()
|
DEBUG_LOG(m_logger) << "push_back= databaseId=" << e.structureElementId()
|
||||||
<< " fortifyFactor=" << e.fortifyFactor();
|
<< " fortifyFactor=" << e.fortifyFactor();
|
||||||
fortifyRequest.fortifyFactors().push_back(
|
fortifyRequest.fortifyFactors.push_back(
|
||||||
Buildings::FortifyFactor(e.structureElementId(), e.fortifyFactor()));
|
Buildings::FortifyFactor(e.structureElementId(), e.fortifyFactor()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,12 +186,12 @@ bool BuildingEdit::apply()
|
|||||||
for (const auto& treeItem : displayNames)
|
for (const auto& treeItem : displayNames)
|
||||||
{
|
{
|
||||||
|
|
||||||
for (const auto& room : building.elements())
|
for (const auto& room : building.elements)
|
||||||
{
|
{
|
||||||
if (room.id() == treeItem.structureElementId())
|
if (room.id == treeItem.structureElementId())
|
||||||
{
|
{
|
||||||
auto copy = room;
|
auto copy = room;
|
||||||
copy.displayName(treeItem.displayName().toStdString());
|
copy.displayName = treeItem.displayName().toStdString();
|
||||||
vecModifiedRooms.push_back(copy);
|
vecModifiedRooms.push_back(copy);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -231,7 +233,7 @@ void BuildingEdit::slotMainStructureElementChanged(const InfrastructureManagemen
|
|||||||
if (modType == DataModification::eRemoved)
|
if (modType == DataModification::eRemoved)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (mse.id() == m_buildingDatabaseId)
|
if (mse.id == m_buildingDatabaseId)
|
||||||
{
|
{
|
||||||
|
|
||||||
slotHandleExternalDdsChange();
|
slotHandleExternalDdsChange();
|
||||||
@@ -243,7 +245,7 @@ void BuildingEdit::slotBuildingStateChanged(const Buildings::BuildingState& stat
|
|||||||
if (modType == DataModification::eRemoved)
|
if (modType == DataModification::eRemoved)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (state.id() == m_buildingDatabaseId)
|
if (state.id == m_buildingDatabaseId)
|
||||||
{
|
{
|
||||||
|
|
||||||
slotHandleExternalDdsChange();
|
slotHandleExternalDdsChange();
|
||||||
@@ -265,11 +267,11 @@ bool BuildingEdit::sendBuildingStateRequest(ProjectDataManagement::Vulnerability
|
|||||||
buildings.resize(1);
|
buildings.resize(1);
|
||||||
Buildings::SetBuildingStatesRequest requestData;
|
Buildings::SetBuildingStatesRequest requestData;
|
||||||
|
|
||||||
building.buildingId(m_buildingId);
|
building.buildingId = m_buildingId;
|
||||||
building.roomIds().set(structureElementIds);
|
building.roomIds.set(structureElementIds);
|
||||||
buildings[0] = building;
|
buildings[0] = building;
|
||||||
requestData.buildings(buildings);
|
requestData.buildings = buildings;
|
||||||
requestData.vulnerabilityState(state);
|
requestData.vulnerabilityState = state;
|
||||||
|
|
||||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << "currentData: " << state;
|
DEBUG_LOG(m_logger) << Q_FUNC_INFO << "currentData: " << state;
|
||||||
|
|
||||||
|
|||||||
+17
-15
@@ -17,11 +17,13 @@ namespace BuildingViewer
|
|||||||
BuildingEditModel::BuildingEditModel(QObject* parent,
|
BuildingEditModel::BuildingEditModel(QObject* parent,
|
||||||
const std::shared_ptr<InfrastructureManagement::Interface::Dtc>& ismDtc,
|
const std::shared_ptr<InfrastructureManagement::Interface::Dtc>& ismDtc,
|
||||||
const std::shared_ptr<Buildings::Interface::Dtc>& bldDtc)
|
const std::shared_ptr<Buildings::Interface::Dtc>& bldDtc)
|
||||||
: NGLTreeModel(parent, new NGLTreeItem(QVariant()), ,
|
: NGLTreeModel(parent, new NGLTreeItem(QVariant()), {
|
||||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()){
|
|
||||||
tr("Selected Building"), QStringLiteral("Name (DEBUG)"),
|
tr("Selected Building"), QStringLiteral("Name (DEBUG)"),
|
||||||
QStringLiteral("MountingPointId (DEBUG)"), QStringLiteral("StructureElementId (DEBUG)"),
|
QStringLiteral("MountingPointId (DEBUG)"), QStringLiteral("StructureElementId (DEBUG)"),
|
||||||
tr("Fortify Factor"), tr("Damage Percent")}),
|
tr("Fortify Factor"), tr("Damage Percent")}),
|
||||||
|
// m_logger moved out of the NGLTreeModel(...) call (it is a member init);
|
||||||
|
// getNGLLogger() returns the INGLLogger& the reference member binds to.
|
||||||
|
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("BuildingViewer.BuildingEditModel")),
|
||||||
m_ismDtc(ismDtc), m_bldDtc(bldDtc), m_buildingName(QString())
|
m_ismDtc(ismDtc), m_bldDtc(bldDtc), m_buildingName(QString())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -125,11 +127,11 @@ bool BuildingEditModel::init(int32_t mseId)
|
|||||||
int rootId = 0;
|
int rootId = 0;
|
||||||
qint32 mapId = 0;
|
qint32 mapId = 0;
|
||||||
|
|
||||||
const std::vector<InfrastructureManagement::StructureElement>& vecElements = building.elements();
|
const std::vector<InfrastructureManagement::StructureElement>& vecElements = building.elements;
|
||||||
for (const auto& se : vecElements)
|
for (const auto& se : vecElements)
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << "se: " << se;
|
DEBUG_LOG(m_logger) << "se: " << se;
|
||||||
if (se.structureElementTypeId() == InfrastructureManagement::StructureElementType::Building)
|
if (se.structureElementTypeId == InfrastructureManagement::StructureElementType::Building)
|
||||||
{
|
{
|
||||||
BuildingViewer::TreeItem rootItemBuilding(se);
|
BuildingViewer::TreeItem rootItemBuilding(se);
|
||||||
rootName = rootItemBuilding.name();
|
rootName = rootItemBuilding.name();
|
||||||
@@ -142,12 +144,12 @@ bool BuildingEditModel::init(int32_t mseId)
|
|||||||
for (const auto& se : vecElements)
|
for (const auto& se : vecElements)
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << "se: =" << se;
|
DEBUG_LOG(m_logger) << "se: =" << se;
|
||||||
if (se.structureElementTypeId() == InfrastructureManagement::StructureElementType::Floor)
|
if (se.structureElementTypeId == InfrastructureManagement::StructureElementType::Floor)
|
||||||
{
|
{
|
||||||
BuildingViewer::TreeItem itemRoom(se);
|
BuildingViewer::TreeItem itemRoom(se);
|
||||||
itemRoom.setSuperior(rootId);
|
itemRoom.setSuperior(rootId);
|
||||||
|
|
||||||
lookupFloorId2TreeId[se.id()] = mapId;
|
lookupFloorId2TreeId[se.id] = mapId;
|
||||||
treemap[mapId++] = itemRoom;
|
treemap[mapId++] = itemRoom;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -158,20 +160,20 @@ bool BuildingEditModel::init(int32_t mseId)
|
|||||||
auto bs = m_bldDtc->buildingState(mseId);
|
auto bs = m_bldDtc->buildingState(mseId);
|
||||||
|
|
||||||
QMap<int32_t, Buildings::RoomState> roomStates;
|
QMap<int32_t, Buildings::RoomState> roomStates;
|
||||||
for (const auto& e : bs.roomStates())
|
for (const auto& e : bs.roomStates)
|
||||||
roomStates[e.id()] = e;
|
roomStates[e.id] = e;
|
||||||
|
|
||||||
for (const auto& se : vecElements)
|
for (const auto& se : vecElements)
|
||||||
{
|
{
|
||||||
if (se.structureElementTypeId() == InfrastructureManagement::StructureElementType::Room)
|
if (se.structureElementTypeId == InfrastructureManagement::StructureElementType::Room)
|
||||||
{
|
{
|
||||||
|
|
||||||
double fortifyFactor = 1.0;
|
double fortifyFactor = 1.0;
|
||||||
qint32 damagePercent = bs.damagePercent();
|
qint32 damagePercent = bs.damagePercent;
|
||||||
if (roomStates.contains(se.id()))
|
if (roomStates.contains(se.id))
|
||||||
{
|
{
|
||||||
fortifyFactor = roomStates[se.id()].fortifyFactor();
|
fortifyFactor = roomStates[se.id].fortifyFactor;
|
||||||
damagePercent = roomStates[se.id()].damagePercent();
|
damagePercent = roomStates[se.id].damagePercent;
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildingViewer::TreeItem itemRoom(se, fortifyFactor, damagePercent);
|
BuildingViewer::TreeItem itemRoom(se, fortifyFactor, damagePercent);
|
||||||
@@ -179,13 +181,13 @@ bool BuildingEditModel::init(int32_t mseId)
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
int32_t floorID = se.path()[1];
|
int32_t floorID = se.path[1];
|
||||||
itemRoom.setSuperior(lookupFloorId2TreeId[floorID]);
|
itemRoom.setSuperior(lookupFloorId2TreeId[floorID]);
|
||||||
}
|
}
|
||||||
catch (const std::out_of_range& e)
|
catch (const std::out_of_range& e)
|
||||||
{
|
{
|
||||||
WARNING_LOG(m_logger) << "Caught exception while trying to get superior id for building " << rootName
|
WARNING_LOG(m_logger) << "Caught exception while trying to get superior id for building " << rootName
|
||||||
<< " with room with mounting point id: " << se.mountingPointId() << ": "
|
<< " with room with mounting point id: " << se.mountingPointId << ": "
|
||||||
<< e.what();
|
<< e.what();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "bdv_thread_video_exporter.h"
|
#include "bdv_thread_video_exporter.h"
|
||||||
|
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||||
|
|
||||||
#include "bdv_replay_handler.h"
|
#include "bdv_replay_handler.h"
|
||||||
|
|
||||||
@@ -11,7 +12,9 @@
|
|||||||
|
|
||||||
namespace BuildingViewer
|
namespace BuildingViewer
|
||||||
{
|
{
|
||||||
VideoExporter::VideoExporter(QObject* parent) : QObject(parent)
|
VideoExporter::VideoExporter(QObject* parent)
|
||||||
|
: QObject(parent),
|
||||||
|
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("BuildingViewer.VideoExporter"))
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << "ThreadVideoExporter has been created";
|
DEBUG_LOG(m_logger) << "ThreadVideoExporter has been created";
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-8
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "bdv_topic_replay_interface.h"
|
#include "bdv_topic_replay_interface.h"
|
||||||
|
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||||
|
|
||||||
#include "bdv_replay_handler.h"
|
#include "bdv_replay_handler.h"
|
||||||
#include "bdv_thread_video_exporter.h"
|
#include "bdv_thread_video_exporter.h"
|
||||||
@@ -26,7 +27,8 @@ namespace BuildingViewer
|
|||||||
{
|
{
|
||||||
|
|
||||||
TopicReplayInterface::TopicReplayInterface(BgViewerController* bgvController, LtsSession::LtsSession* session)
|
TopicReplayInterface::TopicReplayInterface(BgViewerController* bgvController, LtsSession::LtsSession* session)
|
||||||
: m_bgvController(bgvController), m_session(session)
|
: m_bgvController(bgvController), m_session(session),
|
||||||
|
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("BuildingViewer.TopicReplayInterface"))
|
||||||
{
|
{
|
||||||
session->getForeignGuiInterface<SituationReplay::ForeignGuiInterface>(m_replayIfc);
|
session->getForeignGuiInterface<SituationReplay::ForeignGuiInterface>(m_replayIfc);
|
||||||
}
|
}
|
||||||
@@ -240,20 +242,20 @@ bool TopicReplayInterface::exportBuildings(const QVector<int>& buildingIds) cons
|
|||||||
for (const int buildingId : buildingIds)
|
for (const int buildingId : buildingIds)
|
||||||
{
|
{
|
||||||
const auto mse = ismDtc->mainStructureElement(buildingId);
|
const auto mse = ismDtc->mainStructureElement(buildingId);
|
||||||
if (mse.id() != buildingId)
|
if (mse.id != buildingId)
|
||||||
{
|
{
|
||||||
WARNING_LOG(m_logger) << "Could not find MainStructureElement for building with id " << buildingId
|
WARNING_LOG(m_logger) << "Could not find MainStructureElement for building with id " << buildingId
|
||||||
<< " - skipping";
|
<< " - skipping";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const QString fnIve = QString::fromStdString(mse.name()) + QStringLiteral(".flt.ive");
|
const QString fnIve = QString::fromStdString(mse.name) + QStringLiteral(".flt.ive");
|
||||||
const QString fnXml = QString::fromStdString(mse.name()) + QStringLiteral(".flt.xml");
|
const QString fnXml = QString::fromStdString(mse.name) + QStringLiteral(".flt.xml");
|
||||||
if (!copyFile(fnIve, modelPath, outputPath) || !copyFile(fnXml, modelPath, outputPath))
|
if (!copyFile(fnIve, modelPath, outputPath) || !copyFile(fnXml, modelPath, outputPath))
|
||||||
return false;
|
return false;
|
||||||
bi.name = QString::fromStdString(mse.name());
|
bi.name = QString::fromStdString(mse.name);
|
||||||
bi.position = LtsUtils::QPoint3D(mse.geoPosition().lon(), mse.geoPosition().lat(), mse.geoPosition().z());
|
bi.position = LtsUtils::QPoint3D(mse.geoPosition.lon, mse.geoPosition.lat, mse.geoPosition.z);
|
||||||
bi.angleDegree = mse.angle();
|
bi.angleDegree = mse.angle;
|
||||||
bi.id = mse.id();
|
bi.id = mse.id;
|
||||||
|
|
||||||
knownBuildings += bi;
|
knownBuildings += bi;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "bdv_viewer_data_dialog.h"
|
#include "bdv_viewer_data_dialog.h"
|
||||||
|
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||||
#include "ui_bdv_viewer_data_dialog.h"
|
#include "ui_bdv_viewer_data_dialog.h"
|
||||||
|
|
||||||
#include <LtsSession/lts_session_data.h>
|
#include <LtsSession/lts_session_data.h>
|
||||||
@@ -12,6 +13,7 @@ namespace BuildingViewer
|
|||||||
BgViewerDataViewDialog::BgViewerDataViewDialog(QWidget *parent)
|
BgViewerDataViewDialog::BgViewerDataViewDialog(QWidget *parent)
|
||||||
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::CloseOnly)
|
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::CloseOnly)
|
||||||
, m_ui(new Ui::BgViewerDataViewDialog)
|
, m_ui(new Ui::BgViewerDataViewDialog)
|
||||||
|
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("BuildingViewer.BgViewerDataViewDialog"))
|
||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
|
|||||||
+2
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "bdv_viewer_data_view.h"
|
#include "bdv_viewer_data_view.h"
|
||||||
|
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||||
#include "ui_bdv_viewer_data_view.h"
|
#include "ui_bdv_viewer_data_view.h"
|
||||||
#include "bdv_viewer_data_model.h"
|
#include "bdv_viewer_data_model.h"
|
||||||
|
|
||||||
@@ -15,6 +16,7 @@ BgViewerDataView::BgViewerDataView(QWidget *parent)
|
|||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
, m_ui(new Ui::BgViewerDataView)
|
, m_ui(new Ui::BgViewerDataView)
|
||||||
, m_pModel(new BgViewerDataViewModel(this))
|
, m_pModel(new BgViewerDataViewModel(this))
|
||||||
|
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("BuildingViewer.BgViewerDataView"))
|
||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -64,20 +64,20 @@ bool AssignCodificationDataTable::init(const std::shared_ptr<CodificationManagem
|
|||||||
for (const ParticipantManagement::Party& party : std::as_const(userVisibleParties))
|
for (const ParticipantManagement::Party& party : std::as_const(userVisibleParties))
|
||||||
{
|
{
|
||||||
|
|
||||||
if (party.id() != 2 && party.id() != 3)
|
if (party.id != 2 && party.id != 3)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
QString partyName;
|
QString partyName;
|
||||||
if (party.id() == 2)
|
if (party.id == 2)
|
||||||
partyName = tr("OPFOR:");
|
partyName = tr("OPFOR:");
|
||||||
else if (party.id() == 3)
|
else if (party.id == 3)
|
||||||
partyName = tr("BLUFOR:");
|
partyName = tr("BLUFOR:");
|
||||||
else
|
else
|
||||||
partyName = ParticipantManagement::trPartyName(party.name());
|
partyName = ParticipantManagement::trPartyName(party.name);
|
||||||
m_ui->partyLayout->addWidget(new QLabel(partyName, this), i, 0, 1, 1);
|
m_ui->partyLayout->addWidget(new QLabel(partyName, this), i, 0, 1, 1);
|
||||||
|
|
||||||
LtsWidgets::LtsComboBox* cb = new LtsWidgets::LtsComboBox(this);
|
LtsWidgets::LtsComboBox* cb = new LtsWidgets::LtsComboBox(this);
|
||||||
cb->setProperty(QLatin1String("partyId").data(), party.id());
|
cb->setProperty(QLatin1String("partyId").data(), party.id);
|
||||||
m_tableVec.append(cb);
|
m_tableVec.append(cb);
|
||||||
cb->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
|
cb->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
|
||||||
cb->addItem(QStringLiteral("---"), 0);
|
cb->addItem(QStringLiteral("---"), 0);
|
||||||
@@ -88,7 +88,7 @@ bool AssignCodificationDataTable::init(const std::shared_ptr<CodificationManagem
|
|||||||
m_model->data(m_model->index(row, CodificationDataOverviewModel::Id), Qt::DisplayRole));
|
m_model->data(m_model->index(row, CodificationDataOverviewModel::Id), Qt::DisplayRole));
|
||||||
|
|
||||||
DEBUG_LOG(m_logger)
|
DEBUG_LOG(m_logger)
|
||||||
<< "Init Combobox[" << row << "]: PartyId: " << party.id() << " Identifier: "
|
<< "Init Combobox[" << row << "]: PartyId: " << party.id << " Identifier: "
|
||||||
<< m_model->data(m_model->index(row, CodificationDataOverviewModel::Identifier), Qt::DisplayRole)
|
<< m_model->data(m_model->index(row, CodificationDataOverviewModel::Identifier), Qt::DisplayRole)
|
||||||
.toString()
|
.toString()
|
||||||
<< " CodTabId: "
|
<< " CodTabId: "
|
||||||
@@ -105,7 +105,7 @@ bool AssignCodificationDataTable::init(const std::shared_ptr<CodificationManagem
|
|||||||
.toInt();
|
.toInt();
|
||||||
DEBUG_LOG(m_logger) << "Assignment[" << row << "]: assignedPartyId: " << assignedPartyId;
|
DEBUG_LOG(m_logger) << "Assignment[" << row << "]: assignedPartyId: " << assignedPartyId;
|
||||||
|
|
||||||
if (party.id() == assignedPartyId)
|
if (party.id == assignedPartyId)
|
||||||
{
|
{
|
||||||
tableId =
|
tableId =
|
||||||
m_model->data(m_model->index(row, CodificationDataOverviewModel::Id), Qt::DisplayRole).toInt();
|
m_model->data(m_model->index(row, CodificationDataOverviewModel::Id), Qt::DisplayRole).toInt();
|
||||||
|
|||||||
+6
-6
@@ -84,17 +84,17 @@ void DetailedChartModel::onDynamicParticipantDataChanged(const ParticipantManage
|
|||||||
{
|
{
|
||||||
Q_UNUSED(modType);
|
Q_UNUSED(modType);
|
||||||
|
|
||||||
const ParticipantManagement::StateInformation &stateInfo = m_config.ppmDtc->youngestStateInformation(data.stateHistory());
|
const ParticipantManagement::StateInformation &stateInfo = m_config.ppmDtc->youngestStateInformation(data.stateHistory);
|
||||||
|
|
||||||
if (!m_config.participantIds.contains(data.participantId()) ||
|
if (!m_config.participantIds.contains(data.participantId) ||
|
||||||
stateInfo.vulnerabilityState() > ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
|
stateInfo.vulnerabilityState > ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
for (auto it = m_participantStates.begin(); it != m_participantStates.end(); ++it)
|
for (auto it = m_participantStates.begin(); it != m_participantStates.end(); ++it)
|
||||||
it.value() -= data.participantId();
|
it.value() -= data.participantId;
|
||||||
|
|
||||||
m_participantStates[stateInfo.vulnerabilityState()] += data.participantId();
|
m_participantStates[stateInfo.vulnerabilityState] += data.participantId;
|
||||||
|
|
||||||
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1));
|
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1));
|
||||||
}
|
}
|
||||||
@@ -113,7 +113,7 @@ DetailedChartModel::DetailedChartModel(const AbstractChartModel::ChartConfig &co
|
|||||||
|
|
||||||
auto cb = [this](const ParticipantManagement::DynamicParticipantData & data)
|
auto cb = [this](const ParticipantManagement::DynamicParticipantData & data)
|
||||||
{
|
{
|
||||||
if (!m_config.participantIds.contains(data.participantId()))
|
if (!m_config.participantIds.contains(data.participantId))
|
||||||
return;
|
return;
|
||||||
onDynamicParticipantDataChanged(data, DataModification::eAdded);
|
onDynamicParticipantDataChanged(data, DataModification::eAdded);
|
||||||
};
|
};
|
||||||
|
|||||||
+8
-8
@@ -56,18 +56,18 @@ void SimpleChartModel::onDynamicParticipantDataChanged(const ParticipantManageme
|
|||||||
{
|
{
|
||||||
Q_UNUSED(modType);
|
Q_UNUSED(modType);
|
||||||
|
|
||||||
if (!m_config.participantIds.contains(data.participantId()))
|
if (!m_config.participantIds.contains(data.participantId))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const ParticipantManagement::StateInformation &stateInfo = m_config.ppmDtc->youngestStateInformation(data.stateHistory());
|
const ParticipantManagement::StateInformation &stateInfo = m_config.ppmDtc->youngestStateInformation(data.stateHistory);
|
||||||
|
|
||||||
DEBUG_LOG(m_logger) << "Participant id = " << data.participantId();
|
DEBUG_LOG(m_logger) << "Participant id = " << data.participantId;
|
||||||
DEBUG_LOG(m_logger) << "State Info Vulnerability = " << stateInfo.vulnerabilityState();
|
DEBUG_LOG(m_logger) << "State Info Vulnerability = " << static_cast<int>(stateInfo.vulnerabilityState);
|
||||||
|
|
||||||
if (stateInfo.vulnerabilityState() < ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
|
if (stateInfo.vulnerabilityState < ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
|
||||||
setCombatReady(data.participantId());
|
setCombatReady(data.participantId);
|
||||||
else
|
else
|
||||||
setKilled(data.participantId());
|
setKilled(data.participantId);
|
||||||
|
|
||||||
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1));
|
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1));
|
||||||
}
|
}
|
||||||
@@ -76,7 +76,7 @@ SimpleChartModel::SimpleChartModel(const AbstractChartModel::ChartConfig &config
|
|||||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||||
auto cb = [this](const ParticipantManagement::DynamicParticipantData & data)
|
auto cb = [this](const ParticipantManagement::DynamicParticipantData & data)
|
||||||
{
|
{
|
||||||
if (!m_config.participantIds.contains(data.participantId()))
|
if (!m_config.participantIds.contains(data.participantId))
|
||||||
return;
|
return;
|
||||||
onDynamicParticipantDataChanged(data, DataModification::eAdded);
|
onDynamicParticipantDataChanged(data, DataModification::eAdded);
|
||||||
};
|
};
|
||||||
|
|||||||
+4
-4
@@ -160,10 +160,10 @@ bool CreateReportDialog::apply()
|
|||||||
{
|
{
|
||||||
ParticipantManagement::ParticipantData data = m_participantModel->getParticipantData(index);
|
ParticipantManagement::ParticipantData data = m_participantModel->getParticipantData(index);
|
||||||
|
|
||||||
if (data.id() != 0 &&
|
if (data.id != 0 &&
|
||||||
data.equipmentNumber().has_value() &&
|
data.equipmentNumber.has_value() &&
|
||||||
typeIds.contains(data.typeId()))
|
typeIds.contains(data.typeId))
|
||||||
participantIds.insert(data.id());
|
participantIds.insert(data.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -54,7 +54,7 @@ ReportDialog::ReportDialog(const AbstractChartModel::ChartConfig &config, QWidge
|
|||||||
for (int32_t participantId :config.participantIds)
|
for (int32_t participantId :config.participantIds)
|
||||||
{
|
{
|
||||||
ParticipantManagement::Participant participant = config.ppmDtc->participant(participantId);
|
ParticipantManagement::Participant participant = config.ppmDtc->participant(participantId);
|
||||||
ParticipantManagement::TypeClass typeClass = config.ppmDtc->type(participant.typeId()).typeClass();
|
ParticipantManagement::TypeClass typeClass = config.ppmDtc->type(participant.typeId).typeClass;
|
||||||
|
|
||||||
participantIdsByTypeClass[typeClass] += participantId;
|
participantIdsByTypeClass[typeClass] += participantId;
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -22,7 +22,7 @@ bool TypeModel::init()
|
|||||||
{
|
{
|
||||||
m_ppmDtc->types([this](const ParticipantManagement::Type &type)
|
m_ppmDtc->types([this](const ParticipantManagement::Type &type)
|
||||||
{
|
{
|
||||||
if (m_ppmDtc->isTypeInUse(type.id()))
|
if (m_ppmDtc->isTypeInUse(type.id))
|
||||||
insertRow(type);
|
insertRow(type);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ int TypeModel::getTypeId(const QModelIndex &index) const
|
|||||||
{
|
{
|
||||||
if (!indexIsValid(index))
|
if (!indexIsValid(index))
|
||||||
return -1;
|
return -1;
|
||||||
return m_vecData.at(index.row()).id();
|
return m_vecData.at(index.row()).id;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant TypeModel::data(const QModelIndex &index, int role) const
|
QVariant TypeModel::data(const QModelIndex &index, int role) const
|
||||||
@@ -46,9 +46,9 @@ QVariant TypeModel::data(const QModelIndex &index, int role) const
|
|||||||
switch (index.column())
|
switch (index.column())
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return ParticipantManagement::toString(entry.typeClass());
|
return ParticipantManagement::toString(entry.typeClass);
|
||||||
case 1:
|
case 1:
|
||||||
return QString::fromStdString(entry.name());
|
return QString::fromStdString(entry.name);
|
||||||
}
|
}
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
@@ -56,8 +56,8 @@ QVariant TypeModel::data(const QModelIndex &index, int role) const
|
|||||||
bool TypeModel::isFiltered(const ParticipantManagement::Type &data, DataModification modType) const
|
bool TypeModel::isFiltered(const ParticipantManagement::Type &data, DataModification modType) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(modType);
|
Q_UNUSED(modType);
|
||||||
return (data.typeClass() == ParticipantManagement::TypeClass::Unit ||
|
return (data.typeClass == ParticipantManagement::TypeClass::Unit ||
|
||||||
data.typeClass() == ParticipantManagement::TypeClass::SupportUnit);
|
data.typeClass == ParticipantManagement::TypeClass::SupportUnit);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -91,7 +91,10 @@ ADD_INTERFACE_LIBRARY(PpmDataPluginInterface
|
|||||||
svcPpmCommon
|
svcPpmCommon
|
||||||
)
|
)
|
||||||
|
|
||||||
IF(Qt5WebEngineWidgets_VERSION VERSION_GREATER 5.7.9)
|
# Qt6 Migration: legacy guarded on Qt5WebEngineWidgets_VERSION > 5.7.9; the
|
||||||
|
# Qt6 equivalent is that the Qt6::WebEngineWidgets target exists (consumer
|
||||||
|
# plugins are additionally gated by BUILD_PLUGINS_PARTICIPANT_ORG_CHART).
|
||||||
|
IF(TARGET Qt6::WebEngineWidgets)
|
||||||
#
|
#
|
||||||
# Combat Power Gui Plugin Interface
|
# Combat Power Gui Plugin Interface
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(Common)
|
ADD_SUBDIRECTORY(Common)
|
||||||
# MSDL requires XmlPatterns - skip for Qt6 migration baseline
|
# MSDL re-implemented without Qt XmlPatterns (Qt6::Xml + XercesC/xsdc++ + xmllint)
|
||||||
IF(BUILD_PLUGINS_MSDL)
|
IF(BUILD_PLUGINS_MSDL)
|
||||||
ADD_SUBDIRECTORY(MSDL)
|
ADD_SUBDIRECTORY(MSDL)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
@@ -21,7 +21,7 @@ ADD_SUBDIRECTORY(ParticipantSelection)
|
|||||||
ADD_SUBDIRECTORY(ParticipantTemplates)
|
ADD_SUBDIRECTORY(ParticipantTemplates)
|
||||||
ADD_SUBDIRECTORY(PartyEdit)
|
ADD_SUBDIRECTORY(PartyEdit)
|
||||||
ADD_SUBDIRECTORY(PpmComboBox)
|
ADD_SUBDIRECTORY(PpmComboBox)
|
||||||
# Saab requires XmlPatterns - skip for Qt6 migration baseline
|
# Saab re-implemented without Qt XmlPatterns (Qt6::Xml only)
|
||||||
IF(BUILD_PLUGINS_SAAB)
|
IF(BUILD_PLUGINS_SAAB)
|
||||||
ADD_SUBDIRECTORY(Saab)
|
ADD_SUBDIRECTORY(Saab)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|||||||
+3
-1
@@ -79,6 +79,9 @@ INSTALL_SHARED_FILES(zwmsmsdl_SRCS
|
|||||||
WS
|
WS
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# .ui files live in the ui/ subdirectory; tell AUTOUIC where to find them
|
||||||
|
set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/ui)
|
||||||
|
|
||||||
NGL_WRAP_UI(zwmsmsdl_SRCS ${zwmsmsdl_UICS})
|
NGL_WRAP_UI(zwmsmsdl_SRCS ${zwmsmsdl_UICS})
|
||||||
NGL_ADD_LIBRARY2(WS zwmsmsdl SHARED ${zwmsmsdl_SRCS} ${zwmsmsdl_UICS} ${zwmsmsdl_IDLS})
|
NGL_ADD_LIBRARY2(WS zwmsmsdl SHARED ${zwmsmsdl_SRCS} ${zwmsmsdl_UICS} ${zwmsmsdl_IDLS})
|
||||||
NGL_TARGET_INCLUDE_DIRECTORIES(zwmsmsdl
|
NGL_TARGET_INCLUDE_DIRECTORIES(zwmsmsdl
|
||||||
@@ -93,7 +96,6 @@ if(QT6_GUI_AVAILABLE)
|
|||||||
PRIVATE
|
PRIVATE
|
||||||
${Qt6_Gui}
|
${Qt6_Gui}
|
||||||
Qt6::Xml
|
Qt6::Xml
|
||||||
Qt6::XmlPatterns
|
|
||||||
XercesC::XercesC
|
XercesC::XercesC
|
||||||
PUBLIC
|
PUBLIC
|
||||||
svcPpmCommon
|
svcPpmCommon
|
||||||
|
|||||||
+21
-21
@@ -184,7 +184,7 @@ msdl_1::MilitaryScenarioType::ForceSides_type Private::createTagForceSides(const
|
|||||||
for (const ParticipantManagement::Party &party : mapForces)
|
for (const ParticipantManagement::Party &party : mapForces)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (party.id() == 0 || party.id() == 1)
|
if (party.id == 0 || party.id == 1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
QString obHaStr = QUuid::createUuid().toString();
|
QString obHaStr = QUuid::createUuid().toString();
|
||||||
@@ -202,7 +202,7 @@ msdl_1::MilitaryScenarioType::ForceSides_type Private::createTagForceSides(const
|
|||||||
const ParticipantManagement::Party &party = itForce.value();
|
const ParticipantManagement::Party &party = itForce.value();
|
||||||
|
|
||||||
msdl_1::ForceSideType::ObjectHandle_type obHaTy(strUUID.toStdString().c_str());
|
msdl_1::ForceSideType::ObjectHandle_type obHaTy(strUUID.toStdString().c_str());
|
||||||
msdl_1::ForceSideType::ForceSideName_type foSiNaTy(party.name().c_str());
|
msdl_1::ForceSideType::ForceSideName_type foSiNaTy(party.name.c_str());
|
||||||
msdl_1::ForceSideType foSiTy(obHaTy, foSiNaTy);
|
msdl_1::ForceSideType foSiTy(obHaTy, foSiNaTy);
|
||||||
|
|
||||||
|
|
||||||
@@ -218,7 +218,7 @@ msdl_1::MilitaryScenarioType::ForceSides_type Private::createTagForceSides(const
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
ParticipantManagement::Role role = itRelationship.value().role();
|
ParticipantManagement::Role role = itRelationship.value().role;
|
||||||
|
|
||||||
msdl_1::ForceSideType::Associations_type::Association_type::Relationship_type relType = msdl_1::ForceSideType::Associations_type::Association_type::Relationship_type::UNK;
|
msdl_1::ForceSideType::Associations_type::Association_type::Relationship_type relType = msdl_1::ForceSideType::Associations_type::Association_type::Relationship_type::UNK;
|
||||||
if (role == ParticipantManagement::Role::Enemy)
|
if (role == ParticipantManagement::Role::Enemy)
|
||||||
@@ -238,7 +238,7 @@ msdl_1::MilitaryScenarioType::ForceSides_type Private::createTagForceSides(const
|
|||||||
|
|
||||||
foSiTy.Associations(asType);
|
foSiTy.Associations(asType);
|
||||||
foSiSe.push_back(foSiTy);
|
foSiSe.push_back(foSiTy);
|
||||||
mapForceHandles[party.id()] = strUUID;
|
mapForceHandles[party.id] = strUUID;
|
||||||
}
|
}
|
||||||
|
|
||||||
return foType;
|
return foType;
|
||||||
@@ -315,7 +315,7 @@ msdl_1::MilitaryScenarioType::Organizations_type::Units_type Private::createTagU
|
|||||||
QString obHaStr = QUuid::createUuid().toString();
|
QString obHaStr = QUuid::createUuid().toString();
|
||||||
obHaStr = obHaStr.mid(1, obHaStr.size() - 2);
|
obHaStr = obHaStr.mid(1, obHaStr.size() - 2);
|
||||||
|
|
||||||
mapParticipantsUUIDs[participant.id()] = obHaStr.toStdString();
|
mapParticipantsUUIDs[participant.id] = obHaStr.toStdString();
|
||||||
}
|
}
|
||||||
|
|
||||||
unitsType unitsTy;
|
unitsType unitsTy;
|
||||||
@@ -326,16 +326,16 @@ msdl_1::MilitaryScenarioType::Organizations_type::Units_type Private::createTagU
|
|||||||
for (const ParticipantManagement::Participant &participant : mapParticipants)
|
for (const ParticipantManagement::Participant &participant : mapParticipants)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (participant.partyId() != it.key())
|
if (participant.partyId != it.key())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (participant.isDeleted())
|
if (participant.isDeleted)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
forceRelationDataType foReDaTy;
|
forceRelationDataType foReDaTy;
|
||||||
forceRelationChoiceType foReChTy = forceRelationChoiceType::FORCE_SIDE;
|
forceRelationChoiceType foReChTy = forceRelationChoiceType::FORCE_SIDE;
|
||||||
|
|
||||||
if (participant.superiorId() == 0)
|
if (participant.superiorId == 0)
|
||||||
{
|
{
|
||||||
foReChTy = forceRelationChoiceType::FORCE_SIDE;
|
foReChTy = forceRelationChoiceType::FORCE_SIDE;
|
||||||
|
|
||||||
@@ -346,12 +346,12 @@ msdl_1::MilitaryScenarioType::Organizations_type::Units_type Private::createTagU
|
|||||||
{
|
{
|
||||||
foReChTy = forceRelationChoiceType::UNIT;
|
foReChTy = forceRelationChoiceType::UNIT;
|
||||||
|
|
||||||
msdl_1::CommandRelationType::CommandingSuperiorHandle_type handle(mapParticipantsUUIDs.value(participant.superiorId()));
|
msdl_1::CommandRelationType::CommandingSuperiorHandle_type handle(mapParticipantsUUIDs.value(participant.superiorId));
|
||||||
forceRelationDataType::CommandRelation_type cmdRelation(handle, msdl_1::CommandRelationType::CommandRelationshipType_type::TACON);
|
forceRelationDataType::CommandRelation_type cmdRelation(handle, msdl_1::CommandRelationType::CommandRelationshipType_type::TACON);
|
||||||
foReDaTy.CommandRelation(cmdRelation);
|
foReDaTy.CommandRelation(cmdRelation);
|
||||||
}
|
}
|
||||||
|
|
||||||
unitType::ObjectHandle_type unObHaTy(mapParticipantsUUIDs.value(participant.id()));
|
unitType::ObjectHandle_type unObHaTy(mapParticipantsUUIDs.value(participant.id));
|
||||||
unitType::SymbolIdentifier_type syIdTy = "S--------------";
|
unitType::SymbolIdentifier_type syIdTy = "S--------------";
|
||||||
|
|
||||||
relationsType::ForceRelation_type foReTy(foReChTy, foReDaTy);
|
relationsType::ForceRelation_type foReTy(foReChTy, foReDaTy);
|
||||||
@@ -360,7 +360,7 @@ msdl_1::MilitaryScenarioType::Organizations_type::Units_type Private::createTagU
|
|||||||
unitType unitTy(unObHaTy, syIdTy, reTy);
|
unitType unitTy(unObHaTy, syIdTy, reTy);
|
||||||
unitTy.SymbolIdentifier(syIdTy);
|
unitTy.SymbolIdentifier(syIdTy);
|
||||||
|
|
||||||
unitType::Name_type naTy(participant.designator().c_str());
|
unitType::Name_type naTy(participant.designator.c_str());
|
||||||
unitTy.Name(naTy);
|
unitTy.Name(naTy);
|
||||||
|
|
||||||
unSe.push_back(unitTy);
|
unSe.push_back(unitTy);
|
||||||
@@ -389,16 +389,16 @@ msdl_1::MilitaryScenarioType::Organizations_type::Equipment_type Private::create
|
|||||||
for (const ParticipantManagement::Participant &participant : mapParticipants)
|
for (const ParticipantManagement::Participant &participant : mapParticipants)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (participant.partyId() != partyId)
|
if (participant.partyId != partyId)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (participant.isDeleted())
|
if (participant.isDeleted)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ownerDataType::UnitOwnerHandle_type foOwHaTy;
|
ownerDataType::UnitOwnerHandle_type foOwHaTy;
|
||||||
foOwHaTy = mapParticipantsUUIDs.value(participant.id()).c_str();
|
foOwHaTy = mapParticipantsUUIDs.value(participant.id).c_str();
|
||||||
|
|
||||||
ownerDataType owDaTy;
|
ownerDataType owDaTy;
|
||||||
owDaTy.UnitOwnerHandle(foOwHaTy);
|
owDaTy.UnitOwnerHandle(foOwHaTy);
|
||||||
@@ -409,11 +409,11 @@ msdl_1::MilitaryScenarioType::Organizations_type::Equipment_type Private::create
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
auto vecDISEntities = mapTypes.value(participant.typeId()).disEntities();
|
auto vecDISEntities = mapTypes.value(participant.typeId).disEntities;
|
||||||
if (!vecDISEntities.size())
|
if (!vecDISEntities.size())
|
||||||
{
|
{
|
||||||
WARNING_LOG(logger) << "Participant id " << participant.id()
|
WARNING_LOG(logger) << "Participant id " << participant.id
|
||||||
<< " belongs to a type id " << participant.typeId() << " which has no DIS id! Skipping export of participant!";
|
<< " belongs to a type id " << participant.typeId << " which has no DIS id! Skipping export of participant!";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -425,9 +425,9 @@ msdl_1::MilitaryScenarioType::Organizations_type::Equipment_type Private::create
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
coordDataType::GCC_type::X_type x(mapParticipantPositions[participant.id()].pos().lon());
|
coordDataType::GCC_type::X_type x(mapParticipantPositions[participant.id].pos.lon);
|
||||||
coordDataType::GCC_type::X_type y(mapParticipantPositions[participant.id()].pos().lat());
|
coordDataType::GCC_type::X_type y(mapParticipantPositions[participant.id].pos.lat);
|
||||||
coordDataType::GCC_type::Z_type z(mapParticipantPositions[participant.id()].pos().z());
|
coordDataType::GCC_type::Z_type z(mapParticipantPositions[participant.id].pos.z);
|
||||||
|
|
||||||
coordDataType::GCC_type utTy(x, y, z);
|
coordDataType::GCC_type utTy(x, y, z);
|
||||||
coordDataType coDaTy;
|
coordDataType coDaTy;
|
||||||
@@ -459,7 +459,7 @@ msdl_1::MilitaryScenarioType::Organizations_type::Equipment_type Private::create
|
|||||||
eqItTy.ObjectHandle(eqObHaTy);
|
eqItTy.ObjectHandle(eqObHaTy);
|
||||||
|
|
||||||
|
|
||||||
equipItemType::Name_type naTy(mapEquipment.value(mapTypes.value(participant.typeId()).equipmentTypeId()).name());
|
equipItemType::Name_type naTy(mapEquipment.value(mapTypes.value(participant.typeId).equipmentTypeId).name);
|
||||||
eqItTy.Name(naTy);
|
eqItTy.Name(naTy);
|
||||||
|
|
||||||
eqItTy.SymbolIdentifier(syIdTy);
|
eqItTy.SymbolIdentifier(syIdTy);
|
||||||
|
|||||||
+5
-5
@@ -22,21 +22,21 @@ ScenarioDataDialog::ScenarioDataDialog(QWidget *parent,
|
|||||||
connect(mUi->m_pushButton_Cancel, &QPushButton::clicked, this, &ScenarioDataDialog::onButtonCancel);
|
connect(mUi->m_pushButton_Cancel, &QPushButton::clicked, this, &ScenarioDataDialog::onButtonCancel);
|
||||||
|
|
||||||
ExerciseManagement::Exercise exercise = exmDtc->exercise(pSession->exerciseId());
|
ExerciseManagement::Exercise exercise = exmDtc->exercise(pSession->exerciseId());
|
||||||
mUi->m_lineEdit_ExerciseDescription->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exerciseDescription"), QString::fromStdString(exercise.description())).toString());
|
mUi->m_lineEdit_ExerciseDescription->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exerciseDescription"), QString::fromStdString(exercise.description)).toString());
|
||||||
|
|
||||||
|
|
||||||
QString strName(QString::fromStdString(exercise.name()));
|
QString strName(QString::fromStdString(exercise.name));
|
||||||
strName.remove(QLatin1Char(' '));
|
strName.remove(QLatin1Char(' '));
|
||||||
|
|
||||||
mUi->m_lineEdit_ExerciseName->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exerciseName"), strName).toString());
|
mUi->m_lineEdit_ExerciseName->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exerciseName"), strName).toString());
|
||||||
mUi->m_lineEdit_Domain->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exerciseDomain"), QString::fromStdString(exercise.partitionName())).toString());
|
mUi->m_lineEdit_Domain->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exerciseDomain"), QString::fromStdString(exercise.partitionName)).toString());
|
||||||
mUi->m_lineEdit_Version->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exerciseVersion"), QString()).toString());
|
mUi->m_lineEdit_Version->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exerciseVersion"), QString()).toString());
|
||||||
mUi->m_lineEdit_Purpose->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exercisePurpose"), QString()).toString());
|
mUi->m_lineEdit_Purpose->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exercisePurpose"), QString()).toString());
|
||||||
|
|
||||||
OperatorManagement::User user = opmDtc->user(LtsSessionData::LtsSessionData::getInstance()->getOperatorId());
|
OperatorManagement::User user = opmDtc->user(LtsSessionData::LtsSessionData::getInstance()->getOperatorId());
|
||||||
|
|
||||||
mUi->m_lineEdit_Type->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocType"), QString::fromStdString(user.description())).toString());
|
mUi->m_lineEdit_Type->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocType"), QString::fromStdString(user.description)).toString());
|
||||||
mUi->m_lineEdit_AuthorName->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocAuthor"), QString::fromStdString(user.name())).toString());
|
mUi->m_lineEdit_AuthorName->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocAuthor"), QString::fromStdString(user.name)).toString());
|
||||||
mUi->m_lineEdit_Organization->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocOrganization"), QString()).toString());
|
mUi->m_lineEdit_Organization->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocOrganization"), QString()).toString());
|
||||||
mUi->m_lineEdit_Email->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocEmail"), QString()).toString());
|
mUi->m_lineEdit_Email->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocEmail"), QString()).toString());
|
||||||
mUi->m_lineEdit_Telephone->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocTelephone"), QString()).toString());
|
mUi->m_lineEdit_Telephone->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocTelephone"), QString()).toString());
|
||||||
|
|||||||
+17
-32
@@ -17,12 +17,9 @@
|
|||||||
#include <QtCore/QUuid>
|
#include <QtCore/QUuid>
|
||||||
#include <QtCore/QTextStream>
|
#include <QtCore/QTextStream>
|
||||||
#include <QtCore/QUrl>
|
#include <QtCore/QUrl>
|
||||||
#include <QAbstractMessageHandler>
|
|
||||||
#include <QtXml/QDomDocument>
|
#include <QtXml/QDomDocument>
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
#include <QtCore/QProcess>
|
#include <QtCore/QProcess>
|
||||||
#include <QtXmlPatterns/QXmlSchema>
|
|
||||||
#include <QtXmlPatterns/QXmlSchemaValidator>
|
|
||||||
|
|
||||||
#include <ngltools/ngltools_filesystem.h>
|
#include <ngltools/ngltools_filesystem.h>
|
||||||
#include <Common/participant_dis_helper.h>
|
#include <Common/participant_dis_helper.h>
|
||||||
@@ -89,17 +86,17 @@ ImportMsdl::ImportMsdl(ParticipantManagement::ParticipantEditModel *pModel, cons
|
|||||||
|
|
||||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||||
{
|
{
|
||||||
for (const auto &disId : type.disEntities())
|
for (const auto &disId : type.disEntities)
|
||||||
{
|
{
|
||||||
QString strMSDL_DISId = ParticipantManagement::DIS::convertDISTypeInteger2MSDLString(disId);
|
QString strMSDL_DISId = ParticipantManagement::DIS::convertDISTypeInteger2MSDLString(disId);
|
||||||
|
|
||||||
if (m_mapMSDL_DIS_2TypeId.find(strMSDL_DISId) != m_mapMSDL_DIS_2TypeId.end())
|
if (m_mapMSDL_DIS_2TypeId.find(strMSDL_DISId) != m_mapMSDL_DIS_2TypeId.end())
|
||||||
{
|
{
|
||||||
WARNING_LOG(mLogger) << "DIS id \"" << strMSDL_DISId << "\" which is assigned to type id \"" << type.id() << "\" is already assigned to type id \"" << m_mapMSDL_DIS_2TypeId[strMSDL_DISId] << "\"";
|
WARNING_LOG(mLogger) << "DIS id \"" << strMSDL_DISId << "\" which is assigned to type id \"" << type.id << "\" is already assigned to type id \"" << m_mapMSDL_DIS_2TypeId[strMSDL_DISId] << "\"";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_mapMSDL_DIS_2TypeId[strMSDL_DISId] = type.id();
|
m_mapMSDL_DIS_2TypeId[strMSDL_DISId] = type.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -286,13 +283,14 @@ bool ImportMsdl::schemaValidation()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QXmlSchema schema;
|
// Qt6: Qt XmlPatterns (QXmlSchema) was removed. Check the schema file is
|
||||||
msdl::SchemaMessageHandler smh;
|
// well-formed XML via Qt6::Xml (QDomDocument); the external xmllint step below
|
||||||
schema.setMessageHandler(&smh);
|
// performs the full schema/instance validation.
|
||||||
schema.load(&schemaFile, QUrl::fromLocalFile(schemaFile.fileName()));
|
QDomDocument schemaDoc;
|
||||||
|
schemaDoc.setContent(&schemaFile, false);
|
||||||
|
|
||||||
|
|
||||||
if (!schema.isValid())
|
if (schemaDoc.documentElement().isNull())
|
||||||
{
|
{
|
||||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Schema is invalid"));
|
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Schema is invalid"));
|
||||||
return false;
|
return false;
|
||||||
@@ -322,16 +320,6 @@ bool ImportMsdl::schemaValidation()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
QXmlSchemaValidator validator(schema);
|
|
||||||
|
|
||||||
if (false )
|
|
||||||
{
|
|
||||||
#ifdef LTS_DEBUG
|
|
||||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Instance document is invalid"));
|
|
||||||
#endif
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,17 +329,14 @@ ParticipantManagement::ParticipantData ImportMsdl::createParticipant(const MSDLP
|
|||||||
ParticipantManagement::ParticipantData p;
|
ParticipantManagement::ParticipantData p;
|
||||||
|
|
||||||
|
|
||||||
p.designator(unit.m_designator.toStdString());
|
p.designator = unit.m_designator.toStdString();
|
||||||
p.tacticalIdentifier(unit.m_tacticalIdentifier.toStdString());
|
p.tacticalIdentifier = unit.m_tacticalIdentifier.toStdString();
|
||||||
|
|
||||||
|
p.equipmentNumber = 0;
|
||||||
p.equipmentNumber() = 0;
|
p.assignState = ParticipantManagement::ParticipantAssignState::HandoutExcon;
|
||||||
p.assignState() = ParticipantManagement::ParticipantAssignState::HandoutExcon;
|
|
||||||
|
|
||||||
|
p.symbol = m_mapTypes[unit.m_mappedTypeId].symbol;
|
||||||
|
p.typeId = unit.m_mappedTypeId;
|
||||||
p.symbol(m_mapTypes[unit.m_mappedTypeId].symbol());
|
|
||||||
p.typeId(unit.m_mappedTypeId);
|
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
@@ -370,7 +355,7 @@ void ImportMsdl::insertParty(const MSDLParty &party)
|
|||||||
{
|
{
|
||||||
|
|
||||||
ParticipantManagement::ParticipantData newParty;
|
ParticipantManagement::ParticipantData newParty;
|
||||||
newParty.designator(party.m_forceSideName.toStdString());
|
newParty.designator = party.m_forceSideName.toStdString();
|
||||||
createNode(newParty, m_indexRoot, party.m_ownHandle);
|
createNode(newParty, m_indexRoot, party.m_ownHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -753,7 +738,7 @@ void ImportMsdl::mapParticipant2Type(MSDLParticipant &participant, qint32 mapped
|
|||||||
{
|
{
|
||||||
m_mapMSDL_DIS_2TypeId[participant.m_DISTypeMSDL] = mappedTypeId;
|
m_mapMSDL_DIS_2TypeId[participant.m_DISTypeMSDL] = mappedTypeId;
|
||||||
|
|
||||||
m_mapTypes[mappedTypeId].disEntities().push_back(ParticipantManagement::DIS::convertMSDLString2Integer(participant.m_DISTypeMSDL));
|
m_mapTypes[mappedTypeId].disEntities.push_back(ParticipantManagement::DIS::convertMSDLString2Integer(participant.m_DISTypeMSDL));
|
||||||
m_setTouchedTypes.insert(mappedTypeId);
|
m_setTouchedTypes.insert(mappedTypeId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
-15
@@ -182,18 +182,3 @@ void ImportMsdlShow::slotCustomContextMenuActionTriggered(QAction *ac)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SchemaMessageHandler::handleMessage(QtMsgType type,
|
|
||||||
const QString &description,
|
|
||||||
const QUrl &identifier,
|
|
||||||
const QSourceLocation &sourceLocation)
|
|
||||||
{
|
|
||||||
ERROR_LOG(mLogger) << "type: " << type << " desc: " << description;
|
|
||||||
if (identifier.isValid())
|
|
||||||
ERROR_LOG(mLogger) << "identifier: " << identifier.toString();
|
|
||||||
if (!sourceLocation.isNull())
|
|
||||||
ERROR_LOG(mLogger) << "sourceLocation: "
|
|
||||||
<< sourceLocation.uri().toString()
|
|
||||||
<< " line: " << sourceLocation.line()
|
|
||||||
<< " column: " << sourceLocation.column()
|
|
||||||
;
|
|
||||||
}
|
|
||||||
-18
@@ -4,7 +4,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QtXml/QDomDocument>
|
#include <QtXml/QDomDocument>
|
||||||
#include <QtXmlPatterns/QAbstractMessageHandler>
|
|
||||||
#include <nglwidgets/ngldialog.h>
|
#include <nglwidgets/ngldialog.h>
|
||||||
#include "msdl_logging.h"
|
#include "msdl_logging.h"
|
||||||
|
|
||||||
@@ -13,23 +12,6 @@
|
|||||||
|
|
||||||
namespace msdl
|
namespace msdl
|
||||||
{
|
{
|
||||||
class SchemaMessageHandler : public QAbstractMessageHandler
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit SchemaMessageHandler(QObject *parent = nullptr)
|
|
||||||
: QAbstractMessageHandler(parent)
|
|
||||||
, mLogger(getLogger("SchemaMessageHandler"))
|
|
||||||
{}
|
|
||||||
protected:
|
|
||||||
void handleMessage(QtMsgType type,
|
|
||||||
const QString &description,
|
|
||||||
const QUrl &identifier = QUrl(),
|
|
||||||
const QSourceLocation &sourceLocation = QSourceLocation()) override;
|
|
||||||
private:
|
|
||||||
LOGGER_T mLogger;
|
|
||||||
};
|
|
||||||
|
|
||||||
class ImportMsdlShow : public NGLDialog
|
class ImportMsdlShow : public NGLDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
+10
-10
@@ -26,13 +26,13 @@ MappingDialog::MappingDialog(QWidget *parent, bool typeClassIsUnit, const QStrin
|
|||||||
|
|
||||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||||
{
|
{
|
||||||
if (!m_offerDatabaseEntriesWithoutDISType && (type.disEntities().size() == 0))
|
if (!m_offerDatabaseEntriesWithoutDISType && (type.disEntities.size() == 0))
|
||||||
{
|
{
|
||||||
WARNING_LOG(mLogger) << "Type id " << type.id() << " does not have assigned DIS types! Type cannot be used when importing MSDL data!";
|
WARNING_LOG(mLogger) << "Type id " << type.id << " does not have assigned DIS types! Type cannot be used when importing MSDL data!";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ParticipantManagement::TypeClass typeClassId = type.typeClass();
|
const ParticipantManagement::TypeClass typeClassId = type.typeClass;
|
||||||
|
|
||||||
if (typeClassIsUnit)
|
if (typeClassIsUnit)
|
||||||
{
|
{
|
||||||
@@ -49,7 +49,7 @@ MappingDialog::MappingDialog(QWidget *parent, bool typeClassIsUnit, const QStrin
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &typeclass : setTypeClasses)
|
for (const auto &typeclass : setTypeClasses)
|
||||||
mUi->m_ltsComboBox_typeClass->addItem(ParticipantManagement::toString(typeclass), typeclass);
|
mUi->m_ltsComboBox_typeClass->addItem(ParticipantManagement::toString(typeclass), static_cast<int>(typeclass));
|
||||||
|
|
||||||
slotClassTypeChanged();
|
slotClassTypeChanged();
|
||||||
|
|
||||||
@@ -68,21 +68,21 @@ void MappingDialog::slotClassTypeChanged()
|
|||||||
{
|
{
|
||||||
mUi->m_ltsComboBox_type->clear();
|
mUi->m_ltsComboBox_type->clear();
|
||||||
|
|
||||||
int currentClass = mUi->m_ltsComboBox_typeClass->currentData().toInt();
|
ParticipantManagement::TypeClass currentClass = static_cast<ParticipantManagement::TypeClass>(mUi->m_ltsComboBox_typeClass->currentData().toInt());
|
||||||
|
|
||||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||||
{
|
{
|
||||||
if (type.typeClass() != currentClass)
|
if (type.typeClass != currentClass)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!m_offerDatabaseEntriesWithoutDISType && (type.disEntities().size() == 0))
|
if (!m_offerDatabaseEntriesWithoutDISType && (type.disEntities.size() == 0))
|
||||||
{
|
{
|
||||||
|
|
||||||
WARNING_LOG(mLogger) << "Type id " << type.id() << " does not have assigned DIS types! Type cannot be used when importing MSDL data!";
|
WARNING_LOG(mLogger) << "Type id " << type.id << " does not have assigned DIS types! Type cannot be used when importing MSDL data!";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
mUi->m_ltsComboBox_type->addItem(QString::fromStdString(type.name()), type.id());
|
mUi->m_ltsComboBox_type->addItem(QString::fromStdString(type.name), type.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,6 +122,6 @@ bool MappingDialog::autoMapAllUnmappedElements() const
|
|||||||
int32_t MappingDialog::getMappedTypeId() const
|
int32_t MappingDialog::getMappedTypeId() const
|
||||||
{
|
{
|
||||||
int index = mUi->m_ltsComboBox_type->currentData().toInt();
|
int index = mUi->m_ltsComboBox_type->currentData().toInt();
|
||||||
return m_mapTypes[index].id();
|
return m_mapTypes[index].id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-1
@@ -3,7 +3,7 @@
|
|||||||
#include "ppm_msdl_edit.h"
|
#include "ppm_msdl_edit.h"
|
||||||
#include "ui_ppm_msdl_edit.h"
|
#include "ui_ppm_msdl_edit.h"
|
||||||
#include "msdl/msdl_import.h"
|
#include "msdl/msdl_import.h"
|
||||||
#include "msdl_export.h"
|
#include "msdl/msdl_export.h"
|
||||||
|
|
||||||
#include <QtGui/QAction>
|
#include <QtGui/QAction>
|
||||||
#include <AdvancedSymbology/asb_data_plugin_interface.h>
|
#include <AdvancedSymbology/asb_data_plugin_interface.h>
|
||||||
@@ -18,6 +18,7 @@ namespace ParticipantManagement
|
|||||||
{
|
{
|
||||||
MSDLEdit::MSDLEdit(LtsSession::LtsSession *session, QWidget *parent)
|
MSDLEdit::MSDLEdit(LtsSession::LtsSession *session, QWidget *parent)
|
||||||
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel)
|
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel)
|
||||||
|
, m_logger(getLogger("MSDLEdit"))
|
||||||
, m_actionRemove(nullptr)
|
, m_actionRemove(nullptr)
|
||||||
, m_actionEdit(nullptr)
|
, m_actionEdit(nullptr)
|
||||||
, m_ppmDtc(nullptr)
|
, m_ppmDtc(nullptr)
|
||||||
|
|||||||
+3
@@ -44,6 +44,9 @@ if(QT6_GUI_AVAILABLE)
|
|||||||
${Qt6_Widgets}
|
${Qt6_Widgets}
|
||||||
Qt6::WebEngineCore
|
Qt6::WebEngineCore
|
||||||
Qt6::WebEngineWidgets
|
Qt6::WebEngineWidgets
|
||||||
|
# Qt6 Migration: Qt5::WebEngineWidgets transitively linked Qt5::WebChannel;
|
||||||
|
# Qt6 dropped that dependency, so link the module explicitly.
|
||||||
|
Qt6::WebChannel
|
||||||
LtsSession
|
LtsSession
|
||||||
NGLLogger
|
NGLLogger
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
|||||||
+17
-16
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include "participant_org_chart.h"
|
#include "participant_org_chart.h"
|
||||||
#include "ui_participant_org_chart.h"
|
#include "ui_participant_org_chart.h"
|
||||||
|
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||||
#include <QtWebEngineCore/QWebEngineSettings>
|
#include <QtWebEngineCore/QWebEngineSettings>
|
||||||
|
|
||||||
#include <Symbology/symbol_data_to_render_role.h>
|
#include <Symbology/symbol_data_to_render_role.h>
|
||||||
@@ -16,9 +17,9 @@ namespace ParticipantManagement
|
|||||||
inline bool compareState(const StateInformation &a,
|
inline bool compareState(const StateInformation &a,
|
||||||
const StateInformation &b)
|
const StateInformation &b)
|
||||||
{
|
{
|
||||||
if (a.stateTime() != b.stateTime())
|
if (a.stateTime != b.stateTime)
|
||||||
return a.stateTime() < b.stateTime();
|
return a.stateTime < b.stateTime;
|
||||||
return a.vulnerabilityState() < b.vulnerabilityState();
|
return a.vulnerabilityState < b.vulnerabilityState;
|
||||||
}
|
}
|
||||||
|
|
||||||
LtsParticipantsOrgChart::LtsParticipantsOrgChart(QWidget *parent)
|
LtsParticipantsOrgChart::LtsParticipantsOrgChart(QWidget *parent)
|
||||||
@@ -32,6 +33,7 @@ LtsParticipantsOrgChart::LtsParticipantsOrgChart(QWidget *parent)
|
|||||||
, m_dtc(nullptr)
|
, m_dtc(nullptr)
|
||||||
, m_asbItc(nullptr)
|
, m_asbItc(nullptr)
|
||||||
, m_ui(new Ui::LtsParticipantsOrgChart)
|
, m_ui(new Ui::LtsParticipantsOrgChart)
|
||||||
|
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
}
|
}
|
||||||
@@ -137,16 +139,16 @@ void LtsParticipantsOrgChart::loadParty(int partyId)
|
|||||||
|
|
||||||
for (const ParticipantManagement::Participant &part : participantMap)
|
for (const ParticipantManagement::Participant &part : participantMap)
|
||||||
{
|
{
|
||||||
if (part.isDeleted() || part.partyId() != m_partyId)
|
if (part.isDeleted || part.partyId != m_partyId)
|
||||||
continue;
|
continue;
|
||||||
if (part.superiorId() == 0)
|
if (part.superiorId == 0)
|
||||||
{
|
{
|
||||||
root = part;
|
root = part;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (root.inferiorIds().size() == 0)
|
if (root.inferiorIds.size() == 0)
|
||||||
{
|
{
|
||||||
m_dataSource = preDefThing;
|
m_dataSource = preDefThing;
|
||||||
m_ui->wevOrgChart->reload();
|
m_ui->wevOrgChart->reload();
|
||||||
@@ -166,10 +168,10 @@ void LtsParticipantsOrgChart::loadParty(int partyId)
|
|||||||
connect(m_participantOrgChart_MimeDataHelper.data(), &ParticipantOrgChart_MimeDataHelper::finished,
|
connect(m_participantOrgChart_MimeDataHelper.data(), &ParticipantOrgChart_MimeDataHelper::finished,
|
||||||
this, &LtsParticipantsOrgChart::onParticipantOrgChart_MimeDataHelperFinished);
|
this, &LtsParticipantsOrgChart::onParticipantOrgChart_MimeDataHelperFinished);
|
||||||
|
|
||||||
m_participantOrgChart_MimeDataHelper->run(root.id(),
|
m_participantOrgChart_MimeDataHelper->run(root.id,
|
||||||
false,
|
false,
|
||||||
AdvancedSymbology::roleToRole<>(m_dtc->party(m_partyId).role()),
|
AdvancedSymbology::roleToRole<>(m_dtc->party(m_partyId).role),
|
||||||
QColor::fromRgb(QRgb(m_dtc->party(m_partyId).color())),
|
QColor::fromRgb(QRgb(m_dtc->party(m_partyId).color)),
|
||||||
m_useSymData);
|
m_useSymData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,10 +233,10 @@ bool LtsParticipantsOrgChart::loadTemplate(int templateRootId)
|
|||||||
connect(m_participantOrgChart_MimeDataHelper.data(), &ParticipantOrgChart_MimeDataHelper::finished,
|
connect(m_participantOrgChart_MimeDataHelper.data(), &ParticipantOrgChart_MimeDataHelper::finished,
|
||||||
this, &LtsParticipantsOrgChart::onParticipantOrgChart_MimeDataHelperFinished);
|
this, &LtsParticipantsOrgChart::onParticipantOrgChart_MimeDataHelperFinished);
|
||||||
|
|
||||||
m_participantOrgChart_MimeDataHelper->run(root.templateId(),
|
m_participantOrgChart_MimeDataHelper->run(root.templateId,
|
||||||
false,
|
false,
|
||||||
AdvancedSymbology::roleToRole<>(m_dtc->party(m_partyId).role()),
|
AdvancedSymbology::roleToRole<>(m_dtc->party(m_partyId).role),
|
||||||
QColor::fromRgb(QRgb(m_dtc->party(m_partyId).color())),
|
QColor::fromRgb(QRgb(m_dtc->party(m_partyId).color)),
|
||||||
false);
|
false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -258,8 +260,8 @@ void LtsParticipantsOrgChart::updateParticipant(int participantId)
|
|||||||
|
|
||||||
helper->run(participantId,
|
helper->run(participantId,
|
||||||
true,
|
true,
|
||||||
AdvancedSymbology::roleToRole<>(m_dtc->party(m_partyId).role()),
|
AdvancedSymbology::roleToRole<>(m_dtc->party(m_partyId).role),
|
||||||
QColor::fromRgb(QRgb(m_dtc->party(m_partyId).color())),
|
QColor::fromRgb(QRgb(m_dtc->party(m_partyId).color)),
|
||||||
m_useSymData);
|
m_useSymData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,8 +303,7 @@ void LtsParticipantsOrgChart::getWholeHierarchy()
|
|||||||
WebNofitifier::WebNofitifier(QObject *parent) : QObject(parent)
|
WebNofitifier::WebNofitifier(QObject *parent) : QObject(parent)
|
||||||
, m_currentJsonString(QString())
|
, m_currentJsonString(QString())
|
||||||
, m_updateString(QString())
|
, m_updateString(QString())
|
||||||
, m_updateTimer(new QTimer(this)),
|
, m_updateTimer(new QTimer(this)) {
|
||||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
|
||||||
connect(m_updateTimer, &QTimer::timeout, this, &WebNofitifier::onTimerTick);
|
connect(m_updateTimer, &QTimer::timeout, this, &WebNofitifier::onTimerTick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -97,7 +97,6 @@ signals:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
NGL::INGLLogger &m_logger;
|
|
||||||
int m_partyId;
|
int m_partyId;
|
||||||
bool m_useSymData;
|
bool m_useSymData;
|
||||||
bool m_isMenuEnabled;
|
bool m_isMenuEnabled;
|
||||||
@@ -114,6 +113,8 @@ NGL::INGLLogger &m_logger;
|
|||||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_dtc;
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_dtc;
|
||||||
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> m_asbItc;
|
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> m_asbItc;
|
||||||
Ui::LtsParticipantsOrgChart *m_ui;
|
Ui::LtsParticipantsOrgChart *m_ui;
|
||||||
|
|
||||||
|
NGL::INGLLogger &m_logger;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
+2
-1
@@ -3,7 +3,7 @@
|
|||||||
#include "ppm_saab_edit.h"
|
#include "ppm_saab_edit.h"
|
||||||
#include "ui_ppm_saab_edit.h"
|
#include "ui_ppm_saab_edit.h"
|
||||||
#include "saab/saab_import.h"
|
#include "saab/saab_import.h"
|
||||||
#include "saab_export.h"
|
#include "saab/saab_export.h"
|
||||||
|
|
||||||
#include <QtGui/QAction>
|
#include <QtGui/QAction>
|
||||||
#include <AdvancedSymbology/asb_data_plugin_interface.h>
|
#include <AdvancedSymbology/asb_data_plugin_interface.h>
|
||||||
@@ -18,6 +18,7 @@ namespace ParticipantManagement
|
|||||||
{
|
{
|
||||||
SAABEdit::SAABEdit(LtsSession::LtsSession *session, QWidget *parent)
|
SAABEdit::SAABEdit(LtsSession::LtsSession *session, QWidget *parent)
|
||||||
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel)
|
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel)
|
||||||
|
, m_logger(getLogger("SAABEdit"))
|
||||||
, m_actionRemove(nullptr)
|
, m_actionRemove(nullptr)
|
||||||
, m_actionEdit(nullptr)
|
, m_actionEdit(nullptr)
|
||||||
, m_ppmDtc(nullptr)
|
, m_ppmDtc(nullptr)
|
||||||
|
|||||||
+3
-1
@@ -43,6 +43,9 @@ SET(zwmssaab_UICS
|
|||||||
ui/saab_mapping_dialog.ui
|
ui/saab_mapping_dialog.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# .ui files live in the ui/ subdirectory; tell AUTOUIC where to find them
|
||||||
|
set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/ui)
|
||||||
|
|
||||||
NGL_WRAP_UI(zwmssaab_SRCS ${zwmssaab_UICS})
|
NGL_WRAP_UI(zwmssaab_SRCS ${zwmssaab_UICS})
|
||||||
NGL_ADD_LIBRARY2(WS zwmssaab SHARED ${zwmssaab_SRCS} ${zwmssaab_UICS} ${zwmssaab_IDLS})
|
NGL_ADD_LIBRARY2(WS zwmssaab SHARED ${zwmssaab_SRCS} ${zwmssaab_UICS} ${zwmssaab_IDLS})
|
||||||
NGL_TARGET_INCLUDE_DIRECTORIES(zwmssaab
|
NGL_TARGET_INCLUDE_DIRECTORIES(zwmssaab
|
||||||
@@ -55,7 +58,6 @@ if(QT6_GUI_AVAILABLE)
|
|||||||
PRIVATE
|
PRIVATE
|
||||||
${Qt6_Gui}
|
${Qt6_Gui}
|
||||||
Qt6::Xml
|
Qt6::Xml
|
||||||
Qt6::XmlPatterns
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
svcPpmCommon
|
svcPpmCommon
|
||||||
LtsUtilsSettings
|
LtsUtilsSettings
|
||||||
|
|||||||
+37
-36
@@ -45,6 +45,7 @@ ExportSaab::ExportSaab(LtsSession::LtsSession *session, const std::shared_ptr<Pa
|
|||||||
, m_session(session)
|
, m_session(session)
|
||||||
, m_configFile(nullptr)
|
, m_configFile(nullptr)
|
||||||
, m_ui(new Ui_SAABExport)
|
, m_ui(new Ui_SAABExport)
|
||||||
|
, m_logger(saab::getLogger("ExportSaab"))
|
||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
@@ -369,13 +370,13 @@ void ExportSaab::writeExercise(QXmlStreamWriter *writer) const
|
|||||||
using namespace XmlStrings;
|
using namespace XmlStrings;
|
||||||
|
|
||||||
writer->writeStartElement(SAAB_EXERCISE());
|
writer->writeStartElement(SAAB_EXERCISE());
|
||||||
writer->writeAttribute(SAAB_ID(), QUuid(l, m_currentExercise.id(), w2, b1, b2, b3, b4, b5, b6, b7, GuidContext::GuidExercise).toString(QUuid::WithoutBraces));
|
writer->writeAttribute(SAAB_ID(), QUuid(l, m_currentExercise.id, w2, b1, b2, b3, b4, b5, b6, b7, GuidContext::GuidExercise).toString(QUuid::WithoutBraces));
|
||||||
|
|
||||||
writer->writeTextElement(SAAB_EXPORT_TIME(), toSaabTime(m_session->partitionTime()));
|
writer->writeTextElement(SAAB_EXPORT_TIME(), toSaabTime(m_session->partitionTime()));
|
||||||
writer->writeTextElement(SAAB_PLANNED_START_TIME(), toSaabTime(m_currentExercise.beginTime()));
|
writer->writeTextElement(SAAB_PLANNED_START_TIME(), toSaabTime(m_currentExercise.beginTime));
|
||||||
writer->writeTextElement(SAAB_PLANNED_STOP_TIME(), toSaabTime(m_currentExercise.endTime()));
|
writer->writeTextElement(SAAB_PLANNED_STOP_TIME(), toSaabTime(m_currentExercise.endTime));
|
||||||
writer->writeTextElement(SAAB_DESIGNATION(), QString::fromStdString(m_currentExercise.name()));
|
writer->writeTextElement(SAAB_DESIGNATION(), QString::fromStdString(m_currentExercise.name));
|
||||||
writer->writeTextElement(SAAB_DESCRIPTION(), QString::fromStdString(m_currentExercise.description()));
|
writer->writeTextElement(SAAB_DESCRIPTION(), QString::fromStdString(m_currentExercise.description));
|
||||||
writer->writeTextElement(SAAB_WIND_SPEED(), QStringLiteral("0"));
|
writer->writeTextElement(SAAB_WIND_SPEED(), QStringLiteral("0"));
|
||||||
writer->writeTextElement(SAAB_WIND_DIRECTION(), QStringLiteral("0"));
|
writer->writeTextElement(SAAB_WIND_DIRECTION(), QStringLiteral("0"));
|
||||||
writer->writeEmptyElement(SAAB_EVALUATION_PACKAGE_FILE_NAME());
|
writer->writeEmptyElement(SAAB_EVALUATION_PACKAGE_FILE_NAME());
|
||||||
@@ -420,13 +421,13 @@ SaabPlayer *ExportSaab::toSaabPlayer(const ParticipantManagement::Party &party,
|
|||||||
|
|
||||||
result = new SaabUnit;
|
result = new SaabUnit;
|
||||||
|
|
||||||
result->symbol = m_mapPartyToForce.value(party.id()).symbolCode;
|
result->symbol = m_mapPartyToForce.value(party.id).symbolCode;
|
||||||
static_cast<SaabUnit *>(result)->unitSize = m_mapPartyToForce.value(party.id()).echelonCode;
|
static_cast<SaabUnit *>(result)->unitSize = m_mapPartyToForce.value(party.id).echelonCode;
|
||||||
result->designation = QString::fromStdString(party.name());
|
result->designation = QString::fromStdString(party.name);
|
||||||
result->trashcan = false;
|
result->trashcan = false;
|
||||||
result->isExternalPlayer = true;
|
result->isExternalPlayer = true;
|
||||||
result->force = m_mapPartyToForce.value(party.id()).forceCode;
|
result->force = m_mapPartyToForce.value(party.id).forceCode;
|
||||||
result->guid = QUuid(l, m_currentExercise.id(), w2, static_cast<uchar>(party.id()), b2, b3, b4, b5, b6, b7, GuidContext::GuidParty).toString(QUuid::WithoutBraces);
|
result->guid = QUuid(l, m_currentExercise.id, w2, static_cast<uchar>(party.id), b2, b3, b4, b5, b6, b7, GuidContext::GuidParty).toString(QUuid::WithoutBraces);
|
||||||
|
|
||||||
QList<int> keys = remainingParticipants.keys();
|
QList<int> keys = remainingParticipants.keys();
|
||||||
|
|
||||||
@@ -438,7 +439,7 @@ SaabPlayer *ExportSaab::toSaabPlayer(const ParticipantManagement::Party &party,
|
|||||||
|
|
||||||
ParticipantManagement::Participant participant = remainingParticipants.value(key);
|
ParticipantManagement::Participant participant = remainingParticipants.value(key);
|
||||||
|
|
||||||
if (!(participant.partyId() == party.id() && participant.superiorId() == 0))
|
if (!(participant.partyId == party.id && participant.superiorId == 0))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SaabPlayer *player = toSaabPlayer(participant, remainingParticipants);
|
SaabPlayer *player = toSaabPlayer(participant, remainingParticipants);
|
||||||
@@ -454,26 +455,26 @@ SaabPlayer *ExportSaab::toSaabPlayer(const ParticipantManagement::Party &party,
|
|||||||
|
|
||||||
SaabPlayer *ExportSaab::toSaabPlayer(const ParticipantManagement::Participant &participant, QMap<int, ParticipantManagement::Participant> &remainingParticipants)
|
SaabPlayer *ExportSaab::toSaabPlayer(const ParticipantManagement::Participant &participant, QMap<int, ParticipantManagement::Participant> &remainingParticipants)
|
||||||
{
|
{
|
||||||
if (participant.isDeleted())
|
if (participant.isDeleted)
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << "Participant with id " << participant.id() << " id deleted --> skipping";
|
DEBUG_LOG(m_logger) << "Participant with id " << participant.id << " id deleted --> skipping";
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (participant.externalId())
|
if (participant.externalId)
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << "Particpant with id " << participant.id() << " has external ID set to " << participant.externalId() << " --> not being exported.";
|
DEBUG_LOG(m_logger) << "Particpant with id " << participant.id << " has external ID set to " << participant.externalId << " --> not being exported.";
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaabPlayer *result;
|
SaabPlayer *result;
|
||||||
|
|
||||||
ParticipantManagement::Type type = m_types.value(participant.typeId());
|
ParticipantManagement::Type type = m_types.value(participant.typeId);
|
||||||
|
|
||||||
if (!m_mapTypeToSaabSymbol.contains(type.id()))
|
if (!m_mapTypeToSaabSymbol.contains(type.id))
|
||||||
mapType(type);
|
mapType(type);
|
||||||
|
|
||||||
switch (type.typeClass())
|
switch (type.typeClass)
|
||||||
{
|
{
|
||||||
case ParticipantManagement::TypeClass::SupportEntity:
|
case ParticipantManagement::TypeClass::SupportEntity:
|
||||||
result = new SaabOcPlayer;
|
result = new SaabOcPlayer;
|
||||||
@@ -491,9 +492,9 @@ SaabPlayer *ExportSaab::toSaabPlayer(const ParticipantManagement::Participant &p
|
|||||||
{
|
{
|
||||||
result = new SaabUnit;
|
result = new SaabUnit;
|
||||||
|
|
||||||
DEBUG_LOG(m_logger) << "Reading unit with " << participant.inferiorIds().size() << " inferiors";
|
DEBUG_LOG(m_logger) << "Reading unit with " << participant.inferiorIds.size() << " inferiors";
|
||||||
|
|
||||||
for (int32_t id : participant.inferiorIds())
|
for (int32_t id : participant.inferiorIds)
|
||||||
{
|
{
|
||||||
SaabPlayer *player = toSaabPlayer(remainingParticipants.value(id), remainingParticipants);
|
SaabPlayer *player = toSaabPlayer(remainingParticipants.value(id), remainingParticipants);
|
||||||
|
|
||||||
@@ -509,7 +510,7 @@ SaabPlayer *ExportSaab::toSaabPlayer(const ParticipantManagement::Participant &p
|
|||||||
|
|
||||||
if (!static_cast<SaabUnit *>(result)->inferiors.size())
|
if (!static_cast<SaabUnit *>(result)->inferiors.size())
|
||||||
{
|
{
|
||||||
DEBUG_LOG(m_logger) << "Unit " << participant.id() << " has no inferiors.";
|
DEBUG_LOG(m_logger) << "Unit " << participant.id << " has no inferiors.";
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -519,11 +520,11 @@ SaabPlayer *ExportSaab::toSaabPlayer(const ParticipantManagement::Participant &p
|
|||||||
case ParticipantManagement::TypeClass::Aircraft:
|
case ParticipantManagement::TypeClass::Aircraft:
|
||||||
case ParticipantManagement::TypeClass::Unknown:
|
case ParticipantManagement::TypeClass::Unknown:
|
||||||
default:
|
default:
|
||||||
DEBUG_LOG(m_logger) << "Type " << participant.typeId() << " is not supported.";
|
DEBUG_LOG(m_logger) << "Type " << participant.typeId << " is not supported.";
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString symbol = m_mapTypeToSaabSymbol.value(type.id());
|
QString symbol = m_mapTypeToSaabSymbol.value(type.id);
|
||||||
|
|
||||||
if (typeid(*result) == typeid(SaabUnit))
|
if (typeid(*result) == typeid(SaabUnit))
|
||||||
{
|
{
|
||||||
@@ -535,22 +536,22 @@ SaabPlayer *ExportSaab::toSaabPlayer(const ParticipantManagement::Participant &p
|
|||||||
else
|
else
|
||||||
result->symbol = symbol;
|
result->symbol = symbol;
|
||||||
|
|
||||||
result->designation = QString::fromStdString(participant.designator());
|
result->designation = QString::fromStdString(participant.designator);
|
||||||
result->trashcan = participant.isDeleted();
|
result->trashcan = participant.isDeleted;
|
||||||
result->rank = QStringLiteral("OF1");
|
result->rank = QStringLiteral("OF1");
|
||||||
result->isExternalPlayer = true;
|
result->isExternalPlayer = true;
|
||||||
if (participant.equipmentNumber().has_value())
|
if (participant.equipmentNumber.has_value())
|
||||||
result->simulatorId = participant.equipmentNumber().get();
|
result->simulatorId = participant.equipmentNumber.get();
|
||||||
result->force = m_mapPartyToForce.value(participant.partyId()).forceCode;
|
result->force = m_mapPartyToForce.value(participant.partyId).forceCode;
|
||||||
result->guid = QUuid(participant.id(), m_currentExercise.id(), w2, static_cast<uchar>(participant.partyId()), b2, b3, b4, b5, b6, b7, GuidContext::GuidParticipant).toString(QUuid::WithoutBraces);
|
result->guid = QUuid(participant.id, m_currentExercise.id, w2, static_cast<uchar>(participant.partyId), b2, b3, b4, b5, b6, b7, GuidContext::GuidParticipant).toString(QUuid::WithoutBraces);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ParticipantManagement::Participant ExportSaab::rootParticipant(const ParticipantManagement::Participant &participant, const QMap<int, ParticipantManagement::Participant> &participants) const
|
ParticipantManagement::Participant ExportSaab::rootParticipant(const ParticipantManagement::Participant &participant, const QMap<int, ParticipantManagement::Participant> &participants) const
|
||||||
{
|
{
|
||||||
if (participant.superiorId())
|
if (participant.superiorId)
|
||||||
return rootParticipant(participants.value(participant.superiorId()), participants);
|
return rootParticipant(participants.value(participant.superiorId), participants);
|
||||||
return participant;
|
return participant;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -563,10 +564,10 @@ void ExportSaab::mapType(const ParticipantManagement::Type &type)
|
|||||||
{
|
{
|
||||||
using namespace ParticipantManagement;
|
using namespace ParticipantManagement;
|
||||||
|
|
||||||
MapType dialog(ParticipantManagement::trTypeName(type.name()),
|
MapType dialog(ParticipantManagement::trTypeName(type.name),
|
||||||
m_mapEchelons,
|
m_mapEchelons,
|
||||||
m_mapSymbols,
|
m_mapSymbols,
|
||||||
type.typeClass() == TypeClass::Unit || type.typeClass() == TypeClass::SupportUnit,
|
type.typeClass == TypeClass::Unit || type.typeClass == TypeClass::SupportUnit,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
@@ -579,19 +580,19 @@ void ExportSaab::mapType(const ParticipantManagement::Type &type)
|
|||||||
saabTypeStr.append(dialog.echelonCode());
|
saabTypeStr.append(dialog.echelonCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
m_mapTypeToSaabSymbol.insert(type.id(), saabTypeStr);
|
m_mapTypeToSaabSymbol.insert(type.id, saabTypeStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExportSaab::mapPartyToForce(const ParticipantManagement::Party &party)
|
void ExportSaab::mapPartyToForce(const ParticipantManagement::Party &party)
|
||||||
{
|
{
|
||||||
MapParty dialog(QString::fromStdString(party.name()), m_mapForces, m_mapEchelons, m_mapSymbols, this);
|
MapParty dialog(QString::fromStdString(party.name), m_mapForces, m_mapEchelons, m_mapSymbols, this);
|
||||||
|
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
if (dialog.isSkipped())
|
if (dialog.isSkipped())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_mapPartyToForce.insert(party.id(), { m_mapForces.take(dialog.force()), dialog.echelonCode(), dialog.symbolCode() });
|
m_mapPartyToForce.insert(party.id, { m_mapForces.take(dialog.force()), dialog.echelonCode(), dialog.symbolCode() });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+7
-8
@@ -166,17 +166,16 @@ ParticipantManagement::ParticipantData ImportSaab::createParticipant(SaabPlayer
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
p.tacticalIdentifier(player->designation.toStdString());
|
p.tacticalIdentifier = player->designation.toStdString();
|
||||||
|
|
||||||
|
p.equipmentNumber = (player->simulatorId != INT_MIN ? player->simulatorId : 0);
|
||||||
p.equipmentNumber(player->simulatorId != INT_MIN ? player->simulatorId : 0);
|
p.assignState = ParticipantManagement::ParticipantAssignState::HandoutExcon;
|
||||||
p.assignState() = ParticipantManagement::ParticipantAssignState::HandoutExcon;
|
|
||||||
|
|
||||||
if (player->simulatorId != INT_MIN)
|
if (player->simulatorId != INT_MIN)
|
||||||
p.externalId(player->simulatorId);
|
p.externalId = player->simulatorId;
|
||||||
|
|
||||||
p.symbol(m_mapTypes[player->mappedTypeId].symbol());
|
p.symbol = m_mapTypes[player->mappedTypeId].symbol;
|
||||||
p.typeId(player->mappedTypeId);
|
p.typeId = player->mappedTypeId;
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
@@ -192,7 +191,7 @@ void ImportSaab::insertParty(SaabUnit *party)
|
|||||||
{
|
{
|
||||||
|
|
||||||
ParticipantManagement::ParticipantData newParty;
|
ParticipantManagement::ParticipantData newParty;
|
||||||
newParty.designator(party->designation.toStdString());
|
newParty.designator = party->designation.toStdString();
|
||||||
createNode(newParty, m_indexRoot, party);
|
createNode(newParty, m_indexRoot, party);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-15
@@ -182,18 +182,3 @@ void ImportSaabShow::slotCustomContextMenuActionTriggered(QAction *ac)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SchemaMessageHandler::handleMessage(QtMsgType type,
|
|
||||||
const QString &description,
|
|
||||||
const QUrl &identifier,
|
|
||||||
const QSourceLocation &sourceLocation)
|
|
||||||
{
|
|
||||||
ERROR_LOG(mLogger) << "type: " << type << " desc: " << description;
|
|
||||||
if (identifier.isValid())
|
|
||||||
ERROR_LOG(mLogger) << "identifier: " << identifier.toString();
|
|
||||||
if (!sourceLocation.isNull())
|
|
||||||
ERROR_LOG(mLogger) << "sourceLocation: "
|
|
||||||
<< sourceLocation.uri().toString()
|
|
||||||
<< " line: " << sourceLocation.line()
|
|
||||||
<< " column: " << sourceLocation.column()
|
|
||||||
;
|
|
||||||
}
|
|
||||||
-20
@@ -4,7 +4,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QtXml/QDomDocument>
|
#include <QtXml/QDomDocument>
|
||||||
#include <QtXmlPatterns/QAbstractMessageHandler>
|
|
||||||
#include <nglwidgets/ngldialog.h>
|
#include <nglwidgets/ngldialog.h>
|
||||||
#include "saab_logging.h"
|
#include "saab_logging.h"
|
||||||
|
|
||||||
@@ -13,25 +12,6 @@
|
|||||||
|
|
||||||
namespace saab
|
namespace saab
|
||||||
{
|
{
|
||||||
class SchemaMessageHandler : public QAbstractMessageHandler
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit SchemaMessageHandler(QObject *parent = nullptr)
|
|
||||||
: QAbstractMessageHandler(parent)
|
|
||||||
, mLogger(getLogger("SchemaMessageHandler"))
|
|
||||||
{}
|
|
||||||
~SchemaMessageHandler()
|
|
||||||
{}
|
|
||||||
protected:
|
|
||||||
void handleMessage(QtMsgType type,
|
|
||||||
const QString &description,
|
|
||||||
const QUrl &identifier = QUrl(),
|
|
||||||
const QSourceLocation &sourceLocation = QSourceLocation());
|
|
||||||
private:
|
|
||||||
LOGGER_T mLogger;
|
|
||||||
};
|
|
||||||
|
|
||||||
class ImportSaabShow : public NGLDialog
|
class ImportSaabShow : public NGLDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
+12
-12
@@ -26,16 +26,16 @@ MappingDialog::MappingDialog(QWidget *parent, bool typeClassIsUnit, const QStrin
|
|||||||
|
|
||||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||||
{
|
{
|
||||||
if (!m_offerDatabaseEntriesWithoutDISType && (type.disEntities().size() == 0))
|
if (!m_offerDatabaseEntriesWithoutDISType && (type.disEntities.size() == 0))
|
||||||
{
|
{
|
||||||
WARNING_LOG(mLogger) << "Type id " << type.id() << " does not have assigned DIS types! Type cannot be used when importing SAAB data!";
|
WARNING_LOG(mLogger) << "Type id " << type.id << " does not have assigned DIS types! Type cannot be used when importing SAAB data!";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type.isDeleted())
|
if (type.isDeleted)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const ParticipantManagement::TypeClass typeClassId = type.typeClass();
|
const ParticipantManagement::TypeClass typeClassId = type.typeClass;
|
||||||
|
|
||||||
if (typeClassId == ParticipantManagement::TypeClass::Unknown ||
|
if (typeClassId == ParticipantManagement::TypeClass::Unknown ||
|
||||||
typeClassId == ParticipantManagement::TypeClass::Vessel ||
|
typeClassId == ParticipantManagement::TypeClass::Vessel ||
|
||||||
@@ -57,7 +57,7 @@ MappingDialog::MappingDialog(QWidget *parent, bool typeClassIsUnit, const QStrin
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &typeclass : setTypeClasses)
|
for (const auto &typeclass : setTypeClasses)
|
||||||
mUi->m_ltsComboBox_typeClass->addItem(ParticipantManagement::toString(typeclass), typeclass);
|
mUi->m_ltsComboBox_typeClass->addItem(ParticipantManagement::toString(typeclass), static_cast<int>(typeclass));
|
||||||
|
|
||||||
slotClassTypeChanged();
|
slotClassTypeChanged();
|
||||||
|
|
||||||
@@ -76,24 +76,24 @@ void MappingDialog::slotClassTypeChanged()
|
|||||||
{
|
{
|
||||||
mUi->m_ltsComboBox_type->clear();
|
mUi->m_ltsComboBox_type->clear();
|
||||||
|
|
||||||
int currentClass = mUi->m_ltsComboBox_typeClass->currentData().toInt();
|
ParticipantManagement::TypeClass currentClass = static_cast<ParticipantManagement::TypeClass>(mUi->m_ltsComboBox_typeClass->currentData().toInt());
|
||||||
|
|
||||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||||
{
|
{
|
||||||
if(type.isDeleted())
|
if(type.isDeleted)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (type.typeClass() != currentClass)
|
if (type.typeClass != currentClass)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!m_offerDatabaseEntriesWithoutDISType && (type.disEntities().size() == 0))
|
if (!m_offerDatabaseEntriesWithoutDISType && (type.disEntities.size() == 0))
|
||||||
{
|
{
|
||||||
|
|
||||||
WARNING_LOG(mLogger) << "Type id " << type.id() << " does not have assigned DIS types! Type cannot be used when importing SAAB data!";
|
WARNING_LOG(mLogger) << "Type id " << type.id << " does not have assigned DIS types! Type cannot be used when importing SAAB data!";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
mUi->m_ltsComboBox_type->addItem(QString::fromStdString(type.name()), type.id());
|
mUi->m_ltsComboBox_type->addItem(QString::fromStdString(type.name), type.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,6 +126,6 @@ bool MappingDialog::skipAllUnmappedElements() const
|
|||||||
int32_t MappingDialog::getMappedTypeId() const
|
int32_t MappingDialog::getMappedTypeId() const
|
||||||
{
|
{
|
||||||
int index = mUi->m_ltsComboBox_type->currentData().toInt();
|
int index = mUi->m_ltsComboBox_type->currentData().toInt();
|
||||||
return m_mapTypes[index].id();
|
return m_mapTypes[index].id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -75,6 +75,9 @@ if(QT6_GUI_AVAILABLE)
|
|||||||
LtsSessionData
|
LtsSessionData
|
||||||
NGLLogger
|
NGLLogger
|
||||||
Qt6::Xml
|
Qt6::Xml
|
||||||
|
# Qt6 Migration: Qt5::WebEngineWidgets transitively linked Qt5::PrintSupport
|
||||||
|
# (plan_editor.cpp includes <QtPrintSupport/QPrintDialog>); Qt6 dropped that.
|
||||||
|
Qt6::PrintSupport
|
||||||
ngltranslator
|
ngltranslator
|
||||||
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
|||||||
+29
-29
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <LtsUtils/LtsUtilsGui/LtsUtilsGuiDds/request_helper.h>
|
#include <LtsUtils/LtsUtilsGui/LtsUtilsGuiDds/request_helper.h>
|
||||||
|
|
||||||
#include <flm_data_plugin_interface.h>
|
#include <Plugins/FileManagement/flm_data_plugin_interface.h>
|
||||||
#include <FileManagement/flm_explorer_gui_plugin_interface.h>
|
#include <FileManagement/flm_explorer_gui_plugin_interface.h>
|
||||||
|
|
||||||
#include <ParticipantManagement/ppm_data_plugin_interface.h>
|
#include <ParticipantManagement/ppm_data_plugin_interface.h>
|
||||||
@@ -475,9 +475,9 @@ bool InterfaceImpl::fmsCreatePlan(bool clearGeometryModel)
|
|||||||
|
|
||||||
FileManagement::FileContent fc = m_internal->m_flmDtc->fileContent(fileId);
|
FileManagement::FileContent fc = m_internal->m_flmDtc->fileContent(fileId);
|
||||||
|
|
||||||
m_internal->m_currentFolderId = fc.folderId();
|
m_internal->m_currentFolderId = fc.folderId;
|
||||||
m_internal->m_currentFileId = fileId;
|
m_internal->m_currentFileId = fileId;
|
||||||
m_internal->m_currentNameOfPlan = QString::fromStdString(fc.name());
|
m_internal->m_currentNameOfPlan = QString::fromStdString(fc.name);
|
||||||
|
|
||||||
QFileInfo fileInfo(m_internal->m_currentNameOfPlan);
|
QFileInfo fileInfo(m_internal->m_currentNameOfPlan);
|
||||||
m_internal->m_planEditor->setNameOfPlan(fileInfo.baseName());
|
m_internal->m_planEditor->setNameOfPlan(fileInfo.baseName());
|
||||||
@@ -511,7 +511,7 @@ bool InterfaceImpl::fmsModifyPlan(int fileId, bool saveAs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FileManagement::FileContent fileContent = m_internal->m_flmDtc->fileContent(fileId);
|
FileManagement::FileContent fileContent = m_internal->m_flmDtc->fileContent(fileId);
|
||||||
bool differentUser = fileContent.operatorId() != LtsSessionData::LtsSessionData::getInstance()->getOperatorId();
|
bool differentUser = fileContent.operatorId != LtsSessionData::LtsSessionData::getInstance()->getOperatorId();
|
||||||
|
|
||||||
if (saveAs || differentUser)
|
if (saveAs || differentUser)
|
||||||
{
|
{
|
||||||
@@ -527,8 +527,8 @@ bool InterfaceImpl::fmsModifyPlan(int fileId, bool saveAs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString nameOfPlan = QString::fromStdString(fileContent.name());
|
QString nameOfPlan = QString::fromStdString(fileContent.name);
|
||||||
m_internal->m_currentFolderId = fileContent.folderId();
|
m_internal->m_currentFolderId = fileContent.folderId;
|
||||||
m_internal->m_currentNameOfPlan = nameOfPlan;
|
m_internal->m_currentNameOfPlan = nameOfPlan;
|
||||||
m_internal->m_currentFileId = fileId;
|
m_internal->m_currentFileId = fileId;
|
||||||
|
|
||||||
@@ -592,7 +592,7 @@ void InterfaceImpl::fmsReadPlan()
|
|||||||
m_internal->m_planEditor->onPlanReset();
|
m_internal->m_planEditor->onPlanReset();
|
||||||
|
|
||||||
FileManagement::FileContent fc = m_internal->m_flmDtc->fileContent(fileId);
|
FileManagement::FileContent fc = m_internal->m_flmDtc->fileContent(fileId);
|
||||||
QString nameOfPlan = QString::fromStdString(fc.name());
|
QString nameOfPlan = QString::fromStdString(fc.name);
|
||||||
|
|
||||||
if (content.size() == 0)
|
if (content.size() == 0)
|
||||||
{
|
{
|
||||||
@@ -606,8 +606,8 @@ void InterfaceImpl::fmsReadPlan()
|
|||||||
m_internal->m_planEditor->setPlan(content);
|
m_internal->m_planEditor->setPlan(content);
|
||||||
|
|
||||||
m_internal->m_currentNameOfPlan = nameOfPlan;
|
m_internal->m_currentNameOfPlan = nameOfPlan;
|
||||||
m_internal->m_currentFolderId = fc.folderId();
|
m_internal->m_currentFolderId = fc.folderId;
|
||||||
m_internal->m_currentFileId = fc.id();
|
m_internal->m_currentFileId = fc.id;
|
||||||
|
|
||||||
QFileInfo fileInfo(m_internal->m_currentNameOfPlan);
|
QFileInfo fileInfo(m_internal->m_currentNameOfPlan);
|
||||||
m_internal->m_planEditor->setNameOfPlan(fileInfo.baseName());
|
m_internal->m_planEditor->setNameOfPlan(fileInfo.baseName());
|
||||||
@@ -650,7 +650,7 @@ void InterfaceImpl::fmsImportPlan()
|
|||||||
if (fileId > 0)
|
if (fileId > 0)
|
||||||
{
|
{
|
||||||
FileManagement::FileContent fc = m_internal->m_flmDtc->fileContent(fileId);
|
FileManagement::FileContent fc = m_internal->m_flmDtc->fileContent(fileId);
|
||||||
QString nameOfPlan = QString::fromStdString(fc.name());
|
QString nameOfPlan = QString::fromStdString(fc.name);
|
||||||
if (content.size() == 0)
|
if (content.size() == 0)
|
||||||
{
|
{
|
||||||
ERROR_LOG(m_logger) << "Error plan [" << nameOfPlan << "] is empty";
|
ERROR_LOG(m_logger) << "Error plan [" << nameOfPlan << "] is empty";
|
||||||
@@ -690,7 +690,7 @@ bool InterfaceImpl::fmsWritePlan(bool saveAs)
|
|||||||
|
|
||||||
FileManagement::FileContent planFileContent;
|
FileManagement::FileContent planFileContent;
|
||||||
if (m_internal->m_flmDtc->getFile(FileManagement::FileType::TacticalPlan, m_internal->m_currentFolderId, m_internal->m_currentNameOfPlan, planFileContent))
|
if (m_internal->m_flmDtc->getFile(FileManagement::FileType::TacticalPlan, m_internal->m_currentFolderId, m_internal->m_currentNameOfPlan, planFileContent))
|
||||||
m_internal->m_currentFileId = planFileContent.id();
|
m_internal->m_currentFileId = planFileContent.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (saveAs || (m_internal->m_currentFileId <= 0))
|
if (saveAs || (m_internal->m_currentFileId <= 0))
|
||||||
@@ -726,7 +726,7 @@ void InterfaceImpl::fmsDeletePlan()
|
|||||||
if (fileId > 0)
|
if (fileId > 0)
|
||||||
{
|
{
|
||||||
FileManagement::FileContent fc = m_internal->m_flmDtc->fileContent(fileId);
|
FileManagement::FileContent fc = m_internal->m_flmDtc->fileContent(fileId);
|
||||||
QString nameOfPlan = QString::fromStdString(fc.name());
|
QString nameOfPlan = QString::fromStdString(fc.name);
|
||||||
|
|
||||||
LtsWidgets::Button doIt = LtsWidgets::LtsMessageDialog::showMessage(
|
LtsWidgets::Button doIt = LtsWidgets::LtsMessageDialog::showMessage(
|
||||||
m_session->baseLayout()
|
m_session->baseLayout()
|
||||||
@@ -753,7 +753,7 @@ void InterfaceImpl::fmsDeletePlan()
|
|||||||
|
|
||||||
void InterfaceImpl::onPlanContentChanged(const FileManagement::FileContent &data, DataModification modType)
|
void InterfaceImpl::onPlanContentChanged(const FileManagement::FileContent &data, DataModification modType)
|
||||||
{
|
{
|
||||||
if (data.fileType() != FileManagement::FileType::TacticalPlan)
|
if (data.fileType != FileManagement::FileType::TacticalPlan)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (modType)
|
switch (modType)
|
||||||
@@ -761,7 +761,7 @@ void InterfaceImpl::onPlanContentChanged(const FileManagement::FileContent &data
|
|||||||
case DataModification::eModified :
|
case DataModification::eModified :
|
||||||
break;
|
break;
|
||||||
case DataModification::eRemoved :
|
case DataModification::eRemoved :
|
||||||
if (m_internal->m_currentFileId == data.id())
|
if (m_internal->m_currentFileId == data.id)
|
||||||
m_internal->m_currentFileId = -1;
|
m_internal->m_currentFileId = -1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -780,7 +780,7 @@ void InterfaceImpl::onIterateParticipantsSidc()
|
|||||||
|
|
||||||
auto gatherUpSidc = [&participantSidcsInUse](const ParticipantManagement::Participant & data)
|
auto gatherUpSidc = [&participantSidcsInUse](const ParticipantManagement::Participant & data)
|
||||||
{
|
{
|
||||||
const QString &sidcCode = QString::fromStdString(data.symbol());
|
const QString &sidcCode = QString::fromStdString(data.symbol);
|
||||||
|
|
||||||
if (AdvancedSymbology::SidcCodec::isEncoded(sidcCode))
|
if (AdvancedSymbology::SidcCodec::isEncoded(sidcCode))
|
||||||
{
|
{
|
||||||
@@ -822,7 +822,7 @@ void InterfaceImpl::readSymbolFavouritesRequest(const QString &favName, QString
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int fileId = fileContent.id();
|
int fileId = fileContent.id;
|
||||||
QByteArray content;
|
QByteArray content;
|
||||||
|
|
||||||
if (!m_internal->m_flmGui->loadContent(fileId, content, true))
|
if (!m_internal->m_flmGui->loadContent(fileId, content, true))
|
||||||
@@ -929,23 +929,23 @@ void InterfaceImpl::storeSymbolFavouritesRequest(const QString &favName, const Q
|
|||||||
LtsWidgets::LtsMessageDialog::showMessage(m_session->baseLayout(), msg, m_internal->m_messageBoxTitle);
|
LtsWidgets::LtsMessageDialog::showMessage(m_session->baseLayout(), msg, m_internal->m_messageBoxTitle);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!m_internal->m_flmGui->saveContent(favContent.id(), favXMLContent.toUtf8(), QString()))
|
if (!m_internal->m_flmGui->saveContent(favContent.id, favXMLContent.toUtf8(), QString()))
|
||||||
ERROR_LOG(m_logger) << "Cannot save symbol favourites in library";
|
ERROR_LOG(m_logger) << "Cannot save symbol favourites in library";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
favContent.name(favName.toStdString());
|
favContent.name = favName.toStdString();
|
||||||
favContent.isTemplate(false);
|
favContent.isTemplate = false;
|
||||||
favContent.isUsedBy(false);
|
favContent.isUsedBy = false;
|
||||||
favContent.usedBy(0);
|
favContent.usedBy = 0;
|
||||||
favContent.folderId(folderId);
|
favContent.folderId = folderId;
|
||||||
favContent.fileStatus(FileManagement::FileStatus::Valid);
|
favContent.fileStatus = FileManagement::FileStatus::Valid;
|
||||||
favContent.fileCategory(FileManagement::FileCategory::Global);
|
favContent.fileCategory = FileManagement::FileCategory::Global;
|
||||||
favContent.fileType(FileManagement::FileType::OperatorFavourite);
|
favContent.fileType = FileManagement::FileType::OperatorFavourite;
|
||||||
favContent.exerciseId();
|
favContent.exerciseId = 0;
|
||||||
favContent.phaseId();
|
favContent.phaseId = 0;
|
||||||
favContent.lastModified(QDateTime::currentMSecsSinceEpoch());
|
favContent.lastModified = QDateTime::currentMSecsSinceEpoch();
|
||||||
favContent.operatorId(LtsSessionData::LtsSessionData::getInstance()->getOperatorId());
|
favContent.operatorId = LtsSessionData::LtsSessionData::getInstance()->getOperatorId();
|
||||||
|
|
||||||
|
|
||||||
ERROR_LOG(m_logger) << "New file content = " << favXMLContent;
|
ERROR_LOG(m_logger) << "New file content = " << favXMLContent;
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||||
#include <Lts/Common/ProjectConfig/project_defines.h>
|
#include <Lts/Common/ProjectConfig/project_defines.h>
|
||||||
#include <PlanEditor/PlanEditorPlugin/plan_editor_gui_plugin_interface.h>
|
#include <PlanEditor/PlanEditorPlugin/plan_editor_gui_plugin_interface.h>
|
||||||
#include <flm_data_plugin_interface.h>
|
#include <Plugins/FileManagement/flm_data_plugin_interface.h>
|
||||||
|
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
|
|
||||||
|
|||||||
+16
-16
@@ -136,24 +136,24 @@ void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
|||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
i.next();
|
i.next();
|
||||||
SInt32 vulnerabilityState = i.value().vulnerabilityState;
|
SInt32 vulnerabilityState = static_cast<SInt32>(i.value().vulnerabilityState);
|
||||||
Float64 lat = i.value().pos().lat() * 180 / M_PI;
|
Float64 lat = i.value().pos.lat * 180 / M_PI;
|
||||||
Float64 lon = i.value().pos().lon() * 180 / M_PI;
|
Float64 lon = i.value().pos.lon * 180 / M_PI;
|
||||||
DEBUG_LOG(m_logger) << "GeoPairing::calculateAirFire"
|
DEBUG_LOG(m_logger) << "GeoPairing::calculateAirFire"
|
||||||
<< "\nl_Updater->update : " << i.key()
|
<< "\nl_Updater->update : " << i.key()
|
||||||
<< "\n: participantId=" << i.value().participantId()
|
<< "\n: participantId=" << i.value().participantId
|
||||||
<< "\n participantTypeId= " << i.value().participantTypeId()
|
<< "\n participantTypeId= " << i.value().participantTypeId
|
||||||
<< "\n pos lat=" << lat
|
<< "\n pos lat=" << lat
|
||||||
<< "\n lon=" << lon
|
<< "\n lon=" << lon
|
||||||
<< "\n alt=" << i.value().pos().z()
|
<< "\n alt=" << i.value().pos.z
|
||||||
<< "\n posTime=" << i.value().sampleTime()
|
<< "\n posTime=" << i.value().sampleTime
|
||||||
<< "\n state=" << i.value().vulnerabilityState
|
<< "\n state=" << i.value().vulnerabilityState
|
||||||
<< "\n state (SInt32)=" << vulnerabilityState;
|
<< "\n state (SInt32)=" << vulnerabilityState;
|
||||||
l_Updater->update(i.value().participantId(),
|
l_Updater->update(i.value().participantId,
|
||||||
lat,
|
lat,
|
||||||
lon,
|
lon,
|
||||||
i.value().pos().z(),
|
i.value().pos.z,
|
||||||
i.value().sampleTime() / 1000, //s
|
i.value().sampleTime / 1000, //s
|
||||||
vulnerabilityState);
|
vulnerabilityState);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
|||||||
if (l_TargetFound != l_CachedTrackingState || l_TimeoutPassed)
|
if (l_TargetFound != l_CachedTrackingState || l_TimeoutPassed)
|
||||||
{
|
{
|
||||||
// prepare response for player
|
// prepare response for player
|
||||||
m_reportTarget.playerId = i.value().participantId();
|
m_reportTarget.playerId = i.value().participantId;
|
||||||
m_reportTarget.sendData.clear();
|
m_reportTarget.sendData.clear();
|
||||||
m_reportTarget.sendData.append(0xEB); // Report Target Detection
|
m_reportTarget.sendData.append(0xEB); // Report Target Detection
|
||||||
|
|
||||||
@@ -843,11 +843,11 @@ bool GeoPairing::geoPairingData(const std::shared_ptr<N_Ballistic::BallisticServ
|
|||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
i.next();
|
i.next();
|
||||||
DEBUG_LOG(m_logger) << i.key() << ": participantId=" << i.value().participantId()
|
DEBUG_LOG(m_logger) << i.key() << ": participantId=" << i.value().participantId
|
||||||
<< " participantTypeId= " << i.value().participantTypeId()
|
<< " participantTypeId= " << i.value().participantTypeId
|
||||||
<< " pos lat=" << i.value().pos().lat()
|
<< " pos lat=" << i.value().pos.lat
|
||||||
<< " pos lon=" << i.value().pos().lon()
|
<< " pos lon=" << i.value().pos.lon
|
||||||
<< " z=" << i.value().pos().z();
|
<< " z=" << i.value().pos.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,8 @@
|
|||||||
# $Author$
|
# $Author$
|
||||||
#
|
#
|
||||||
|
|
||||||
# BZip2 stub - libbz2-dev not available, disable bzip2 support
|
# BZip2 (legacy REQUIRED it; defines HAVE_BZIP2 so the real impl compiles instead of the stub)
|
||||||
SET(HAVE_BZIP2 FALSE)
|
FIND_PACKAGE(BZip2 REQUIRED)
|
||||||
MESSAGE(STATUS "BZip2 disabled - development headers not available")
|
|
||||||
|
|
||||||
SET(nglcomp_SRCS
|
SET(nglcomp_SRCS
|
||||||
nglcomp_bzip2iodevice.cpp
|
nglcomp_bzip2iodevice.cpp
|
||||||
@@ -25,8 +24,14 @@ NGL_TARGET_LINK_LIBRARIES(nglcompression
|
|||||||
PRIVATE
|
PRIVATE
|
||||||
Qt6::Concurrent
|
Qt6::Concurrent
|
||||||
NGLLogger
|
NGLLogger
|
||||||
|
${BZIP2_LIBRARIES}
|
||||||
)
|
)
|
||||||
# BZip2 disabled - no linking needed
|
NGL_TARGET_INCLUDE_DIRECTORIES(nglcompression
|
||||||
|
PRIVATE
|
||||||
|
${BZIP2_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
# Enable the real bzip2 impl (guard in nglcomp_bzip2iodevice.{h,cpp}); legacy always compiled it
|
||||||
|
TARGET_COMPILE_DEFINITIONS(nglcompression PRIVATE HAVE_BZIP2)
|
||||||
NGL_INSTALL_TARGET(nglcompression)
|
NGL_INSTALL_TARGET(nglcompression)
|
||||||
|
|
||||||
IF(BUILD_WS AND BUILD_TESTING)
|
IF(BUILD_WS AND BUILD_TESTING)
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ IF(KDCHART_INCLUDE_DIRS AND KDCHART_LIBRARY)
|
|||||||
ELSE()
|
ELSE()
|
||||||
|
|
||||||
FIND_PATH(KDCHART_INCLUDE_DIRS KDChart/kdchart_export.h)
|
FIND_PATH(KDCHART_INCLUDE_DIRS KDChart/kdchart_export.h)
|
||||||
FIND_LIBRARY(KDCHART_LIBRARY NAMES kdchart)
|
# KDChart's Qt6 builds install the lib as libkdchart-qt6.so (OUTPUT_NAME
|
||||||
|
# kdchart${_LIBRARY_QTID}); Qt5 builds (legacy env) use libkdchart.so.
|
||||||
|
FIND_LIBRARY(KDCHART_LIBRARY NAMES kdchart kdchart-qt6)
|
||||||
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(KDChart DEFAULT_MSG KDCHART_LIBRARY KDCHART_INCLUDE_DIRS)
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(KDChart DEFAULT_MSG KDCHART_LIBRARY KDCHART_INCLUDE_DIRS)
|
||||||
|
|||||||
@@ -0,0 +1,117 @@
|
|||||||
|
# FindOpenSceneGraph.cmake
|
||||||
|
#
|
||||||
|
# Locate an installed OpenSceneGraph and expose the module variables that the
|
||||||
|
# Legatus BuildingViewer stack links against:
|
||||||
|
# OSG_INCLUDE_DIR, OPENSCENEGRAPH_INCLUDE_DIRS
|
||||||
|
# OPENSCENEGRAPH_LIBRARIES (the OSG component libs that were found)
|
||||||
|
# OPENTHREADS_LIBRARIES
|
||||||
|
# OPENSCENEGRAPH_FOUND, OPENSCENEGRAPH_VERSION
|
||||||
|
#
|
||||||
|
# NOTE (Qt6-migration port): OSG 3.4.1 ships no FindOpenSceneGraph.cmake and
|
||||||
|
# installs no OpenSceneGraphConfig.cmake, so this module is supplied to close
|
||||||
|
# the bld/OSG floor. It finds the 3.4.1 build installed under CMAKE_PREFIX_PATH
|
||||||
|
# (the component libs live under <prefix>/lib64) and honours the requested
|
||||||
|
# components -- including the ported Qt6 osgQt (see the .osg-port notes).
|
||||||
|
#
|
||||||
|
# Mirrors the classic OSG Find-module variable names that BuildingViewer/Common
|
||||||
|
# links: ${OSG_INCLUDE_DIR}, ${OPENSCENEGRAPH_LIBRARIES}, ${OPENTHREADS_LIBRARIES}.
|
||||||
|
|
||||||
|
SET(OSG_SEARCH_PREFIXES ${CMAKE_PREFIX_PATH} /usr/local /usr)
|
||||||
|
|
||||||
|
# Include dir: locate the osg/Version header.
|
||||||
|
FIND_PATH(OSG_INCLUDE_DIR
|
||||||
|
NAMES osg/Version
|
||||||
|
PATHS ${OSG_SEARCH_PREFIXES}
|
||||||
|
PATH_SUFFIXES include)
|
||||||
|
|
||||||
|
# OpenThreads support library (distinct SONAME: libOpenThreads.so.20 for 3.4.1).
|
||||||
|
FIND_LIBRARY(OPENTHREADS_LIBRARY
|
||||||
|
NAMES OpenThreads
|
||||||
|
PATHS ${OSG_SEARCH_PREFIXES}
|
||||||
|
PATH_SUFFIXES lib lib64)
|
||||||
|
|
||||||
|
# OSG component libraries. Find each that exists and collect them so
|
||||||
|
# OPENSCENEGRAPH_LIBRARIES covers the transitive dependency set the BgViewer
|
||||||
|
# SDK and BuildingViewerCommon link (the SDK's NEEDED entries require
|
||||||
|
# osg/DB/GA/Qt/Shadow/Sim/Text/Util/Viewer/Particle/Manipulator/Animation).
|
||||||
|
SET(OSG_COMPONENT_LIBS
|
||||||
|
osg
|
||||||
|
osgDB
|
||||||
|
osgUtil
|
||||||
|
osgGA
|
||||||
|
osgText
|
||||||
|
osgViewer
|
||||||
|
osgAnimation
|
||||||
|
osgManipulator
|
||||||
|
osgParticle
|
||||||
|
osgShadow
|
||||||
|
osgSim
|
||||||
|
osgWidget
|
||||||
|
osgQt)
|
||||||
|
|
||||||
|
SET(OPENSCENEGRAPH_LIBRARIES "")
|
||||||
|
FOREACH(_osg_lib ${OSG_COMPONENT_LIBS})
|
||||||
|
FIND_LIBRARY(OSG_LIBRARY_${_osg_lib}
|
||||||
|
NAMES ${_osg_lib}
|
||||||
|
PATHS ${OSG_SEARCH_PREFIXES}
|
||||||
|
PATH_SUFFIXES lib lib64)
|
||||||
|
IF(OSG_LIBRARY_${_osg_lib})
|
||||||
|
LIST(APPEND OPENSCENEGRAPH_LIBRARIES ${OSG_LIBRARY_${_osg_lib}})
|
||||||
|
SET(OPENSCENEGRAPH_${_osg_lib}_FOUND TRUE)
|
||||||
|
ELSE()
|
||||||
|
SET(OPENSCENEGRAPH_${_osg_lib}_FOUND FALSE)
|
||||||
|
ENDIF()
|
||||||
|
ENDFOREACH()
|
||||||
|
|
||||||
|
# Core libs are mandatory for the package to count as found.
|
||||||
|
SET(_osg_core_ok TRUE)
|
||||||
|
IF(NOT OSG_LIBRARY_osg OR NOT OSG_LIBRARY_osgDB OR NOT OSG_LIBRARY_osgUtil
|
||||||
|
OR NOT OSG_LIBRARY_osgGA OR NOT OSG_LIBRARY_osgViewer OR NOT OPENTHREADS_LIBRARY)
|
||||||
|
SET(_osg_core_ok FALSE)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Any requested component that is missing makes the package not found.
|
||||||
|
FOREACH(_osg_req ${OpenSceneGraph_FIND_COMPONENTS})
|
||||||
|
IF(NOT OSG_LIBRARY_${_osg_req})
|
||||||
|
SET(_osg_core_ok FALSE)
|
||||||
|
MESSAGE(STATUS "OpenSceneGraph: required component '${_osg_req}' not found")
|
||||||
|
ENDIF()
|
||||||
|
ENDFOREACH()
|
||||||
|
|
||||||
|
# Version string from the installed header's OPENSCENEGRAPH_*_VERSION macros.
|
||||||
|
IF(OSG_INCLUDE_DIR)
|
||||||
|
FILE(READ "${OSG_INCLUDE_DIR}/osg/Version" _osg_version_header)
|
||||||
|
STRING(REGEX MATCH "#define[ \t]+OPENSCENEGRAPH_MAJOR_VERSION[ \t]+[0-9]+"
|
||||||
|
_osg_m "${_osg_version_header}")
|
||||||
|
STRING(REGEX MATCH "#define[ \t]+OPENSCENEGRAPH_MINOR_VERSION[ \t]+[0-9]+"
|
||||||
|
_osg_n "${_osg_version_header}")
|
||||||
|
STRING(REGEX MATCH "#define[ \t]+OPENSCENEGRAPH_PATCH_VERSION[ \t]+[0-9]+"
|
||||||
|
_osg_p "${_osg_version_header}")
|
||||||
|
STRING(REGEX REPLACE "[^0-9]" "" _osg_major "${_osg_m}")
|
||||||
|
STRING(REGEX REPLACE "[^0-9]" "" _osg_minor "${_osg_n}")
|
||||||
|
STRING(REGEX REPLACE "[^0-9]" "" _osg_patch "${_osg_p}")
|
||||||
|
IF(_osg_major AND _osg_minor AND _osg_patch)
|
||||||
|
SET(OPENSCENEGRAPH_VERSION "${_osg_major}.${_osg_minor}.${_osg_patch}")
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(OSG_INCLUDE_DIR AND _osg_core_ok)
|
||||||
|
SET(OPENSCENEGRAPH_FOUND TRUE)
|
||||||
|
SET(OPENSCENEGRAPH_INCLUDE_DIRS ${OSG_INCLUDE_DIR})
|
||||||
|
SET(OPENTHREADS_LIBRARIES ${OPENTHREADS_LIBRARY})
|
||||||
|
ELSE()
|
||||||
|
SET(OPENSCENEGRAPH_FOUND FALSE)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSceneGraph
|
||||||
|
FOUND_VAR OPENSCENEGRAPH_FOUND
|
||||||
|
VERSION_VAR OPENSCENEGRAPH_VERSION
|
||||||
|
REQUIRED_VARS OPENSCENEGRAPH_INCLUDE_DIRS OPENSCENEGRAPH_LIBRARIES OPENTHREADS_LIBRARIES)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(
|
||||||
|
OSG_INCLUDE_DIR OPENTHREADS_LIBRARY
|
||||||
|
OSG_LIBRARY_osg OSG_LIBRARY_osgDB OSG_LIBRARY_osgUtil OSG_LIBRARY_osgGA
|
||||||
|
OSG_LIBRARY_osgText OSG_LIBRARY_osgViewer OSG_LIBRARY_osgAnimation
|
||||||
|
OSG_LIBRARY_osgManipulator OSG_LIBRARY_osgParticle OSG_LIBRARY_osgShadow
|
||||||
|
OSG_LIBRARY_osgSim OSG_LIBRARY_osgWidget OSG_LIBRARY_osgQt)
|
||||||
@@ -25,16 +25,32 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Prebuilt Schusstafel package (Schusstafel.h + libSchusstafel.{so,a}); see the
|
||||||
|
# external/ symlink pattern used by FindArcGIS (${CMAKE_SOURCE_DIR}/external,
|
||||||
|
# /workspace/external in the build container).
|
||||||
|
SET(_SCHUSSTAFEL_HINTS
|
||||||
|
"${CMAKE_SOURCE_DIR}/external/Schusstafel"
|
||||||
|
"/workspace/external/Schusstafel"
|
||||||
|
)
|
||||||
|
|
||||||
IF(SCHUSSTAFEL_INCLUDE_DIR AND SCHUSSTAFEL_LIBRARY)
|
IF(SCHUSSTAFEL_INCLUDE_DIR AND SCHUSSTAFEL_LIBRARY)
|
||||||
SET(SCHUSSTAFEL_FOUND TRUE)
|
SET(SCHUSSTAFEL_FOUND TRUE)
|
||||||
ELSE(SCHUSSTAFEL_INCLUDE_DIR AND SCHUSSTAFEL_LIBRARY)
|
ELSE(SCHUSSTAFEL_INCLUDE_DIR AND SCHUSSTAFEL_LIBRARY)
|
||||||
|
|
||||||
FIND_PATH(SCHUSSTAFEL_INCLUDE_DIR Schusstafel.h)
|
FIND_PATH(SCHUSSTAFEL_INCLUDE_DIR Schusstafel.h HINTS ${_SCHUSSTAFEL_HINTS})
|
||||||
FIND_LIBRARY_WITH_DEBUG(SCHUSSTAFEL_LIBRARY WIN32_DEBUG_POSTFIX d NAMES Schusstafel libSchusstafel)
|
FIND_LIBRARY_WITH_DEBUG(SCHUSSTAFEL_LIBRARY WIN32_DEBUG_POSTFIX d NAMES Schusstafel libSchusstafel HINTS ${_SCHUSSTAFEL_HINTS})
|
||||||
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Schusstafel DEFAULT_MSG SCHUSSTAFEL_LIBRARY SCHUSSTAFEL_INCLUDE_DIR)
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Schusstafel DEFAULT_MSG SCHUSSTAFEL_LIBRARY SCHUSSTAFEL_INCLUDE_DIR)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(SCHUSSTAFEL_INCLUDE_DIR SCHUSSTAFEL_LIBRARY)
|
MARK_AS_ADVANCED(SCHUSSTAFEL_INCLUDE_DIR SCHUSSTAFEL_LIBRARY)
|
||||||
ENDIF(SCHUSSTAFEL_INCLUDE_DIR AND SCHUSSTAFEL_LIBRARY)
|
ENDIF(SCHUSSTAFEL_INCLUDE_DIR AND SCHUSSTAFEL_LIBRARY)
|
||||||
|
|
||||||
|
# Imported target consumed by cesPluginGeoPairing ($<TARGET_EXISTS:Schusstafel::Schusstafel>):
|
||||||
|
# carries the include dir for #include <Schusstafel.h> and the lib for the ST_* symbols.
|
||||||
|
IF(SCHUSSTAFEL_FOUND AND NOT TARGET Schusstafel::Schusstafel)
|
||||||
|
ADD_LIBRARY(Schusstafel::Schusstafel UNKNOWN IMPORTED)
|
||||||
|
SET_PROPERTY(TARGET Schusstafel::Schusstafel PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${SCHUSSTAFEL_INCLUDE_DIR}")
|
||||||
|
SET_PROPERTY(TARGET Schusstafel::Schusstafel PROPERTY IMPORTED_LOCATION "${SCHUSSTAFEL_LIBRARY}")
|
||||||
|
ENDIF()
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
/workspace/external/Schusstafel
|
||||||
@@ -36,7 +36,36 @@ BUILD_ARCGIS:
|
|||||||
--arcgis / --no-arcgis Enable/disable BUILD_ARCGIS (default: OFF)
|
--arcgis / --no-arcgis Enable/disable BUILD_ARCGIS (default: OFF)
|
||||||
|
|
||||||
BUILD_CODIFICATION:
|
BUILD_CODIFICATION:
|
||||||
--codification / --no-codification Enable/disable BUILD_CODIFICATION (default: OFF, requires KDReports)
|
--codification / --no-codification Enable/disable BUILD_CODIFICATION (default: ON, requires KDReports)
|
||||||
|
|
||||||
|
BUILD_WLS:
|
||||||
|
--wls / --no-wls Enable/disable BUILD_WLS (default: ON; the
|
||||||
|
GROUP4 targets svcWirelessLocationSystem /
|
||||||
|
wlsJsonClientTest only exist when it is ON)
|
||||||
|
|
||||||
|
BUILD_FILTERMANAGEMENT:
|
||||||
|
--filtermanagement / --no-filtermanagement Enable/disable BUILD_FILTERMANAGEMENT (default: ON)
|
||||||
|
|
||||||
|
BUILD_PLUGINS_SERVICEMONITOR:
|
||||||
|
--servicemonitor / --no-servicemonitor Enable/disable BUILD_PLUGINS_SERVICEMONITOR (default: ON)
|
||||||
|
|
||||||
|
BUILD_WEBENGINE_PLUGINS:
|
||||||
|
--webengine-plugins / --no-webengine-plugins
|
||||||
|
Enable/disable the WebEngine-based plugins (PlanEditor,
|
||||||
|
OnlineHelp, ParticipantOrgChart). PlanEditor links
|
||||||
|
situationMap, so ON promotes BUILD_ARCGIS to ON. (default: ON)
|
||||||
|
|
||||||
|
BUILD_XMLPATTERNS_PLUGINS:
|
||||||
|
--xmlpatterns-plugins / --no-xmlpatterns-plugins
|
||||||
|
Enable/disable the MSDL/Saab plugins. They no longer
|
||||||
|
require Qt XmlPatterns (removed in Qt 6.0, not
|
||||||
|
re-introduced): their import logic was re-implemented
|
||||||
|
with Qt6::Xml (QDomDocument) + the existing xmllint
|
||||||
|
step, and MSDL additionally links XercesC + uses
|
||||||
|
xsdc++-generated tree classes (needs xsdcxx +
|
||||||
|
libxerces-c-dev, both in APT_PACKAGES). With the
|
||||||
|
prerequisites present these build by default.
|
||||||
|
(default: ON)
|
||||||
|
|
||||||
Build groups:
|
Build groups:
|
||||||
--group1 / --no-group1 Enable/disable DDS core libraries build
|
--group1 / --no-group1 Enable/disable DDS core libraries build
|
||||||
@@ -77,6 +106,11 @@ Environment variable overrides:
|
|||||||
BUILD_GRANTLEE=ON|OFF
|
BUILD_GRANTLEE=ON|OFF
|
||||||
BUILD_ARCGIS=ON|OFF
|
BUILD_ARCGIS=ON|OFF
|
||||||
BUILD_CODIFICATION=ON|OFF
|
BUILD_CODIFICATION=ON|OFF
|
||||||
|
BUILD_FILTERMANAGEMENT=ON|OFF
|
||||||
|
BUILD_WLS=ON|OFF
|
||||||
|
BUILD_PLUGINS_SERVICEMONITOR=ON|OFF
|
||||||
|
BUILD_WEBENGINE_PLUGINS=ON|OFF
|
||||||
|
BUILD_XMLPATTERNS_PLUGINS=ON|OFF
|
||||||
BUILD_GROUP1=ON|OFF
|
BUILD_GROUP1=ON|OFF
|
||||||
BUILD_GROUP2=ON|OFF
|
BUILD_GROUP2=ON|OFF
|
||||||
BUILD_GROUP3=ON|OFF
|
BUILD_GROUP3=ON|OFF
|
||||||
@@ -107,7 +141,12 @@ Defaults:
|
|||||||
BUILD_RTI=ON
|
BUILD_RTI=ON
|
||||||
BUILD_GRANTLEE=ON
|
BUILD_GRANTLEE=ON
|
||||||
BUILD_ARCGIS=OFF
|
BUILD_ARCGIS=OFF
|
||||||
BUILD_CODIFICATION=OFF
|
BUILD_CODIFICATION=ON
|
||||||
|
BUILD_FILTERMANAGEMENT=ON
|
||||||
|
BUILD_WLS=ON
|
||||||
|
BUILD_PLUGINS_SERVICEMONITOR=ON
|
||||||
|
BUILD_WEBENGINE_PLUGINS=ON
|
||||||
|
BUILD_XMLPATTERNS_PLUGINS=ON
|
||||||
BUILD_GROUP1=ON
|
BUILD_GROUP1=ON
|
||||||
BUILD_GROUP2=ON
|
BUILD_GROUP2=ON
|
||||||
BUILD_GROUP3=ON
|
BUILD_GROUP3=ON
|
||||||
@@ -147,6 +186,10 @@ log_info() {
|
|||||||
printf 'INFO: %s\n' "$*"
|
printf 'INFO: %s\n' "$*"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log_warn() {
|
||||||
|
printf 'WARNING: %s\n' "$*" >&2
|
||||||
|
}
|
||||||
|
|
||||||
log_error() {
|
log_error() {
|
||||||
printf 'ERROR: %s\n' "$*" >&2
|
printf 'ERROR: %s\n' "$*" >&2
|
||||||
}
|
}
|
||||||
@@ -264,6 +307,25 @@ APT_PACKAGES=(
|
|||||||
vlc-plugin-base
|
vlc-plugin-base
|
||||||
git
|
git
|
||||||
python3-pip
|
python3-pip
|
||||||
|
# Poppler-Qt6 (PDF support): Z/src/nglwidgets detects it via
|
||||||
|
# pkg_check_modules(POPPLER_QT6 poppler-qt6) - pkg-config must be present for
|
||||||
|
# the probe to run at all. FlmExplorerGuiPlugin's flm_preview_playback.cpp
|
||||||
|
# uses Poppler types unconditionally, so a green Group 12 build requires it.
|
||||||
|
pkg-config
|
||||||
|
libpoppler-qt6-dev
|
||||||
|
# MSDL/Saab no longer require Qt XmlPatterns (removed in Qt 6.0): their import
|
||||||
|
# logic was re-implemented with Qt6::Xml (QDomDocument) + the existing xmllint
|
||||||
|
# schema-validation step. MSDL additionally links XercesC and uses xsdc++-
|
||||||
|
# generated tree classes, so it needs libxerces-c-dev (XercesC C++ parser) and
|
||||||
|
# xsdcxx (the xsdc++ code generator, XSD_GENERATE_TREE). Saab only needs
|
||||||
|
# Qt6::Xml; both are installed together so the two plugins build from the same
|
||||||
|
# image.
|
||||||
|
xsdcxx
|
||||||
|
libxerces-c-dev
|
||||||
|
# xmllint (libxml2-utils): the MSDL import validates the incoming document against
|
||||||
|
# its XSD via an external `xmllint --schema` step (QProcess) - pre-existing in the
|
||||||
|
# legacy (msdl_import.cpp). Provision it so that runtime schema check can run.
|
||||||
|
libxml2-utils
|
||||||
)
|
)
|
||||||
|
|
||||||
# INTERFACE libraries (header-only) are built automatically as dependencies
|
# INTERFACE libraries (header-only) are built automatically as dependencies
|
||||||
@@ -554,8 +616,8 @@ GROUP4_TARGETS=(
|
|||||||
svcTabocServer
|
svcTabocServer
|
||||||
svcTrainingAreaBaseOC
|
svcTrainingAreaBaseOC
|
||||||
serialtest
|
serialtest
|
||||||
# Proxies module - WirelessLocationSystem (requires -DBUILD_WLS=ON, e.g. via
|
# Proxies module - WirelessLocationSystem (only exists when BUILD_WLS=ON,
|
||||||
# --cmake_build_flags "-DBUILD_WLS=ON")
|
# script default; see the --wls flag)
|
||||||
svcWirelessLocationSystem
|
svcWirelessLocationSystem
|
||||||
wlsJsonClientTest
|
wlsJsonClientTest
|
||||||
# Proxies module - Other
|
# Proxies module - Other
|
||||||
@@ -607,6 +669,13 @@ RUN pip3 install --break-system-packages --quiet aqtinstall && \
|
|||||||
--outputdir ${QT_BASE_DIR} && \
|
--outputdir ${QT_BASE_DIR} && \
|
||||||
rm -rf /root/.cache/Aqt
|
rm -rf /root/.cache/Aqt
|
||||||
|
|
||||||
|
# MSDL/Saab plugins: Qt removed the XmlPatterns module in Qt 6.0 (not re-
|
||||||
|
# introduced), so their import logic was re-implemented with Qt6::Xml
|
||||||
|
# (QDomDocument) + the existing external xmllint schema-validation step. MSDL
|
||||||
|
# additionally links XercesC and uses xsdc++-generated tree classes; xsdcxx +
|
||||||
|
# libxerces-c-dev are installed via APT_PACKAGES above, so the plugins build with
|
||||||
|
# a stock Qt 6.10.2 install.
|
||||||
|
|
||||||
# Install KDReports from source (apt package not available in Ubuntu 22.04/26.04)
|
# Install KDReports from source (apt package not available in Ubuntu 22.04/26.04)
|
||||||
# Try apt install first (will fail), then build from KDAB GitHub mirror
|
# Try apt install first (will fail), then build from KDAB GitHub mirror
|
||||||
RUN apt-get install -y -qq libkdreports-dev 2>/dev/null || \
|
RUN apt-get install -y -qq libkdreports-dev 2>/dev/null || \
|
||||||
@@ -623,6 +692,31 @@ RUN apt-get install -y -qq libkdreports-dev 2>/dev/null || \
|
|||||||
# includes resolve through the default /usr/local/include search path.
|
# includes resolve through the default /usr/local/include search path.
|
||||||
RUN ln -sfn KDReports-qt6 /usr/local/include/KDReports
|
RUN ln -sfn KDReports-qt6 /usr/local/include/KDReports
|
||||||
|
|
||||||
|
# KDChart (KDAB, MIT) from source: FindKDChart RETURN()s without it, which skips
|
||||||
|
# OreOnlineReportsGuiPlugin (app requirement iid ore.onlinereports). The legacy
|
||||||
|
# env had a KDChart 2.6.0 Qt5 RPM; the Qt6 build needs a Qt6-compatible release.
|
||||||
|
# Pinned to the verified kdchart-3.0.0 tag (KDChart_QT6=true; needs the
|
||||||
|
# Gui/Widgets/PrintSupport/Svg Qt6 components above). ECM
|
||||||
|
# (extra-cmake-modules) is required: KDChart plain-include()s ECMGeneratePriFile
|
||||||
|
# for Qt > 6.2 and never find_package(ECM)s.
|
||||||
|
RUN apt-get update -qq && \
|
||||||
|
apt-get install -y -qq extra-cmake-modules && \
|
||||||
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
|
git clone --depth 1 --branch kdchart-3.0.0 https://github.com/KDAB/KDChart.git /tmp/KDChart && \
|
||||||
|
cmake -S /tmp/KDChart -B /tmp/KDChart/build \
|
||||||
|
-DKDChart_QT6=true -DKDChart_EXAMPLES=false -DKDChart_TESTS=false -DKDChart_DOCS=false \
|
||||||
|
-DCMAKE_PREFIX_PATH=${QT_BASE_DIR}/${QT_VERSION}/${QT_ARCH_DIR} \
|
||||||
|
-DCMAKE_MODULE_PATH=/usr/share/ECM/modules \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local && \
|
||||||
|
cmake --build /tmp/KDChart/build -j$(nproc) && \
|
||||||
|
cmake --install /tmp/KDChart/build && \
|
||||||
|
ldconfig && \
|
||||||
|
rm -rf /tmp/KDChart
|
||||||
|
|
||||||
|
# KDChart's Qt6 build installs headers under KDChart-qt6 (same -qt6 suffix
|
||||||
|
# pattern as KDReports); legacy sources include the <KDChart/...> prefix.
|
||||||
|
RUN ln -sfn KDChart-qt6 /usr/local/include/KDChart
|
||||||
|
|
||||||
CMD ["/bin/bash"]
|
CMD ["/bin/bash"]
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@@ -670,7 +764,12 @@ BUILD_AAR="${BUILD_AAR:-ON}"
|
|||||||
BUILD_RTI="${BUILD_RTI:-ON}"
|
BUILD_RTI="${BUILD_RTI:-ON}"
|
||||||
BUILD_GRANTLEE="${BUILD_GRANTLEE:-ON}"
|
BUILD_GRANTLEE="${BUILD_GRANTLEE:-ON}"
|
||||||
BUILD_ARCGIS="${BUILD_ARCGIS:-OFF}"
|
BUILD_ARCGIS="${BUILD_ARCGIS:-OFF}"
|
||||||
BUILD_CODIFICATION="${BUILD_CODIFICATION:-OFF}"
|
BUILD_CODIFICATION="${BUILD_CODIFICATION:-ON}"
|
||||||
|
BUILD_FILTERMANAGEMENT="${BUILD_FILTERMANAGEMENT:-ON}"
|
||||||
|
BUILD_WLS="${BUILD_WLS:-ON}"
|
||||||
|
BUILD_PLUGINS_SERVICEMONITOR="${BUILD_PLUGINS_SERVICEMONITOR:-ON}"
|
||||||
|
BUILD_WEBENGINE_PLUGINS="${BUILD_WEBENGINE_PLUGINS:-ON}"
|
||||||
|
BUILD_XMLPATTERNS_PLUGINS="${BUILD_XMLPATTERNS_PLUGINS:-ON}"
|
||||||
BUILD_GROUP1="${BUILD_GROUP1:-ON}"
|
BUILD_GROUP1="${BUILD_GROUP1:-ON}"
|
||||||
BUILD_GROUP2="${BUILD_GROUP2:-ON}"
|
BUILD_GROUP2="${BUILD_GROUP2:-ON}"
|
||||||
BUILD_GROUP3="${BUILD_GROUP3:-ON}"
|
BUILD_GROUP3="${BUILD_GROUP3:-ON}"
|
||||||
@@ -802,6 +901,36 @@ while [[ $# -gt 0 ]]; do
|
|||||||
--no-codification)
|
--no-codification)
|
||||||
BUILD_CODIFICATION=OFF
|
BUILD_CODIFICATION=OFF
|
||||||
;;
|
;;
|
||||||
|
--wls)
|
||||||
|
BUILD_WLS=ON
|
||||||
|
;;
|
||||||
|
--no-wls)
|
||||||
|
BUILD_WLS=OFF
|
||||||
|
;;
|
||||||
|
--filtermanagement)
|
||||||
|
BUILD_FILTERMANAGEMENT=ON
|
||||||
|
;;
|
||||||
|
--no-filtermanagement)
|
||||||
|
BUILD_FILTERMANAGEMENT=OFF
|
||||||
|
;;
|
||||||
|
--servicemonitor)
|
||||||
|
BUILD_PLUGINS_SERVICEMONITOR=ON
|
||||||
|
;;
|
||||||
|
--no-servicemonitor)
|
||||||
|
BUILD_PLUGINS_SERVICEMONITOR=OFF
|
||||||
|
;;
|
||||||
|
--webengine-plugins)
|
||||||
|
BUILD_WEBENGINE_PLUGINS=ON
|
||||||
|
;;
|
||||||
|
--no-webengine-plugins)
|
||||||
|
BUILD_WEBENGINE_PLUGINS=OFF
|
||||||
|
;;
|
||||||
|
--xmlpatterns-plugins)
|
||||||
|
BUILD_XMLPATTERNS_PLUGINS=ON
|
||||||
|
;;
|
||||||
|
--no-xmlpatterns-plugins)
|
||||||
|
BUILD_XMLPATTERNS_PLUGINS=OFF
|
||||||
|
;;
|
||||||
--no-ctest)
|
--no-ctest)
|
||||||
RUN_CTEST=OFF
|
RUN_CTEST=OFF
|
||||||
;;
|
;;
|
||||||
@@ -870,6 +999,18 @@ BUILD_RTI="$(normalize_on_off "$BUILD_RTI" "BUILD_RTI")"
|
|||||||
BUILD_GRANTLEE="$(normalize_on_off "$BUILD_GRANTLEE" "BUILD_GRANTLEE")"
|
BUILD_GRANTLEE="$(normalize_on_off "$BUILD_GRANTLEE" "BUILD_GRANTLEE")"
|
||||||
BUILD_ARCGIS="$(normalize_on_off "$BUILD_ARCGIS" "BUILD_ARCGIS")"
|
BUILD_ARCGIS="$(normalize_on_off "$BUILD_ARCGIS" "BUILD_ARCGIS")"
|
||||||
BUILD_CODIFICATION="$(normalize_on_off "$BUILD_CODIFICATION" "BUILD_CODIFICATION")"
|
BUILD_CODIFICATION="$(normalize_on_off "$BUILD_CODIFICATION" "BUILD_CODIFICATION")"
|
||||||
|
BUILD_FILTERMANAGEMENT="$(normalize_on_off "$BUILD_FILTERMANAGEMENT" "BUILD_FILTERMANAGEMENT")"
|
||||||
|
BUILD_WLS="$(normalize_on_off "$BUILD_WLS" "BUILD_WLS")"
|
||||||
|
BUILD_PLUGINS_SERVICEMONITOR="$(normalize_on_off "$BUILD_PLUGINS_SERVICEMONITOR" "BUILD_PLUGINS_SERVICEMONITOR")"
|
||||||
|
BUILD_WEBENGINE_PLUGINS="$(normalize_on_off "$BUILD_WEBENGINE_PLUGINS" "BUILD_WEBENGINE_PLUGINS")"
|
||||||
|
BUILD_XMLPATTERNS_PLUGINS="$(normalize_on_off "$BUILD_XMLPATTERNS_PLUGINS" "BUILD_XMLPATTERNS_PLUGINS")"
|
||||||
|
|
||||||
|
# PlanEditorGuiPlugin links situationMap (ArcGIS scope), so the WebEngine plugin
|
||||||
|
# set cannot configure without ArcGIS: promote BUILD_ARCGIS when it is enabled.
|
||||||
|
if [[ "${BUILD_WEBENGINE_PLUGINS}" == "ON" && "${BUILD_ARCGIS}" == "OFF" ]]; then
|
||||||
|
log_info "BUILD_WEBENGINE_PLUGINS=ON implies ArcGIS-scope targets (PlanEditorGuiPlugin -> situationMap): promoting BUILD_ARCGIS=ON"
|
||||||
|
BUILD_ARCGIS=ON
|
||||||
|
fi
|
||||||
BUILD_GROUP1="$(normalize_on_off "$BUILD_GROUP1" "BUILD_GROUP1")"
|
BUILD_GROUP1="$(normalize_on_off "$BUILD_GROUP1" "BUILD_GROUP1")"
|
||||||
BUILD_GROUP2="$(normalize_on_off "$BUILD_GROUP2" "BUILD_GROUP2")"
|
BUILD_GROUP2="$(normalize_on_off "$BUILD_GROUP2" "BUILD_GROUP2")"
|
||||||
BUILD_GROUP3="$(normalize_on_off "$BUILD_GROUP3" "BUILD_GROUP3")"
|
BUILD_GROUP3="$(normalize_on_off "$BUILD_GROUP3" "BUILD_GROUP3")"
|
||||||
@@ -900,7 +1041,7 @@ fi
|
|||||||
CMAKE_BUILD_FLAGS="${CMAKE_BUILD_FLAGS:-}"
|
CMAKE_BUILD_FLAGS="${CMAKE_BUILD_FLAGS:-}"
|
||||||
|
|
||||||
# Export variables for Docker container
|
# Export variables for Docker container
|
||||||
export BUILD_ALL BUILD_RTI BUILD_GRANTLEE BUILD_ARCGIS BUILD_CODIFICATION BUILD_GROUP1 BUILD_GROUP2 BUILD_GROUP3 BUILD_GROUP4 BUILD_GROUP5 BUILD_GROUP6 BUILD_GROUP7 BUILD_GROUP8 BUILD_GROUP9 BUILD_GROUP10 BUILD_GROUP11 BUILD_VIEWER_ONLY RUN_CTEST TESTS_ONLY INTEGRATION_TEST USE_PREBUILT_IMAGE BUILD_PREBUILT_IMAGE DELETE_PREBUILT_IMAGE DOCKER_IMAGE CMAKE_BUILD_FLAGS
|
export BUILD_ALL BUILD_RTI BUILD_GRANTLEE BUILD_ARCGIS BUILD_CODIFICATION BUILD_FILTERMANAGEMENT BUILD_WLS BUILD_PLUGINS_SERVICEMONITOR BUILD_WEBENGINE_PLUGINS BUILD_XMLPATTERNS_PLUGINS BUILD_GROUP1 BUILD_GROUP2 BUILD_GROUP3 BUILD_GROUP4 BUILD_GROUP5 BUILD_GROUP6 BUILD_GROUP7 BUILD_GROUP8 BUILD_GROUP9 BUILD_GROUP10 BUILD_GROUP11 BUILD_GROUP12 BUILD_VIEWER_ONLY RUN_CTEST TESTS_ONLY INTEGRATION_TEST USE_PREBUILT_IMAGE BUILD_PREBUILT_IMAGE DELETE_PREBUILT_IMAGE DOCKER_IMAGE CMAKE_BUILD_FLAGS
|
||||||
|
|
||||||
# Group 5: Viewer module targets (conditional on BUILD_ARCGIS)
|
# Group 5: Viewer module targets (conditional on BUILD_ARCGIS)
|
||||||
# Note: LtsFileDialog excluded from viewer-only builds due to Group 4 dependencies (svcExmCommon, svcOpmCommon, svcFlmCommon)
|
# Note: LtsFileDialog excluded from viewer-only builds due to Group 4 dependencies (svcExmCommon, svcOpmCommon, svcFlmCommon)
|
||||||
@@ -1081,8 +1222,33 @@ GROUP11_TARGETS=(
|
|||||||
# without these the app reports "App Requirements check failed" at startup.
|
# without these the app reports "App Requirements check failed" at startup.
|
||||||
# Plugin outputs land in build4/lib, the directory the loader scans.
|
# Plugin outputs land in build4/lib, the directory the loader scans.
|
||||||
# Excluded (environmental floors, not migration regressions):
|
# Excluded (environmental floors, not migration regressions):
|
||||||
# cesPluginGeoPairing - needs the external Schusstafel.h header (missing)
|
# cesPluginGeoPairing - needs the external Schusstafel package (prebuilt
|
||||||
|
# Schusstafel.h + libSchusstafel.so) at
|
||||||
|
# external/Schusstafel (see resolve_schusstafel); it is
|
||||||
|
# built when the package is present
|
||||||
|
# OreOnlineReportsGuiPlugin - needs KDChart (open-source, KDAB) under
|
||||||
|
# /usr/local; built from github.com/KDAB/KDChart tag
|
||||||
|
# kdchart-3.0.0 with -DKDChart_QT6=true (see
|
||||||
|
# resolve_kdchart), built when present
|
||||||
# BldInfoGuiPlugin - links BuildingViewerCommon (dtEntity/OSG SDK absent)
|
# BldInfoGuiPlugin - links BuildingViewerCommon (dtEntity/OSG SDK absent)
|
||||||
|
# BdvViewerGuiPlugin - links BuildingViewerCommon (same floor; CMake skips its
|
||||||
|
# subdirectory when BuildingViewerCommon is not built)
|
||||||
|
# PpmMSDLGuiPlugin / - former XmlPatterns floor, now CLOSED: re-implemented without
|
||||||
|
# PpmSAABGuiPlugin - Qt XmlPatterns (removed in Qt 6.0) using Qt6::Xml (QDomDocument)
|
||||||
|
# + the existing xmllint step; MSDL also needs xsdcxx +
|
||||||
|
# libxerces-c-dev (both in APT_PACKAGES). Now in GROUP12 and built
|
||||||
|
# by default when the prerequisites are present (see
|
||||||
|
# resolve_xmlpatterns)
|
||||||
|
# The Flt*/Smo* targets only exist when BUILD_FILTERMANAGEMENT /
|
||||||
|
# BUILD_PLUGINS_SERVICEMONITOR are ON (script defaults; see the cmake call).
|
||||||
|
# With them OFF the five unconditional GUI plugins (EvlEdit, PpmParticipantInfo,
|
||||||
|
# Pws, SrmReplayManagement, OpmSettings) also fail to link (they need the
|
||||||
|
# FilterManagement interface libs) - so these defaults are load-bearing.
|
||||||
|
# The PlanEditorGuiPlugin/OhpOnlineHelpViewerGuiPlugin/PpmOrgChartGuiPlugin
|
||||||
|
# targets only exist when BUILD_WEBENGINE_PLUGINS=ON (script default; ON also
|
||||||
|
# promotes BUILD_ARCGIS=ON because PlanEditorGuiPlugin links situationMap),
|
||||||
|
# and the Cod*/codTopicTypePlugin targets when BUILD_CODIFICATION=ON (script
|
||||||
|
# default; requires KDReports).
|
||||||
GROUP12_TARGETS=(
|
GROUP12_TARGETS=(
|
||||||
AesAirSupportGuiPlugin
|
AesAirSupportGuiPlugin
|
||||||
AesBcContaminationGuiPlugin
|
AesBcContaminationGuiPlugin
|
||||||
@@ -1120,6 +1286,8 @@ GROUP12_TARGETS=(
|
|||||||
CesParticipantMoveGuiPlugin
|
CesParticipantMoveGuiPlugin
|
||||||
CesParticipantUASGuiPlugin
|
CesParticipantUASGuiPlugin
|
||||||
CmoDataPlugin
|
CmoDataPlugin
|
||||||
|
CodCodificationDataGuiPlugin
|
||||||
|
CodDataPlugin
|
||||||
DevGuiPlugin
|
DevGuiPlugin
|
||||||
EfmDataPlugin
|
EfmDataPlugin
|
||||||
EfmSoundAreaGuiPlugin
|
EfmSoundAreaGuiPlugin
|
||||||
@@ -1137,6 +1305,10 @@ GROUP12_TARGETS=(
|
|||||||
FlmComboBoxGuiPlugin
|
FlmComboBoxGuiPlugin
|
||||||
FlmDataPlugin
|
FlmDataPlugin
|
||||||
FlmExplorerGuiPlugin
|
FlmExplorerGuiPlugin
|
||||||
|
FltAesGuiPlugin
|
||||||
|
FltDataPlugin
|
||||||
|
FltParticipantGuiPlugin
|
||||||
|
Fltbldg_cmpntGuiPlugin
|
||||||
FspGuiPlugin
|
FspGuiPlugin
|
||||||
GimDataPlugin
|
GimDataPlugin
|
||||||
GimInfoGuiPlugin
|
GimInfoGuiPlugin
|
||||||
@@ -1163,12 +1335,14 @@ GROUP12_TARGETS=(
|
|||||||
NomEditGuiPlugin
|
NomEditGuiPlugin
|
||||||
ObdBaseDownloaderGuiPlugin
|
ObdBaseDownloaderGuiPlugin
|
||||||
ObdDataPlugin
|
ObdDataPlugin
|
||||||
|
OhpOnlineHelpViewerGuiPlugin
|
||||||
OpmComboBoxGuiPlugin
|
OpmComboBoxGuiPlugin
|
||||||
OpmDataPlugin
|
OpmDataPlugin
|
||||||
OpmEditGuiPlugin
|
OpmEditGuiPlugin
|
||||||
OpmLoginGuiPlugin
|
OpmLoginGuiPlugin
|
||||||
OpmOverviewGuiPlugin
|
OpmOverviewGuiPlugin
|
||||||
OpmSettingsGuiPlugin
|
OpmSettingsGuiPlugin
|
||||||
|
OreOnlineReportsGuiPlugin
|
||||||
OscDataPlugin
|
OscDataPlugin
|
||||||
OscParticipantInfoGuiPlugin
|
OscParticipantInfoGuiPlugin
|
||||||
OscSystemGuiPlugin
|
OscSystemGuiPlugin
|
||||||
@@ -1176,14 +1350,18 @@ GROUP12_TARGETS=(
|
|||||||
PdmChargeTableGuiPlugin
|
PdmChargeTableGuiPlugin
|
||||||
PdmComboBoxGuiPlugin
|
PdmComboBoxGuiPlugin
|
||||||
PdmDataPlugin
|
PdmDataPlugin
|
||||||
|
PlanEditorGuiPlugin
|
||||||
PlanOverlaysGuiPlugin
|
PlanOverlaysGuiPlugin
|
||||||
PpmComboBoxGuiPlugin
|
PpmComboBoxGuiPlugin
|
||||||
PpmDataPlugin
|
PpmDataPlugin
|
||||||
|
PpmMSDLGuiPlugin
|
||||||
PpmOperationalPlaningGuiPlugin
|
PpmOperationalPlaningGuiPlugin
|
||||||
|
PpmOrgChartGuiPlugin
|
||||||
PpmParticipantEditGuiPlugin
|
PpmParticipantEditGuiPlugin
|
||||||
PpmParticipantInfoGuiPlugin
|
PpmParticipantInfoGuiPlugin
|
||||||
PpmParticipantTemplatesGuiPlugin
|
PpmParticipantTemplatesGuiPlugin
|
||||||
PpmPartyEditGuiPlugin
|
PpmPartyEditGuiPlugin
|
||||||
|
PpmSAABGuiPlugin
|
||||||
PpmTypeEditGuiPlugin
|
PpmTypeEditGuiPlugin
|
||||||
PpmUasGuiPlugin
|
PpmUasGuiPlugin
|
||||||
PreDataPlugin
|
PreDataPlugin
|
||||||
@@ -1210,6 +1388,10 @@ GROUP12_TARGETS=(
|
|||||||
ScrScreenRecordingGuiPlugin
|
ScrScreenRecordingGuiPlugin
|
||||||
SitmapGuiPlugin
|
SitmapGuiPlugin
|
||||||
SituationMapScriptFilterGuiPlugin
|
SituationMapScriptFilterGuiPlugin
|
||||||
|
SmoEquipmentErrorRegistrationGuiPlugin
|
||||||
|
SmoHgrAndMineSearchGuiPlugin
|
||||||
|
SmoMonitorsGuiPlugin
|
||||||
|
SmoSystemMonitorGuiPlugin
|
||||||
SrmDataPlugin
|
SrmDataPlugin
|
||||||
SrmReplayManagementGuiPlugin
|
SrmReplayManagementGuiPlugin
|
||||||
SrpDataPlugin
|
SrpDataPlugin
|
||||||
@@ -1247,6 +1429,7 @@ GROUP12_TARGETS=(
|
|||||||
cesPluginCES_NBC
|
cesPluginCES_NBC
|
||||||
cesPluginCesBuildings
|
cesPluginCesBuildings
|
||||||
cesPluginExplosions
|
cesPluginExplosions
|
||||||
|
cesPluginGeoPairing
|
||||||
cesPluginMineAreas
|
cesPluginMineAreas
|
||||||
cesPluginMineLayingArtillery
|
cesPluginMineLayingArtillery
|
||||||
cesPluginParticipantBuildings
|
cesPluginParticipantBuildings
|
||||||
@@ -1394,6 +1577,7 @@ BUILD_AAR="${BUILD_AAR:-ON}"
|
|||||||
BUILD_RTI="${BUILD_RTI:-ON}"
|
BUILD_RTI="${BUILD_RTI:-ON}"
|
||||||
BUILD_GRANTLEE="${BUILD_GRANTLEE:-ON}"
|
BUILD_GRANTLEE="${BUILD_GRANTLEE:-ON}"
|
||||||
BUILD_ARCGIS="${BUILD_ARCGIS:-OFF}"
|
BUILD_ARCGIS="${BUILD_ARCGIS:-OFF}"
|
||||||
|
WITH_SCHUSSTAFEL="${WITH_SCHUSSTAFEL:-ON}"
|
||||||
BUILD_GROUP1="${BUILD_GROUP1:-ON}"
|
BUILD_GROUP1="${BUILD_GROUP1:-ON}"
|
||||||
BUILD_GROUP2="${BUILD_GROUP2:-ON}"
|
BUILD_GROUP2="${BUILD_GROUP2:-ON}"
|
||||||
BUILD_GROUP3="${BUILD_GROUP3:-ON}"
|
BUILD_GROUP3="${BUILD_GROUP3:-ON}"
|
||||||
@@ -1415,6 +1599,10 @@ log_info() {
|
|||||||
printf 'INFO: %s\n' "$*"
|
printf 'INFO: %s\n' "$*"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log_warn() {
|
||||||
|
printf 'WARNING: %s\n' "$*" >&2
|
||||||
|
}
|
||||||
|
|
||||||
install_qt6_packages() {
|
install_qt6_packages() {
|
||||||
log_info "Installing Qt6 packages via aqtinstall"
|
log_info "Installing Qt6 packages via aqtinstall"
|
||||||
|
|
||||||
@@ -1518,6 +1706,65 @@ if [[ "${BUILD_ARCGIS}" == "ON" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# The MSDL/Saab plugins no longer require Qt XmlPatterns (removed in Qt 6.0, not
|
||||||
|
# re-introduced). Their import logic was re-implemented with Qt6::Xml
|
||||||
|
# (QDomDocument) plus the existing external xmllint schema-validation step; MSDL
|
||||||
|
# additionally links XercesC and uses xsdc++-generated tree classes. So build
|
||||||
|
# them by default. MSDL needs the xsdcxx code generator + libxerces-c-dev (both
|
||||||
|
# are in APT_PACKAGES); if they are missing here, keep both plugins OFF and flag
|
||||||
|
# the gap. (Saab only needs Qt6::Xml, but is gated together to keep the effective
|
||||||
|
# value a single switch.)
|
||||||
|
resolve_xmlpatterns() {
|
||||||
|
BUILD_XMLPATTERNS_EFFECTIVE="${BUILD_XMLPATTERNS_PLUGINS}"
|
||||||
|
if [[ "${BUILD_XMLPATTERNS_EFFECTIVE}" == "ON" ]]; then
|
||||||
|
if command -v xsdcxx >/dev/null 2>&1 && [ -e /usr/lib/x86_64-linux-gnu/libxerces-c.so ]; then
|
||||||
|
log_info "xsdcxx + XercesC present - MSDL/Saab plugins will be built (re-implemented without Qt XmlPatterns)"
|
||||||
|
else
|
||||||
|
log_warn "xsdcxx / libxerces-c-dev missing - keeping BUILD_PLUGINS_MSDL/BUILD_PLUGINS_SAAB OFF (ppm.msdl / ppm.saab stay unbuilt)"
|
||||||
|
BUILD_XMLPATTERNS_EFFECTIVE=OFF
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
resolve_xmlpatterns
|
||||||
|
|
||||||
|
# Schusstafel is a prebuilt external package (Schusstafel.h +
|
||||||
|
# libSchusstafel.so) provided at external/Schusstafel, mirroring the ArcGIS
|
||||||
|
# symlink pattern. cesPluginGeoPairing #includes Schusstafel.h unconditionally,
|
||||||
|
# so without the package WITH_SCHUSSTAFEL stays OFF and the target is dropped
|
||||||
|
# from Group 12 (environmental floor, not a migration regression).
|
||||||
|
resolve_schusstafel() {
|
||||||
|
WITH_SCHUSSTAFEL_EFFECTIVE="${WITH_SCHUSSTAFEL}"
|
||||||
|
if [[ "${WITH_SCHUSSTAFEL_EFFECTIVE}" == "ON" ]]; then
|
||||||
|
if ls /workspace/external/Schusstafel/Schusstafel.h >/dev/null 2>&1; then
|
||||||
|
log_info "Schusstafel present at /workspace/external/Schusstafel - cesPluginGeoPairing will be built"
|
||||||
|
else
|
||||||
|
log_warn "Schusstafel not present at /workspace/external/Schusstafel - keeping WITH_SCHUSSTAFEL OFF (cesPluginGeoPairing stays unbuilt)"
|
||||||
|
WITH_SCHUSSTAFEL_EFFECTIVE=OFF
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# KDChart (KDAB, MIT) is an open-source Qt charts extension, installed under
|
||||||
|
# /usr/local (header KDChart/kdchart_export.h + libkdchart.so; FindKDChart
|
||||||
|
# searches /usr/local by default). The legacy env had a KDChart 2.6.0 Qt5 RPM;
|
||||||
|
# the Qt6 build needs a Qt6-compatible release (e.g. github.com/KDAB/KDChart
|
||||||
|
# tag kdchart-3.0.0 with -DKDChart_QT6=true). OreOnlineReportsGuiPlugin's
|
||||||
|
# CMake RETURN()s when KDChart is absent, so without it the plugin (iid
|
||||||
|
# ore.onlinereports) stays unbuilt - environmental floor.
|
||||||
|
resolve_kdchart() {
|
||||||
|
KDCHART_PRESENT=OFF
|
||||||
|
if [[ -f /usr/local/include/KDChart/kdchart_export.h ]]; then
|
||||||
|
KDCHART_PRESENT=ON
|
||||||
|
log_info "KDChart present at /usr/local - OreOnlineReportsGuiPlugin will be built"
|
||||||
|
else
|
||||||
|
log_warn "KDChart not present at /usr/local - OreOnlineReportsGuiPlugin stays unbuilt (legacy KDChart 2.6.0 was a Qt5 RPM; build a Qt6-compatible release from source to close this floor)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
resolve_schusstafel
|
||||||
|
resolve_kdchart
|
||||||
|
|
||||||
cd /workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus
|
cd /workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus
|
||||||
|
|
||||||
rm -rf build4
|
rm -rf build4
|
||||||
@@ -1535,6 +1782,15 @@ cmake .. \
|
|||||||
-DBUILD_GRANTLEE="${BUILD_GRANTLEE}" \
|
-DBUILD_GRANTLEE="${BUILD_GRANTLEE}" \
|
||||||
-DBUILD_ARCGIS="${BUILD_ARCGIS}" \
|
-DBUILD_ARCGIS="${BUILD_ARCGIS}" \
|
||||||
-DBUILD_CODIFICATION="${BUILD_CODIFICATION}" \
|
-DBUILD_CODIFICATION="${BUILD_CODIFICATION}" \
|
||||||
|
-DBUILD_FILTERMANAGEMENT="${BUILD_FILTERMANAGEMENT}" \
|
||||||
|
-DBUILD_WLS="${BUILD_WLS}" \
|
||||||
|
-DBUILD_PLUGINS_SERVICEMONITOR="${BUILD_PLUGINS_SERVICEMONITOR}" \
|
||||||
|
-DBUILD_PLUGINS_PLANEDITOR="${BUILD_WEBENGINE_PLUGINS}" \
|
||||||
|
-DBUILD_PLUGINS_ONLINEHELP="${BUILD_WEBENGINE_PLUGINS}" \
|
||||||
|
-DBUILD_PLUGINS_PARTICIPANT_ORG_CHART="${BUILD_WEBENGINE_PLUGINS}" \
|
||||||
|
-DBUILD_PLUGINS_MSDL="${BUILD_XMLPATTERNS_EFFECTIVE}" \
|
||||||
|
-DBUILD_PLUGINS_SAAB="${BUILD_XMLPATTERNS_EFFECTIVE}" \
|
||||||
|
-DWITH_SCHUSSTAFEL="${WITH_SCHUSSTAFEL_EFFECTIVE}" \
|
||||||
${CMAKE_BUILD_FLAGS:-} \
|
${CMAKE_BUILD_FLAGS:-} \
|
||||||
-DCMAKE_CXX_STANDARD=17 \
|
-DCMAKE_CXX_STANDARD=17 \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
@@ -1553,6 +1809,30 @@ read -r -a GROUP10_ARRAY <<< "${GROUP10_TARGETS}"
|
|||||||
read -r -a GROUP11_ARRAY <<< "${GROUP11_TARGETS}"
|
read -r -a GROUP11_ARRAY <<< "${GROUP11_TARGETS}"
|
||||||
read -r -a GROUP12_ARRAY <<< "${GROUP12_TARGETS}"
|
read -r -a GROUP12_ARRAY <<< "${GROUP12_TARGETS}"
|
||||||
|
|
||||||
|
# cesPluginGeoPairing #includes Schusstafel.h unconditionally - drop it from
|
||||||
|
# Group 12 when the Schusstafel package is unavailable (environmental floor).
|
||||||
|
if [[ "${WITH_SCHUSSTAFEL_EFFECTIVE}" != "ON" ]]; then
|
||||||
|
_GROUP12_ARRAY=()
|
||||||
|
for _t in "${GROUP12_ARRAY[@]}"; do
|
||||||
|
if [[ "${_t}" != "cesPluginGeoPairing" ]]; then
|
||||||
|
_GROUP12_ARRAY+=("${_t}")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
GROUP12_ARRAY=("${_GROUP12_ARRAY[@]}")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# OreOnlineReportsGuiPlugin RETURN()s at configure when KDChart is absent -
|
||||||
|
# drop it from Group 12 in that case (environmental floor, see resolve_kdchart).
|
||||||
|
if [[ "${KDCHART_PRESENT}" != "ON" ]]; then
|
||||||
|
_GROUP12_ARRAY=()
|
||||||
|
for _t in "${GROUP12_ARRAY[@]}"; do
|
||||||
|
if [[ "${_t}" != "OreOnlineReportsGuiPlugin" ]]; then
|
||||||
|
_GROUP12_ARRAY+=("${_t}")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
GROUP12_ARRAY=("${_GROUP12_ARRAY[@]}")
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "${TESTS_ONLY}" != "ON" ]]; then
|
if [[ "${TESTS_ONLY}" != "ON" ]]; then
|
||||||
if [[ "${BUILD_VIEWER_ONLY}" == "ON" ]]; then
|
if [[ "${BUILD_VIEWER_ONLY}" == "ON" ]]; then
|
||||||
log_info "BUILD_VIEWER_ONLY enabled - skipping Groups 1-4, building only Viewer module targets"
|
log_info "BUILD_VIEWER_ONLY enabled - skipping Groups 1-4, building only Viewer module targets"
|
||||||
@@ -1605,6 +1885,11 @@ docker run --rm \
|
|||||||
-e BUILD_GRANTLEE \
|
-e BUILD_GRANTLEE \
|
||||||
-e BUILD_ARCGIS \
|
-e BUILD_ARCGIS \
|
||||||
-e BUILD_CODIFICATION \
|
-e BUILD_CODIFICATION \
|
||||||
|
-e BUILD_FILTERMANAGEMENT \
|
||||||
|
-e BUILD_WLS \
|
||||||
|
-e BUILD_PLUGINS_SERVICEMONITOR \
|
||||||
|
-e BUILD_WEBENGINE_PLUGINS \
|
||||||
|
-e BUILD_XMLPATTERNS_PLUGINS \
|
||||||
-e BUILD_GROUP1 \
|
-e BUILD_GROUP1 \
|
||||||
-e BUILD_GROUP2 \
|
-e BUILD_GROUP2 \
|
||||||
-e BUILD_GROUP3 \
|
-e BUILD_GROUP3 \
|
||||||
|
|||||||
Reference in new issue
Block a user