Adds latest migration results
This commit is contained in:
829 files changed
+35074
-70886
No files matched your search
@@ -4,6 +4,21 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Gui} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Gui)
|
||||
set(Qt6_Gui ${Qt6_Gui})
|
||||
else()
|
||||
set(Qt6_Gui "")
|
||||
endif()
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
INCLUDE(MacroRTIDDSGen)
|
||||
INCLUDE(MacroCodeGenIdl)
|
||||
|
||||
@@ -82,24 +97,26 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcAesCommon
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAesCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
LtsCoordTrans
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Xml
|
||||
$<IF:$<TARGET_EXISTS:ddscore>,ddscore,>
|
||||
$<IF:$<TARGET_EXISTS:svcPdmCommon>,svcPdmCommon,>
|
||||
svcPpmCommon
|
||||
NGLLogger
|
||||
nglsettings
|
||||
ngltools
|
||||
situationMapElevationMap
|
||||
Trajectory
|
||||
ngldb
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAesCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
LtsCoordTrans
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
${Qt6_Gui}
|
||||
Qt6::Xml
|
||||
$<IF:$<TARGET_EXISTS:ddscore>,ddscore,>
|
||||
$<IF:$<TARGET_EXISTS:svcPdmCommon>,svcPdmCommon,>
|
||||
svcPpmCommon
|
||||
NGLLogger
|
||||
nglsettings
|
||||
ngltools
|
||||
situationMapElevationMap
|
||||
Trajectory
|
||||
ngldb
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(svcAesCommon)
|
||||
|
||||
#
|
||||
@@ -332,33 +349,35 @@ ENDIF()
|
||||
|
||||
NGL_ADD_SVC_ICON(SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(AAR SV svcAreaEffectSimulation ${SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAreaEffectSimulation
|
||||
svcAesServer
|
||||
svcCesClient
|
||||
svcCoreClient
|
||||
svcMdmClient
|
||||
svcPdmClient
|
||||
svcPpmClient
|
||||
svcTabClient
|
||||
$<IF:$<TARGET_EXISTS:svcIsmClient>,svcIsmClient,>
|
||||
svcExmClient
|
||||
svcAsmClient
|
||||
Qt6::Core
|
||||
Qt6::Gui # QVector3D
|
||||
RTI::nddscpp2
|
||||
nglsettings
|
||||
ProjectConfig
|
||||
LtsCommandLineParser
|
||||
LtsCoordTrans
|
||||
LtsUtilsCore
|
||||
LtsUtilsDds
|
||||
LtsElevation
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
ngltools
|
||||
saaTelegrams
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAreaEffectSimulation
|
||||
svcAesServer
|
||||
svcCesClient
|
||||
svcCoreClient
|
||||
svcMdmClient
|
||||
svcPdmClient
|
||||
svcPpmClient
|
||||
svcTabClient
|
||||
$<IF:$<TARGET_EXISTS:svcIsmClient>,svcIsmClient,>
|
||||
svcExmClient
|
||||
svcAsmClient
|
||||
Qt6::Core
|
||||
${Qt6_Gui} # QVector3D
|
||||
RTI::nddscpp2
|
||||
nglsettings
|
||||
ProjectConfig
|
||||
LtsCommandLineParser
|
||||
LtsCoordTrans
|
||||
LtsUtilsCore
|
||||
LtsUtilsDds
|
||||
LtsElevation
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
ngltools
|
||||
saaTelegrams
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(svcAreaEffectSimulation)
|
||||
NGL_INSTALL(AAR SV FILES log4cxx_aes.props DESTINATION bin)
|
||||
NGL_ADD_TARGET_LINK(svcAreaEffectSimulation sAES)
|
||||
@@ -416,16 +435,18 @@ NGL_ADD_EXECUTABLE(AAR SV NO_TRANSLATION aes_utils_test
|
||||
Utils/test_main.cpp
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(aes_utils_test
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
RTI::nddscpp2
|
||||
svcAesCommon
|
||||
ProjectConfig
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
nglapplication
|
||||
LtsCoordTrans
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(aes_utils_test
|
||||
Qt6::Core
|
||||
${Qt6_Widgets}
|
||||
RTI::nddscpp2
|
||||
svcAesCommon
|
||||
ProjectConfig
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
nglapplication
|
||||
LtsCoordTrans
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL(AAR SV TARGETS aes_utils_test DESTINATION bin/test)
|
||||
|
||||
#
|
||||
@@ -435,20 +456,22 @@ NGL_ADD_EXECUTABLE(SV NO_TRANSLATION aes_convert_mine_area
|
||||
ModuleTests/aes_convert_mine_area.cpp
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(aes_convert_mine_area
|
||||
Qt6::Core
|
||||
# Qt6::Widgets
|
||||
# RTI::nddscpp2
|
||||
svcAesServer
|
||||
ProjectConfig
|
||||
# nglapplication
|
||||
LtsCoordTrans
|
||||
ngldb
|
||||
LtsCommandLineParser
|
||||
nglcoreapplication
|
||||
nglsettings
|
||||
ngltools
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(aes_convert_mine_area
|
||||
Qt6::Core
|
||||
# ${Qt6_Widgets}
|
||||
# RTI::nddscpp2
|
||||
svcAesServer
|
||||
ProjectConfig
|
||||
# nglapplication
|
||||
LtsCoordTrans
|
||||
ngldb
|
||||
LtsCommandLineParser
|
||||
nglcoreapplication
|
||||
nglsettings
|
||||
ngltools
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL(SV TARGETS aes_convert_mine_area DESTINATION bin/test)
|
||||
|
||||
|
||||
|
||||
+22
-12
@@ -5,6 +5,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Gui} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Gui)
|
||||
set(Qt6_Gui ${Qt6_Gui})
|
||||
else()
|
||||
set(Qt6_Gui "")
|
||||
endif()
|
||||
|
||||
|
||||
NGL_ADD_LIBRARY2(WS SV HLA Trajectory SHARED
|
||||
trajectory_generator.cpp
|
||||
trajectory_generator.h
|
||||
@@ -22,17 +30,19 @@ NGL_TARGET_INCLUDE_DIRECTORIES(Trajectory
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(Trajectory
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
AsmDataPluginInterface
|
||||
ExmDataPluginInterface
|
||||
PUBLIC
|
||||
LtsElevation
|
||||
LtsUtilsCore
|
||||
LtsCoordTrans
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(Trajectory
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
AsmDataPluginInterface
|
||||
ExmDataPluginInterface
|
||||
PUBLIC
|
||||
LtsElevation
|
||||
LtsUtilsCore
|
||||
LtsCoordTrans
|
||||
Qt6::Core
|
||||
${Qt6_Gui}
|
||||
)
|
||||
endif()
|
||||
|
||||
ADD_SUBDIRECTORY(UnitTest_Trajectory)
|
||||
+9
-1
@@ -5,6 +5,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Gui} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Gui)
|
||||
set(Qt6_Gui ${Qt6_Gui})
|
||||
else()
|
||||
set(Qt6_Gui "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(LinkedSources
|
||||
log4cxxTrajectoryUnitTest.props
|
||||
)
|
||||
@@ -22,7 +30,7 @@ IF(BUILD_TESTING)
|
||||
nglcoreapplication
|
||||
svcAesCommon
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
${Qt6_Gui}
|
||||
Qt6::Test)
|
||||
|
||||
ADD_TEST(NAME aesUnitTestTrajectory COMMAND $<TARGET_FILE:aesUnitTestTrajectory>)
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#
|
||||
|
||||
IF(${CMAKE_VERSION} VERSION_LESS "3.6.0")
|
||||
FIND_PACKAGE(Boost REQUIRED COMPONENTS system) # system wird nicht gebraucht, aber ohne Komponente wird das Boost::boost imported Target nicht angelegt (cmake <= 3.5.2)
|
||||
FIND_PACKAGE(Boost COMPONENTS system) # system wird nicht gebraucht, aber ohne Komponente wird das Boost::boost imported Target nicht angelegt (cmake <= 3.5.2)
|
||||
ELSE()
|
||||
FIND_PACKAGE(Boost REQUIRED)
|
||||
FIND_PACKAGE(Boost)
|
||||
ENDIF()
|
||||
INCLUDE(MacroRTIDDSGen)
|
||||
INCLUDE(MacroCodeGenIdl)
|
||||
@@ -154,7 +154,7 @@ NGL_TARGET_LINK_LIBRARIES(svcAvmCommon
|
||||
$<IF:$<TARGET_EXISTS:svcIsmClient>,svcIsmClient,>
|
||||
$<IF:$<TARGET_EXISTS:ddscore>,ddscore,>
|
||||
ngldb
|
||||
Boost::boost
|
||||
$<IF:$<TARGET_EXISTS:Boost::boost>,Boost::boost,>
|
||||
)
|
||||
NGL_INSTALL_TARGET(svcAvmCommon)
|
||||
|
||||
@@ -310,7 +310,7 @@ NGL_TARGET_LINK_LIBRARIES(svcAudioVideoManagement
|
||||
nglcoreapplication
|
||||
ngltools
|
||||
LtsUtilsCoreHeaderOnly
|
||||
Boost::boost
|
||||
$<IF:$<TARGET_EXISTS:Boost::boost>,Boost::boost,>
|
||||
svcCnrHelper
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ IF(BUILD_TESTING)
|
||||
avaTestServer_static
|
||||
nglcoreapplication
|
||||
NGLLogger
|
||||
Boost::boost
|
||||
$<IF:$<TARGET_EXISTS:Boost::boost>,Boost::boost,>
|
||||
)
|
||||
ADD_TEST(NAME avmTests COMMAND $<TARGET_FILE:avmTests>)
|
||||
ENDIF()
|
||||
|
||||
+4
-3
@@ -77,9 +77,10 @@ QString StreamNameMapping::internalName(const QString &displayName)
|
||||
|
||||
QString StreamNameMapping::displayName(const QString &internalName) const
|
||||
{
|
||||
bool matched = m_extractor.exactMatch(internalName);
|
||||
const QString effectiveStreamName = matched ? m_extractor.cap(1) : internalName;
|
||||
const QString sourceSpecifier = matched ? m_extractor.cap(2) : QString();
|
||||
QRegularExpressionMatch match = m_extractor.match(internalName);
|
||||
bool matched = match.hasMatch();
|
||||
const QString effectiveStreamName = matched ? match.captured(1) : internalName;
|
||||
const QString sourceSpecifier = matched ? match.captured(2) : QString();
|
||||
|
||||
const auto &found = m_internalToDisplay.find(effectiveStreamName);
|
||||
if (found == m_internalToDisplay.end())
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@
|
||||
#include "avm_export.h"
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QRegExp>
|
||||
#include <QtCore/QRegularExpression>
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
@@ -85,7 +85,7 @@ private:
|
||||
void remove(int32_t mountingPointId);
|
||||
|
||||
/** Used to extract the effective streamName if it contains a source specifier "(S)" or "(L)". */
|
||||
const QRegExp m_extractor{QStringLiteral("(.*)(\\([SL]\\))"), Qt::CaseInsensitive};
|
||||
const QRegularExpression m_extractor{QStringLiteral("(.*)(\\([SL]\\))")};
|
||||
std::map<int32_t, Names> m_mpToNames; //!< MountingPoint-Id -> internal AVS name
|
||||
std::map<QString, QString> m_internalToDisplay;
|
||||
};
|
||||
|
||||
@@ -12,7 +12,10 @@ ELSE()
|
||||
SET(SCHUSSTAFEL_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
FIND_PACKAGE(ArcGIS REQUIRED)
|
||||
FIND_PACKAGE(ArcGIS)
|
||||
IF(NOT ARCGIS_FOUND)
|
||||
SET(BUILD_ARCGIS OFF CACHE BOOL "Build ArcGIS SDK dependent modules" FORCE)
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(MacroRTIDDSGen)
|
||||
INCLUDE(MacroCodeGenIdl)
|
||||
@@ -126,8 +129,8 @@ NGL_TARGET_LINK_LIBRARIES(svcCesDDSCommon
|
||||
LtsUtilsCore
|
||||
ngltools
|
||||
BuildingControlVwm
|
||||
ArcGISQt5Hack
|
||||
ArcGIS::ArcGIS
|
||||
$<IF:$<TARGET_EXISTS:ArcGISQt5Hack>,ArcGISQt5Hack,>
|
||||
$<IF:$<AND:$<BOOL:${ARCGIS_FOUND}>,$<TARGET_EXISTS:ArcGIS::ArcGIS>>,ArcGIS::ArcGIS,>
|
||||
)
|
||||
NGL_INSTALL_TARGET(svcCesDDSCommon)
|
||||
|
||||
@@ -248,7 +251,7 @@ ENDIF()
|
||||
NGL_ADD_SVC_ICON(SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(AAR SV svcCentralEffectSimulation ${SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcCentralEffectSimulation
|
||||
ArcGISQt5Hack # make sure it's loaded *before* libEsriCommonQt.so
|
||||
$<IF:$<TARGET_EXISTS:ArcGISQt5Hack>,ArcGISQt5Hack,>
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
nglcoreapplication
|
||||
|
||||
+21
-11
@@ -5,6 +5,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
plugin.cpp
|
||||
plugin.h
|
||||
@@ -16,16 +24,18 @@ SET(SRCS
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginArtillerySound MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginArtillerySound
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngltools
|
||||
ngldb
|
||||
svcTabClient
|
||||
LtsCoordTrans
|
||||
# ProjectConfig
|
||||
svcCesDDSCommon
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginArtillerySound
|
||||
Qt6::Network
|
||||
${Qt6_Widgets}
|
||||
cesPluginInterface
|
||||
ngltools
|
||||
ngldb
|
||||
svcTabClient
|
||||
LtsCoordTrans
|
||||
# ProjectConfig
|
||||
svcCesDDSCommon
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(cesPluginArtillerySound)
|
||||
|
||||
+19
-9
@@ -5,6 +5,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
plugin.cpp
|
||||
plugin.h
|
||||
@@ -20,14 +28,16 @@ SET(SRCS
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginBasic MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginBasic
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginBasic
|
||||
Qt6::Network
|
||||
${Qt6_Widgets}
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(cesPluginBasic)
|
||||
|
||||
+21
-11
@@ -5,6 +5,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
plugin.cpp
|
||||
plugin.h
|
||||
@@ -24,16 +32,18 @@ SET(SRCS
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginCesBuildings MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginCesBuildings
|
||||
PUBLIC
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
LtsCoordinate
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginCesBuildings
|
||||
PUBLIC
|
||||
Qt6::Network
|
||||
${Qt6_Widgets}
|
||||
LtsCoordinate
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(cesPluginCesBuildings)
|
||||
|
||||
+19
-9
@@ -5,6 +5,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
plugin.cpp
|
||||
plugin.h
|
||||
@@ -20,14 +28,16 @@ SET(SRCS
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginCes2D MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginCes2D
|
||||
PUBLIC
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginCes2D
|
||||
PUBLIC
|
||||
Qt6::Network
|
||||
${Qt6_Widgets}
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(cesPluginCes2D)
|
||||
|
||||
+23
-13
@@ -5,6 +5,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
OPTION(WITH_ARCGIS "Enable ArcGIS support" OFF)
|
||||
|
||||
#ADD_SUBDIRECTORY(UnitTests)
|
||||
@@ -34,19 +42,21 @@ SET(SRCS
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginExplosions MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginExplosions
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
NGLLogger
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
LtsCoordinate
|
||||
svcCesDDSCommon
|
||||
svcTabClient
|
||||
svcAesClient
|
||||
svcPdmClient
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginExplosions
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
${Qt6_Widgets}
|
||||
NGLLogger
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
LtsCoordinate
|
||||
svcCesDDSCommon
|
||||
svcTabClient
|
||||
svcAesClient
|
||||
svcPdmClient
|
||||
)
|
||||
endif()
|
||||
IF(WITH_ARCGIS)
|
||||
TARGET_LINK_LIBRARIES(cesPluginExplosions ArcGIS::ArcGIS)
|
||||
ENDIF()
|
||||
|
||||
+19
-9
@@ -5,6 +5,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
plugin.cpp
|
||||
plugin.h
|
||||
@@ -18,14 +26,16 @@ SET(SRCS
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginCES_FunctionalAreas MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginCES_FunctionalAreas
|
||||
PUBLIC
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginCES_FunctionalAreas
|
||||
PUBLIC
|
||||
Qt6::Network
|
||||
${Qt6_Widgets}
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(cesPluginCES_FunctionalAreas)
|
||||
|
||||
+18
-8
@@ -5,6 +5,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
handler_participant_gas_pipe.cpp
|
||||
handler_participant_gas_pipe.h
|
||||
@@ -14,13 +22,15 @@ SET(SRCS
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginGasPipes MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginGasPipes
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginGasPipes
|
||||
Qt6::Network
|
||||
${Qt6_Widgets}
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(cesPluginGasPipes)
|
||||
|
||||
+23
-13
@@ -5,6 +5,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
plugin.cpp
|
||||
plugin.h
|
||||
@@ -25,19 +33,21 @@ SET(SRCS
|
||||
# But is an export macro realy needed? -> No
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginGeoPairing MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginGeoPairing
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# GeoParing stuff
|
||||
GBL_Types
|
||||
GBL_ConfigSystem
|
||||
FW_Ballistic
|
||||
svcCesGeoPairingImpl
|
||||
$<$<TARGET_EXISTS:Schusstafel::Schusstafel>:Schusstafel::Schusstafel>
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginGeoPairing
|
||||
Qt6::Network
|
||||
${Qt6_Widgets}
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# GeoParing stuff
|
||||
GBL_Types
|
||||
GBL_ConfigSystem
|
||||
FW_Ballistic
|
||||
svcCesGeoPairingImpl
|
||||
$<$<TARGET_EXISTS:Schusstafel::Schusstafel>:Schusstafel::Schusstafel>
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(cesPluginGeoPairing)
|
||||
|
||||
ADD_SUBDIRECTORY(GBL_Global)
|
||||
|
||||
+20
-10
@@ -5,6 +5,14 @@
|
||||
# $Author: fritsche_h $
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
plugin.cpp
|
||||
plugin.h
|
||||
@@ -14,15 +22,17 @@ SET(SRCS
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginCES_Jamming MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginCES_Jamming
|
||||
PUBLIC
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
LtsUtilsCore
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginCES_Jamming
|
||||
PUBLIC
|
||||
Qt6::Network
|
||||
${Qt6_Widgets}
|
||||
cesPluginInterface
|
||||
LtsUtilsCore
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(cesPluginCES_Jamming)
|
||||
|
||||
+18
-8
@@ -5,6 +5,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
plugin.cpp
|
||||
plugin.h
|
||||
@@ -16,13 +24,15 @@ SET(SRCS
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginMineAreas MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginMineAreas
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginMineAreas
|
||||
Qt6::Network
|
||||
${Qt6_Widgets}
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(cesPluginMineAreas)
|
||||
|
||||
+19
-9
@@ -1,3 +1,11 @@
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
plugin.cpp
|
||||
plugin.h
|
||||
@@ -7,13 +15,15 @@ SET(SRCS
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginMineLayingArtillery MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginMineLayingArtillery
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcAesClient
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginMineLayingArtillery
|
||||
Qt6::Network
|
||||
${Qt6_Widgets}
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcAesClient
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(cesPluginMineLayingArtillery)
|
||||
+21
-11
@@ -5,6 +5,14 @@
|
||||
# $Author: fritsche_h $
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
plugin.cpp
|
||||
plugin.h
|
||||
@@ -16,16 +24,18 @@ SET(SRCS
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginCES_MissionPlan MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginCES_MissionPlan
|
||||
PUBLIC
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
LtsUtilsCore
|
||||
LtsUtilsSettings
|
||||
# ProjectConfig
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginCES_MissionPlan
|
||||
PUBLIC
|
||||
Qt6::Network
|
||||
${Qt6_Widgets}
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
LtsUtilsCore
|
||||
LtsUtilsSettings
|
||||
# ProjectConfig
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(cesPluginCES_MissionPlan)
|
||||
|
||||
+20
-10
@@ -5,6 +5,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
plugin.cpp
|
||||
plugin.h
|
||||
@@ -14,15 +22,17 @@ SET(SRCS
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginCES_NBC MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginCES_NBC
|
||||
PUBLIC
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
svcBldClient
|
||||
# ProjectConfig
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginCES_NBC
|
||||
PUBLIC
|
||||
Qt6::Network
|
||||
${Qt6_Widgets}
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
svcBldClient
|
||||
# ProjectConfig
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(cesPluginCES_NBC)
|
||||
|
||||
+23
-13
@@ -5,6 +5,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
plugin.cpp
|
||||
plugin.h
|
||||
@@ -20,18 +28,20 @@ SET(SRCS
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginParticipantBuildings MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginParticipantBuildings
|
||||
PUBLIC
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
svcBldClient
|
||||
svcTabClient
|
||||
LtsCoordTrans
|
||||
# ProjectConfig
|
||||
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginParticipantBuildings
|
||||
PUBLIC
|
||||
Qt6::Network
|
||||
${Qt6_Widgets}
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
svcBldClient
|
||||
svcTabClient
|
||||
LtsCoordTrans
|
||||
# ProjectConfig
|
||||
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(cesPluginParticipantBuildings)
|
||||
|
||||
+22
-12
@@ -5,6 +5,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
plugin.cpp
|
||||
plugin.h
|
||||
@@ -21,16 +29,18 @@ SET(SRCS
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginTargetAreas MODULE ${SRCS})
|
||||
NGL_INSTALL_TARGET(cesPluginTargetAreas)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginTargetAreas
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
NGLLogger
|
||||
cesPluginInterface
|
||||
svcPpmClient
|
||||
svcTabClient
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
$<IF:$<TARGET_EXISTS:ddscore>,ddscore,>
|
||||
LtsCoordTrans
|
||||
svcCoreClient
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginTargetAreas
|
||||
Qt6::Core
|
||||
${Qt6_Widgets}
|
||||
NGLLogger
|
||||
cesPluginInterface
|
||||
svcPpmClient
|
||||
svcTabClient
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
$<IF:$<TARGET_EXISTS:ddscore>,ddscore,>
|
||||
LtsCoordTrans
|
||||
svcCoreClient
|
||||
)
|
||||
endif()
|
||||
|
||||
+18
-8
@@ -5,6 +5,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
plugin.cpp
|
||||
plugin.h
|
||||
@@ -16,13 +24,15 @@ SET(SRCS
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginVirtualMines MODULE ${SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginVirtualMines
|
||||
Qt6::Network
|
||||
Qt6::Widgets
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginVirtualMines
|
||||
Qt6::Network
|
||||
${Qt6_Widgets}
|
||||
cesPluginInterface
|
||||
ngldb
|
||||
svcCesDDSCommon
|
||||
# ProjectConfig
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(cesPluginVirtualMines)
|
||||
|
||||
@@ -172,7 +172,7 @@ NGL_ADD_SVC_ICON(SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(AAR SV svcEffectShowClient ${SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcEffectShowClient
|
||||
Qt6::Core
|
||||
Qt6::SerialPort
|
||||
$<IF:$<TARGET_EXISTS:Qt6::SerialPort>,Qt6::SerialPort,>
|
||||
Qt6::Network
|
||||
svcEscCommon
|
||||
svcEscServer
|
||||
@@ -185,7 +185,7 @@ NGL_TARGET_LINK_LIBRARIES(svcEffectShowClient
|
||||
nglsettings
|
||||
ProjectConfig
|
||||
LtsCommandLineParser
|
||||
LtsSerialPortQuerry
|
||||
$<IF:$<TARGET_EXISTS:LtsSerialPortQuerry>,LtsSerialPortQuerry,>
|
||||
NGLLogger
|
||||
LtsUtilsCore
|
||||
nglcoreapplication
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_WebSockets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::WebSockets)
|
||||
set(Qt6_WebSockets ${Qt6_WebSockets})
|
||||
else()
|
||||
set(Qt6_WebSockets "")
|
||||
endif()
|
||||
|
||||
|
||||
INCLUDE(MacroRTIDDSGen)
|
||||
INCLUDE(MacroCodeGenIdl)
|
||||
|
||||
@@ -183,7 +191,7 @@ NGL_TARGET_LINK_LIBRARIES(svcExerciseEventManagement
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
ngltools
|
||||
Qt6::WebSockets
|
||||
${Qt6_WebSockets}
|
||||
)
|
||||
NGL_INSTALL_TARGET(svcExerciseEventManagement)
|
||||
NGL_INSTALL(AAR SV FILES log4cxx_eem.props DESTINATION bin)
|
||||
|
||||
+9
-1
@@ -4,6 +4,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_WebSockets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::WebSockets)
|
||||
set(Qt6_WebSockets ${Qt6_WebSockets})
|
||||
else()
|
||||
set(Qt6_WebSockets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(websocket_SRCS
|
||||
main.cpp
|
||||
web_socket_handler.cpp
|
||||
@@ -12,7 +20,7 @@ SET(websocket_SRCS
|
||||
|
||||
NGL_ADD_EXECUTABLE(AAR SV webSocketServer ${websocket_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(webSocketServer
|
||||
Qt6::WebSockets
|
||||
${Qt6_WebSockets}
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
NGLLogger
|
||||
|
||||
+9
-1
@@ -4,6 +4,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Gui} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Gui)
|
||||
set(Qt6_Gui ${Qt6_Gui})
|
||||
else()
|
||||
set(Qt6_Gui "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS_TEST
|
||||
flm_tests.cpp
|
||||
flm_tests.h
|
||||
@@ -22,7 +30,7 @@ IF(TARGET svcFlmClient AND TARGET svcFlmServer)
|
||||
TARGET_LINK_LIBRARIES(flmTests
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
Qt6::Gui
|
||||
${Qt6_Gui}
|
||||
RTI::nddscpp2
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
nglcoreapplication
|
||||
|
||||
+42
-30
@@ -5,6 +5,14 @@
|
||||
#
|
||||
|
||||
|
||||
# Make ${Qt6_Gui} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Gui)
|
||||
set(Qt6_Gui ${Qt6_Gui})
|
||||
else()
|
||||
set(Qt6_Gui "")
|
||||
endif()
|
||||
|
||||
|
||||
INCLUDE(MacroRTIDDSGen)
|
||||
INCLUDE(MacroCodeGenIdl)
|
||||
|
||||
@@ -85,17 +93,19 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcIsmClient
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(svcIsmClient
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
Qt6::Xml
|
||||
PUBLIC
|
||||
svcIsmCommon
|
||||
ddsftc
|
||||
LtsCoordTrans
|
||||
Qt6::Gui
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcIsmClient
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
Qt6::Xml
|
||||
PUBLIC
|
||||
svcIsmCommon
|
||||
ddsftc
|
||||
LtsCoordTrans
|
||||
${Qt6_Gui}
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(svcIsmClient)
|
||||
|
||||
#
|
||||
@@ -201,25 +211,27 @@ ENDIF()
|
||||
|
||||
NGL_ADD_SVC_ICON(SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(AAR SV svcInfrastructureManagement ${SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcInfrastructureManagement
|
||||
Qt6::Core
|
||||
Qt6::Xml
|
||||
Qt6::Gui
|
||||
svcCoreClient
|
||||
svcIsmCommon
|
||||
svcIsmServer
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
nglsettings
|
||||
ProjectConfig
|
||||
LtsCommandLineParser
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
LtsCoordTrans
|
||||
LtsWebSocketServer
|
||||
svcAsmClient
|
||||
svcExmClient
|
||||
ngltools
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcInfrastructureManagement
|
||||
Qt6::Core
|
||||
Qt6::Xml
|
||||
${Qt6_Gui}
|
||||
svcCoreClient
|
||||
svcIsmCommon
|
||||
svcIsmServer
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
nglsettings
|
||||
ProjectConfig
|
||||
LtsCommandLineParser
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
LtsCoordTrans
|
||||
LtsWebSocketServer
|
||||
svcAsmClient
|
||||
svcExmClient
|
||||
ngltools
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(svcInfrastructureManagement)
|
||||
NGL_INSTALL(AAR SV FILES log4cxx_ism.props DESTINATION bin)
|
||||
NGL_ADD_TARGET_LINK(svcInfrastructureManagement sISM)
|
||||
|
||||
+9
-1
@@ -4,6 +4,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_WebSockets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::WebSockets)
|
||||
set(Qt6_WebSockets ${Qt6_WebSockets})
|
||||
else()
|
||||
set(Qt6_WebSockets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(SRCS_IMPORT_BUILDINGS
|
||||
ism_import_buildings.cpp
|
||||
ism_import_buildings.h
|
||||
@@ -17,7 +25,7 @@ NGL_TARGET_LINK_LIBRARIES(ismImportBuildings
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
nglcoreapplication
|
||||
LtsUtilsCoreHeaderOnly
|
||||
Qt6::WebSockets
|
||||
${Qt6_WebSockets}
|
||||
)
|
||||
NGL_INSTALL_TARGET(ismImportBuildings)
|
||||
|
||||
@@ -65,7 +65,7 @@ void NmeaHandler::IIXDR(QString package)
|
||||
NmeaManagement::BatteryState batteryState;
|
||||
NmeaManagement::ServiceControl serviceControl;
|
||||
QRegExp sep(QStringLiteral("(\\,|\\*)"));
|
||||
QStringList pkt_data = package.split(sep);
|
||||
QStringList pkt_data = package.split(sep.pattern());
|
||||
INFO_LOG(m_logger) << "----------------------------------------------------";
|
||||
INFO_LOG(m_logger) << "batteryState pkt_data.size=" << pkt_data.size();
|
||||
for (int i = 0; i < pkt_data.size(); i++)
|
||||
@@ -186,7 +186,7 @@ void NmeaHandler::IIALR(QString package)
|
||||
{
|
||||
NmeaManagement::BatteryAlarm batteryAlarm;
|
||||
QRegExp sep(QStringLiteral("(\\,|\\*)"));
|
||||
QStringList pkt_data = package.split(sep);
|
||||
QStringList pkt_data = package.split(sep.pattern());
|
||||
alarm_state packageData;
|
||||
INFO_LOG(m_logger) << "pkt_data.size=" << pkt_data.size();
|
||||
// for ( int i = 0; i < pkt_data.size(); i++)
|
||||
@@ -230,7 +230,7 @@ void NmeaHandler::GPGGA(QString package)
|
||||
double latDecimal;
|
||||
double lonDecimal;
|
||||
QRegExp sep(QStringLiteral("(\\,|\\*)"));
|
||||
QStringList pkt_data = package.split(sep);
|
||||
QStringList pkt_data = package.split(sep.pattern());
|
||||
gpgga_data packageData;
|
||||
|
||||
|
||||
@@ -317,7 +317,7 @@ void NmeaHandler::GPGGA(QString package)
|
||||
void NmeaHandler::GPRMC(QString package)
|
||||
{
|
||||
QRegExp sep(QStringLiteral("(\\,|\\*)"));
|
||||
QStringList pkt_data = package.split(sep);
|
||||
QStringList pkt_data = package.split(sep.pattern());
|
||||
gprmc_data packageData;
|
||||
|
||||
packageData.A_hour = (int)pkt_data[1].toFloat();
|
||||
|
||||
@@ -4,6 +4,21 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Gui} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Gui)
|
||||
set(Qt6_Gui ${Qt6_Gui})
|
||||
else()
|
||||
set(Qt6_Gui "")
|
||||
endif()
|
||||
|
||||
# Make ${Qt6_WebSockets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::WebSockets)
|
||||
set(Qt6_WebSockets ${Qt6_WebSockets})
|
||||
else()
|
||||
set(Qt6_WebSockets "")
|
||||
endif()
|
||||
|
||||
|
||||
INCLUDE(MacroRTIDDSGen)
|
||||
INCLUDE(MacroCodeGenIdl)
|
||||
|
||||
@@ -25,16 +40,15 @@ SET(SRCS_common
|
||||
# Generate ppm_enums.idl / ppm.idl
|
||||
IF(BUILD_RTI)
|
||||
CODEGEN_IDL_SVC(SRCS_common ${xml_FILE})
|
||||
# Generate *.cpp/*.hpp from idl
|
||||
RTIDDSGEN(SRCS_common ppm_enums.idl)
|
||||
RTIDDSGEN(SRCS_common ppm.idl)
|
||||
ENDIF()
|
||||
# Generate ppm_db_structs.cpp/.h
|
||||
CODEGEN_DATABASE_STRUCTS(SRCS_common ${xml_FILE})
|
||||
# Generate ppm_db.cpp, ppm_db_impl.cpp/.h
|
||||
CODEGEN_DATABASE_SQL(SRCS_common ${xml_FILE})
|
||||
|
||||
# Generate *.cpp/*.hpp from idl
|
||||
RTIDDSGEN(SRCS_common ppm_enums.idl)
|
||||
RTIDDSGEN(SRCS_common ppm.idl)
|
||||
|
||||
# Generate ppm_dt[s,c]_types.h, ppm_ft[s,c]_types.h
|
||||
IF(BUILD_RTI)
|
||||
CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
||||
@@ -50,20 +64,22 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcPpmCommon
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcPpmCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
LtsUtilsCore
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
$<IF:$<TARGET_EXISTS:ddscore>,ddscore,>
|
||||
NGLLogger
|
||||
$<IF:$<TARGET_EXISTS:svcPdmCommon>,svcPdmCommon,>
|
||||
LtsUtilsCore
|
||||
LtsCoordTrans
|
||||
ngldb
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcPpmCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
LtsUtilsCore
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
${Qt6_Gui}
|
||||
$<IF:$<TARGET_EXISTS:ddscore>,ddscore,>
|
||||
NGLLogger
|
||||
$<IF:$<TARGET_EXISTS:svcPdmCommon>,svcPdmCommon,>
|
||||
LtsUtilsCore
|
||||
LtsCoordTrans
|
||||
ngldb
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(svcPpmCommon)
|
||||
|
||||
#
|
||||
@@ -165,7 +181,7 @@ IF (TARGET ppmRecordReplayPlugin)
|
||||
)
|
||||
TARGET_LINK_LIBRARIES(ppmRecordReplayPlugin
|
||||
Qt6::Concurrent
|
||||
Qt6::WebSockets
|
||||
${Qt6_WebSockets}
|
||||
tabRecordReplayPlugin
|
||||
svcBldClient
|
||||
svcPpmServer
|
||||
@@ -278,7 +294,7 @@ NGL_TARGET_LINK_LIBRARIES(svcParticipantManagement
|
||||
ppmRecordReplayPlugin
|
||||
Qt6::Core
|
||||
Qt6::Concurrent
|
||||
Qt6::WebSockets
|
||||
${Qt6_WebSockets}
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
LtsCommandLineParser
|
||||
nglsettings
|
||||
|
||||
@@ -43,23 +43,47 @@ IF(BUILD_RTI)
|
||||
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
|
||||
ENDIF()
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV WS HLA $<IF:$<TARGET_EXISTS:svcPdmCommon>,svcPdmCommon,> SHARED ${SRCS_common})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES($<IF:$<TARGET_EXISTS:svcPdmCommon>,svcPdmCommon,>
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES($<IF:$<TARGET_EXISTS:svcPdmCommon>,svcPdmCommon,>
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
$<IF:$<TARGET_EXISTS:ddscore>,ddscore,>
|
||||
NGLLogger
|
||||
LtsUtilsCore
|
||||
ngldb
|
||||
)
|
||||
NGL_INSTALL_TARGET($<IF:$<TARGET_EXISTS:svcPdmCommon>,svcPdmCommon,>)
|
||||
# Check if svcPdmCommon target exists
|
||||
IF(TARGET svcPdmCommon)
|
||||
SET(PDM_COMMON_TARGET svcPdmCommon)
|
||||
ELSE()
|
||||
SET(PDM_COMMON_TARGET "")
|
||||
ENDIF()
|
||||
|
||||
IF(PDM_COMMON_TARGET)
|
||||
NGL_ADD_LIBRARY(AAR SV WS HLA ${PDM_COMMON_TARGET} SHARED ${SRCS_common})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(${PDM_COMMON_TARGET}
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(${PDM_COMMON_TARGET}
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
$<IF:$<TARGET_EXISTS:ddscore>,ddscore,>
|
||||
NGLLogger
|
||||
LtsUtilsCore
|
||||
ngldb
|
||||
)
|
||||
NGL_INSTALL_TARGET(${PDM_COMMON_TARGET})
|
||||
ELSE()
|
||||
# Create a dummy interface library if svcPdmCommon doesn't exist
|
||||
ADD_LIBRARY(svcPdmCommon INTERFACE)
|
||||
TARGET_INCLUDE_DIRECTORIES(svcPdmCommon
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
TARGET_LINK_LIBRARIES(svcPdmCommon
|
||||
INTERFACE
|
||||
Qt6::Core
|
||||
NGLLogger
|
||||
LtsUtilsCore
|
||||
ngldb
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
#
|
||||
# --- Library svcPdmClient --------------------------------------------------------------------------------
|
||||
@@ -75,6 +99,7 @@ IF(BUILD_RTI)
|
||||
ENDIF()
|
||||
|
||||
NGL_ADD_LIBRARY(WS AAR SV HLA svcPdmClient SHARED ${SRCS_client})
|
||||
SET_TARGET_PROPERTIES(svcPdmClient PROPERTIES AUTOMOC ON)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcPdmClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
@@ -86,7 +111,8 @@ NGL_TARGET_LINK_LIBRARIES(svcPdmClient
|
||||
RTI::nddscpp2
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
PUBLIC
|
||||
$<IF:$<TARGET_EXISTS:svcPdmCommon>,svcPdmCommon,>
|
||||
${PDM_COMMON_TARGET}
|
||||
Qt6::Core
|
||||
ddsftc
|
||||
)
|
||||
NGL_INSTALL_TARGET(svcPdmClient)
|
||||
@@ -113,9 +139,9 @@ NGL_TARGET_LINK_LIBRARIES(svcPdmServer
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
ddsfts
|
||||
$<IF:$<TARGET_EXISTS:ddsfts>,ddsfts,>
|
||||
PUBLIC
|
||||
$<IF:$<TARGET_EXISTS:svcPdmCommon>,svcPdmCommon,>
|
||||
${PDM_COMMON_TARGET}
|
||||
ngldb
|
||||
)
|
||||
NGL_INSTALL_TARGET(svcPdmServer)
|
||||
@@ -160,7 +186,7 @@ NGL_ADD_EXECUTABLE(AAR SV svcProjectDataManagement ${SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcProjectDataManagement
|
||||
Qt6::Core
|
||||
svcCoreClient
|
||||
$<IF:$<TARGET_EXISTS:svcPdmCommon>,svcPdmCommon,>
|
||||
${PDM_COMMON_TARGET}
|
||||
svcPdmServer
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
nglsettings
|
||||
|
||||
+203
-190
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "pdm_dtc_impl_custom.h"
|
||||
#include "NGLLogger/INGLLogger.h"
|
||||
#include "NGLLogger/NGLLoggerBootstrap.h"
|
||||
#include "pdm_translation.h"
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
@@ -25,7 +26,7 @@ namespace ProjectDataManagement
|
||||
namespace Interface
|
||||
{
|
||||
DtcImplCustom::DtcImplCustom(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector)
|
||||
: DtcImpl(ddsConnector)
|
||||
: DtcImpl(ddsConnector), m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("ProjectDataManagement.DtcImplCustom"))
|
||||
{
|
||||
waitForHistoricalDataChargeType(2000);
|
||||
waitForHistoricalDataIgniterFunction(2000);
|
||||
@@ -59,20 +60,20 @@ void DtcImplCustom::fillChargeTypeIgniterTypeIgniterFunctionProps()
|
||||
for (auto it = ctItIfMap.constBegin(); it != ctItIfMap.constEnd(); ++it)
|
||||
{
|
||||
ChargeTypeIgniterTypeIgniterFunctionProps props;
|
||||
ChargeTypeIgniterTypeIgniterFunction ctitif = it.value();
|
||||
ChargeTypeIgniterTypeIgniterFunction ctitif = *it;
|
||||
|
||||
props.chargeTypeId = ctitif.chargeTypeId();
|
||||
props.igniterTypeId = ctitif.igniterTypeId();
|
||||
props.igniterFunctionId = ctitif.igniterFunctionId();
|
||||
props.igniterFunctionBase = ctitif.igniterFunctionBaseId();
|
||||
props.impactRadius = ctitif.impactRadius();
|
||||
props.hazardDistance = ctitif.hazardDistance();
|
||||
props.chargeLegacyId = ctitif.chargeLegacyId();
|
||||
props.chargeTypeId = ctitif.chargeTypeId;
|
||||
props.igniterTypeId = ctitif.igniterTypeId;
|
||||
props.igniterFunctionId = ctitif.igniterFunctionId;
|
||||
props.igniterFunctionBase = ctitif.igniterFunctionBase;
|
||||
props.impactRadius = ctitif.impactRadius;
|
||||
props.hazardDistance = ctitif.hazardDistance;
|
||||
props.chargeLegacyId = ctitif.chargeLegacyId;
|
||||
|
||||
QJsonObject ctProps = propertiesToJson(chargeType(props.chargeTypeId).properties());
|
||||
QJsonObject itProps = propertiesToJson(igniterType(props.igniterTypeId).properties());
|
||||
QJsonObject ifProps = propertiesToJson(igniterFunction(props.igniterFunctionId).properties());
|
||||
QJsonObject ctitifProps = propertiesToJson(ctitif.properties());
|
||||
QJsonObject ctProps = propertiesToJson(chargeType(props.chargeTypeId).properties);
|
||||
QJsonObject itProps = propertiesToJson(igniterType(props.igniterTypeId).properties);
|
||||
QJsonObject ifProps = propertiesToJson(igniterFunction(props.igniterFunctionId).properties);
|
||||
QJsonObject ctitifProps = propertiesToJson(ctitif.properties);
|
||||
|
||||
// Combine JsonObjects to Map -> one big JsonObject
|
||||
QVariantMap map = ctProps.toVariantMap();
|
||||
@@ -89,28 +90,28 @@ void DtcImplCustom::fillChargeTypeIgniterTypeIgniterFunctionProps()
|
||||
QJsonObject obj = QJsonObject::fromVariantMap(map);
|
||||
setProps(props, obj);
|
||||
|
||||
m_ctItIfProps.insert(it.key(), props);
|
||||
m_ctItIfProps.insert(ctitif.id, props);
|
||||
}
|
||||
|
||||
for (auto it = m_ctItIfProps.constBegin(); it != m_ctItIfProps.constEnd(); ++it)
|
||||
{
|
||||
if (it.value().chargeTypeId > 2000 || it.value().chargeTypeId < 100)
|
||||
if (it->chargeTypeId > 2000 || it->chargeTypeId < 100)
|
||||
continue;
|
||||
|
||||
INFO_LOG(m_logger) << "chargeTypeId: " << it.value().chargeTypeId;
|
||||
INFO_LOG(m_logger) << "ChargeTypeName:" << it.value().adlerChargeTypeName;
|
||||
INFO_LOG(m_logger) << "igniterTypeId: " << it.value().igniterTypeId;
|
||||
INFO_LOG(m_logger) << "igniterTypeName: " << it.value().adlerIgniterTypeName;
|
||||
INFO_LOG(m_logger) << "igniterFunctionId: " << it.value().igniterFunctionId;
|
||||
INFO_LOG(m_logger) << "igniterFunctionName: " << it.value().adlerIgniterFunctionName;
|
||||
INFO_LOG(m_logger) << "igniterFunctionBase: " << it.value().igniterFunctionBase;
|
||||
INFO_LOG(m_logger) << "impactRadius: " << it.value().impactRadius;
|
||||
INFO_LOG(m_logger) << "chargeLegacyId: " << it.value().chargeLegacyId;
|
||||
INFO_LOG(m_logger) << "isSmart: " << it.value().isSmart;
|
||||
INFO_LOG(m_logger) << "isSmoke: " << it.value().isSmoke;
|
||||
INFO_LOG(m_logger) << "isDus: " << it.value().isDus;
|
||||
INFO_LOG(m_logger) << "isConcrete: " << it.value().isConcrete;
|
||||
INFO_LOG(m_logger) << "volatilityTypeId: " << it.value().volatilityTypeId;
|
||||
INFO_LOG(m_logger) << "chargeTypeId: " << it->chargeTypeId;
|
||||
INFO_LOG(m_logger) << "ChargeTypeName:" << it->adlerChargeTypeName;
|
||||
INFO_LOG(m_logger) << "igniterTypeId: " << it->igniterTypeId;
|
||||
INFO_LOG(m_logger) << "igniterTypeName: " << it->adlerIgniterTypeName;
|
||||
INFO_LOG(m_logger) << "igniterFunctionId: " << it->igniterFunctionId;
|
||||
INFO_LOG(m_logger) << "igniterFunctionName: " << it->adlerIgniterFunctionName;
|
||||
INFO_LOG(m_logger) << "igniterFunctionBase: " << it->igniterFunctionBase;
|
||||
INFO_LOG(m_logger) << "impactRadius: " << it->impactRadius;
|
||||
INFO_LOG(m_logger) << "chargeLegacyId: " << it->chargeLegacyId;
|
||||
INFO_LOG(m_logger) << "isSmart: " << it->isSmart;
|
||||
INFO_LOG(m_logger) << "isSmoke: " << it->isSmoke;
|
||||
INFO_LOG(m_logger) << "isDus: " << it->isDus;
|
||||
INFO_LOG(m_logger) << "isConcrete: " << it->isConcrete;
|
||||
INFO_LOG(m_logger) << "volatilityTypeId: " << it->volatilityTypeId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,11 +123,11 @@ void DtcImplCustom::fillChargeTypeLoadTypeProps()
|
||||
for (const auto &ctlt : chargeTypeLoadTypes())
|
||||
{
|
||||
ChargeTypeLoadTypeProps props;
|
||||
props.chargeTypeId = ctlt.chargeTypeId();
|
||||
props.loadTypeId = ctlt.loadTypeId();
|
||||
props.chargeTypeId = ctlt.chargeTypeId;
|
||||
props.loadTypeId = ctlt.loadTypeId;
|
||||
|
||||
QJsonObject ltProps = propertiesToJson(loadType(props.loadTypeId).properties());
|
||||
QJsonObject ctltProps = propertiesToJson(ctlt.properties());
|
||||
QJsonObject ltProps = propertiesToJson(loadType(props.loadTypeId).properties);
|
||||
QJsonObject ctltProps = propertiesToJson(ctlt.properties);
|
||||
|
||||
// Combine JsonObjects to Map -> one big JsonObject
|
||||
QVariantMap map = ltProps.toVariantMap();
|
||||
@@ -139,24 +140,24 @@ void DtcImplCustom::fillChargeTypeLoadTypeProps()
|
||||
QJsonObject obj = QJsonObject::fromVariantMap(map);
|
||||
setProps(props, obj);
|
||||
|
||||
m_ctLtProps.insert(ctlt.id(), props);
|
||||
m_ctLtProps.insert(ctlt.id, props);
|
||||
}
|
||||
}
|
||||
|
||||
void DtcImplCustom::onIgniterTypeChanged(const IgniterType &ignType)
|
||||
{
|
||||
if (ignType.id() <= 0)
|
||||
if (ignType.id <= 0)
|
||||
return;
|
||||
|
||||
for (auto it = m_ctItIfProps.begin(); it != m_ctItIfProps.end(); ++it)
|
||||
{
|
||||
if (it.value().igniterTypeId != ignType.id())
|
||||
if (it->igniterTypeId != ignType.id)
|
||||
continue;
|
||||
|
||||
QJsonObject ctProps = propertiesToJson(chargeType(it.value().chargeTypeId).properties());
|
||||
QJsonObject itProps = propertiesToJson(ignType.properties());
|
||||
QJsonObject ifProps = propertiesToJson(igniterFunction(it.value().igniterFunctionId).properties());
|
||||
QJsonObject ctitifProps = propertiesToJson(chargeTypeIgniterTypeIgniterFunction(it.key()).properties());
|
||||
QJsonObject ctProps = propertiesToJson(chargeType(it->chargeTypeId).properties);
|
||||
QJsonObject itProps = propertiesToJson(ignType.properties);
|
||||
QJsonObject ifProps = propertiesToJson(igniterFunction(it->igniterFunctionId).properties);
|
||||
QJsonObject ctitifProps = propertiesToJson(chargeTypeIgniterTypeIgniterFunction(it.key()).properties);
|
||||
|
||||
// Combine JsonObjects to Map -> one big JsonObject
|
||||
mergeProperties(it, ifProps, ctProps, ctitifProps, itProps);
|
||||
@@ -165,18 +166,18 @@ void DtcImplCustom::onIgniterTypeChanged(const IgniterType &ignType)
|
||||
|
||||
void DtcImplCustom::onIgniterFunctionChanged(const IgniterFunction &ignFunc)
|
||||
{
|
||||
if (ignFunc.id() <= 0)
|
||||
if (ignFunc.id <= 0)
|
||||
return;
|
||||
|
||||
for (auto it = m_ctItIfProps.begin(); it != m_ctItIfProps.end(); ++it)
|
||||
{
|
||||
if (it.value().igniterFunctionId != ignFunc.id())
|
||||
if (it->igniterFunctionId != ignFunc.id)
|
||||
continue;
|
||||
|
||||
QJsonObject ctProps = propertiesToJson(chargeType(it.value().chargeTypeId).properties());
|
||||
QJsonObject itProps = propertiesToJson(igniterType(it.value().igniterFunctionId).properties());
|
||||
QJsonObject ifProps = propertiesToJson(ignFunc.properties());
|
||||
QJsonObject ctitifProps = propertiesToJson(chargeTypeIgniterTypeIgniterFunction(it.key()).properties());
|
||||
QJsonObject ctProps = propertiesToJson(chargeType(it->chargeTypeId).properties);
|
||||
QJsonObject itProps = propertiesToJson(igniterType(it->igniterTypeId).properties);
|
||||
QJsonObject ifProps = propertiesToJson(ignFunc.properties);
|
||||
QJsonObject ctitifProps = propertiesToJson(chargeTypeIgniterTypeIgniterFunction(it.key()).properties);
|
||||
|
||||
// Combine JsonObjects to Map -> one big JsonObject
|
||||
mergeProperties(it, ifProps, ctProps, ctitifProps, itProps);
|
||||
@@ -202,9 +203,9 @@ void DtcImplCustom::mergeProperties(QHash<int, ChargeTypeIgniterTypeIgniterFunct
|
||||
#endif
|
||||
|
||||
QJsonObject obj = QJsonObject::fromVariantMap(map);
|
||||
setProps(it.value(), obj);
|
||||
setProps(*it, obj);
|
||||
|
||||
m_ctItIfProps.insert(it.key(), it.value());
|
||||
m_ctItIfProps.insert(it.key(), *it);
|
||||
}
|
||||
|
||||
void DtcImplCustom::onChargeTypeChanged(const ChargeType &ct)
|
||||
@@ -215,13 +216,13 @@ void DtcImplCustom::onChargeTypeChanged(const ChargeType &ct)
|
||||
QHash<int, ChargeTypeIgniterTypeIgniterFunctionProps>::iterator it;
|
||||
for (it = m_ctItIfProps.begin(); it != m_ctItIfProps.end(); ++it)
|
||||
{
|
||||
if (it.value().chargeTypeId != ct.id())
|
||||
if (it->chargeTypeId != ct.id())
|
||||
continue;
|
||||
|
||||
QJsonObject ctProps = propertiesToJson(ct.properties());
|
||||
QJsonObject itProps = propertiesToJson(igniterType(it.value().igniterFunctionId).properties());
|
||||
QJsonObject ifProps = propertiesToJson(igniterFunction(it.value().igniterFunctionId).properties());
|
||||
QJsonObject ctitifProps = propertiesToJson(chargeTypeIgniterTypeIgniterFunction(it.key()).properties());
|
||||
QJsonObject itProps = propertiesToJson(igniterType(it->igniterTypeId).properties);
|
||||
QJsonObject ifProps = propertiesToJson(igniterFunction(it->igniterFunctionId).properties);
|
||||
QJsonObject ctitifProps = propertiesToJson(chargeTypeIgniterTypeIgniterFunction(it.key()).properties);
|
||||
|
||||
// Combine JsonObjects to Map -> one big JsonObject
|
||||
mergeProperties(it, ifProps, ctProps, ctitifProps, itProps);
|
||||
@@ -230,58 +231,59 @@ void DtcImplCustom::onChargeTypeChanged(const ChargeType &ct)
|
||||
|
||||
void DtcImplCustom::onChargeTypeIgniterTypeIgniterFunctionChanged(const ChargeTypeIgniterTypeIgniterFunction &ctitif)
|
||||
{
|
||||
if (ctitif.id() <= 0)
|
||||
if (ctitif.id <= 0)
|
||||
return;
|
||||
|
||||
for (auto it = m_ctItIfProps.begin(); it != m_ctItIfProps.end(); ++it)
|
||||
{
|
||||
if (it.key() != ctitif.id())
|
||||
if (it.key() != ctitif.id)
|
||||
continue;
|
||||
|
||||
it.value().chargeTypeId = ctitif.chargeTypeId();
|
||||
it.value().igniterTypeId = ctitif.igniterTypeId();
|
||||
it.value().igniterFunctionId = ctitif.igniterFunctionId();
|
||||
it.value().igniterFunctionBase = ctitif.igniterFunctionBaseId();
|
||||
it.value().impactRadius = ctitif.impactRadius();
|
||||
it.value().hazardDistance = ctitif.hazardDistance();
|
||||
it.value().chargeLegacyId = ctitif.chargeLegacyId();
|
||||
it->chargeTypeId = ctitif.chargeTypeId;
|
||||
it->igniterTypeId = ctitif.igniterTypeId;
|
||||
it->igniterFunctionId = ctitif.igniterFunctionId;
|
||||
it->igniterFunctionBase = ctitif.igniterFunctionBase;
|
||||
it->impactRadius = ctitif.impactRadius;
|
||||
it->hazardDistance = ctitif.hazardDistance;
|
||||
it->chargeLegacyId = ctitif.chargeLegacyId;
|
||||
|
||||
QJsonObject ctProps = propertiesToJson(chargeType(it.value().chargeTypeId).properties());
|
||||
QJsonObject itProps = propertiesToJson(igniterType(it.value().igniterFunctionId).properties());
|
||||
QJsonObject ifProps = propertiesToJson(igniterFunction(it.value().igniterFunctionId).properties());
|
||||
QJsonObject ctitifProps = propertiesToJson(ctitif.properties());
|
||||
QJsonObject ctProps = propertiesToJson(chargeType(it->chargeTypeId).properties);
|
||||
QJsonObject itProps = propertiesToJson(igniterType(it->igniterFunctionId).properties);
|
||||
QJsonObject ifProps = propertiesToJson(igniterFunction(it->igniterFunctionId).properties);
|
||||
QJsonObject ctitifProps = propertiesToJson(ctitif.properties);
|
||||
|
||||
// Combine JsonObjects to Map -> one big JsonObject
|
||||
mergeProperties(it, ifProps, ctProps, ctitifProps, itProps);
|
||||
}
|
||||
}
|
||||
|
||||
QVector<ProjectDataManagement::ChargeType> DtcImplCustom::chargesForGearClass(GearClass gearClass)
|
||||
QVector<ProjectDataManagement::ChargeTypeData> DtcImplCustom::chargesForGearClass(GearClass gearClass)
|
||||
{
|
||||
QVector<ProjectDataManagement::ChargeType> ret;
|
||||
QVector<ProjectDataManagement::ChargeTypeData> ret;
|
||||
|
||||
if (!isGearTypeEnabled())
|
||||
{
|
||||
enableGearType();
|
||||
enableGearType(true);
|
||||
waitForHistoricalDataGearType(2000);
|
||||
}
|
||||
if (!isGearTypeChargeTypeEnabled())
|
||||
{
|
||||
enableGearTypeChargeType();
|
||||
enableGearTypeChargeType(true);
|
||||
waitForHistoricalDataGearTypeChargeType(2000);
|
||||
}
|
||||
|
||||
const auto gear2ChargeMap = gearTypeChargeTypes();
|
||||
const auto chargeMap = chargeTypes();
|
||||
for (const rti::sub::LoanedSample<ProjectDataManagement::GearType> &sample : m_dtcGearType->readAlive())
|
||||
const auto gearTypesList = gearTypes();
|
||||
for (const auto &gearType : gearTypesList)
|
||||
{
|
||||
if (sample.data().gearClassId() != gearClass)
|
||||
if (gearType.gearClassId() != gearClass.id())
|
||||
continue;
|
||||
const int gearTypeId = sample.data().id();
|
||||
const int gearTypeId = gearType.id();
|
||||
for (auto gIt = gear2ChargeMap.begin(); gIt != gear2ChargeMap.end(); ++gIt)
|
||||
{
|
||||
if (gIt.value().gearTypeId() == gearTypeId)
|
||||
ret += chargeMap.value(gIt.value().chargeTypeId());
|
||||
if (gIt->gearTypeId == gearTypeId)
|
||||
ret += chargeMap.value(gIt->chargeTypeId);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
@@ -293,13 +295,13 @@ QVector<ProjectDataManagement::IgniterType> DtcImplCustom::ignitersForChargeType
|
||||
|
||||
if (!isIgniterTypeEnabled())
|
||||
{
|
||||
enableIgniterType();
|
||||
enableIgniterType(true);
|
||||
waitForHistoricalDataIgniterType(2000);
|
||||
}
|
||||
|
||||
if (!isChargeTypeIgniterTypeIgniterFunctionEnabled())
|
||||
{
|
||||
enableChargeTypeIgniterTypeIgniterFunction();
|
||||
enableChargeTypeIgniterTypeIgniterFunction(true);
|
||||
waitForHistoricalDataChargeTypeIgniterTypeIgniterFunction(2000);
|
||||
}
|
||||
|
||||
@@ -308,9 +310,9 @@ QVector<ProjectDataManagement::IgniterType> DtcImplCustom::ignitersForChargeType
|
||||
|
||||
for (auto it = chargeType2IgniterMap.begin(); it != chargeType2IgniterMap.end(); ++it)
|
||||
{
|
||||
if (it.value().chargeTypeId() == chargeTypeId)
|
||||
if ((*it).chargeTypeId == chargeTypeId)
|
||||
{
|
||||
ProjectDataManagement::IgniterType igType = igniterTypeMap.value(it.value().igniterTypeId());
|
||||
ProjectDataManagement::IgniterType igType = igniterTypeMap.value((*it).igniterTypeId);
|
||||
if (!ret.contains(igType))
|
||||
ret += igType;
|
||||
}
|
||||
@@ -325,13 +327,13 @@ QVector<ProjectDataManagement::ChargeTypeIgniterTypeIgniterFunction> DtcImplCust
|
||||
|
||||
if (!isIgniterFunctionEnabled())
|
||||
{
|
||||
enableIgniterFunction();
|
||||
enableIgniterFunction(true);
|
||||
waitForHistoricalDataIgniterFunction(2000);
|
||||
}
|
||||
|
||||
if (!isChargeTypeIgniterTypeIgniterFunctionEnabled())
|
||||
{
|
||||
enableChargeTypeIgniterTypeIgniterFunction();
|
||||
enableChargeTypeIgniterTypeIgniterFunction(true);
|
||||
waitForHistoricalDataChargeTypeIgniterTypeIgniterFunction(2000);
|
||||
}
|
||||
|
||||
@@ -339,8 +341,8 @@ QVector<ProjectDataManagement::ChargeTypeIgniterTypeIgniterFunction> DtcImplCust
|
||||
|
||||
for (auto it = chargeType2IgniterMap.constBegin(); it != chargeType2IgniterMap.constEnd(); ++it)
|
||||
{
|
||||
if (it.value().chargeTypeId() == chargeTypeId && it.value().igniterTypeId() == igniterTypeId)
|
||||
ret += it.value();
|
||||
if ((*it).chargeTypeId == chargeTypeId && (*it).igniterTypeId == igniterTypeId)
|
||||
ret += (*it);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -352,13 +354,13 @@ QVector<ProjectDataManagement::LoadType> DtcImplCustom::loadsForChargeType(int c
|
||||
|
||||
if (!isLoadTypeEnabled())
|
||||
{
|
||||
enableLoadType();
|
||||
enableLoadType(true);
|
||||
waitForHistoricalDataLoadType(2000);
|
||||
}
|
||||
|
||||
if (!isChargeTypeLoadTypeEnabled())
|
||||
{
|
||||
enableChargeTypeLoadType();
|
||||
enableChargeTypeLoadType(true);
|
||||
waitForHistoricalDataChargeTypeLoadType(2000);
|
||||
}
|
||||
|
||||
@@ -367,9 +369,9 @@ QVector<ProjectDataManagement::LoadType> DtcImplCustom::loadsForChargeType(int c
|
||||
|
||||
for (auto it = chargeType2IgniterMap.begin(); it != chargeType2IgniterMap.end(); ++it)
|
||||
{
|
||||
if (it.value().chargeTypeId() == chargeTypeId)
|
||||
if ((*it).chargeTypeId == chargeTypeId)
|
||||
{
|
||||
ProjectDataManagement::LoadType igType = loadTypeMap.value(it.value().loadTypeId());
|
||||
ProjectDataManagement::LoadType igType = loadTypeMap.value((*it).loadTypeId);
|
||||
if (!ret.contains(igType))
|
||||
ret += igType;
|
||||
}
|
||||
@@ -385,7 +387,7 @@ int DtcImplCustom::getTargetTypeIdFromAdlerTargetType(const QString &typ)
|
||||
|
||||
if (!isTargetTypeEnabled())
|
||||
{
|
||||
enableTargetType();
|
||||
enableTargetType(true);
|
||||
waitForHistoricalDataTargetType(2000);
|
||||
}
|
||||
|
||||
@@ -393,10 +395,10 @@ int DtcImplCustom::getTargetTypeIdFromAdlerTargetType(const QString &typ)
|
||||
|
||||
for (const auto &targetType : targetTypeMap)
|
||||
{
|
||||
if (adlerTargetTypeName(targetType.id()) != typ)
|
||||
if (adlerTargetTypeName(targetType) != typ)
|
||||
continue;
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " - adlerTargetTypeName: " << typ << ", targetTypeId:" << targetType.id();
|
||||
return targetType.id();
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " - adlerTargetTypeName: " << typ << ", targetTypeId:" << targetType;
|
||||
return targetType;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -409,7 +411,7 @@ int DtcImplCustom::getTargetSubTypeIdFromAdlerTargetSubType(const QString &subTy
|
||||
|
||||
if (!isTargetSubTypeEnabled())
|
||||
{
|
||||
enableTargetSubType();
|
||||
enableTargetSubType(true);
|
||||
waitForHistoricalDataTargetSubType(2000);
|
||||
}
|
||||
|
||||
@@ -417,10 +419,10 @@ int DtcImplCustom::getTargetSubTypeIdFromAdlerTargetSubType(const QString &subTy
|
||||
|
||||
for (const auto &targetSubType : targetSubTypeMap)
|
||||
{
|
||||
if (adlerTargetSubTypeName(targetSubType.id()) != subTyp)
|
||||
if (adlerTargetSubTypeName(targetSubType.targetSubTypeId) != subTyp)
|
||||
continue;
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " - adlerTargetSubTypName: " << subTyp << ", targetSubTypeId:" << targetSubType.id();
|
||||
return targetSubType.id();
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " - adlerTargetSubTypName: " << subTyp << ", targetSubTypeId:" << targetSubType.targetSubTypeId;
|
||||
return targetSubType.targetSubTypeId;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -434,7 +436,7 @@ int DtcImplCustom::getChargeTypeIdFromAdlerCharges(const QString &geschosssorte)
|
||||
|
||||
if (!isChargeTypeEnabled())
|
||||
{
|
||||
enableChargeType();
|
||||
enableChargeType(true);
|
||||
waitForHistoricalDataChargeType(2000);
|
||||
}
|
||||
|
||||
@@ -442,10 +444,10 @@ int DtcImplCustom::getChargeTypeIdFromAdlerCharges(const QString &geschosssorte)
|
||||
|
||||
for (const auto &charge : chargeMap)
|
||||
{
|
||||
if (adlerChargeTypeName(charge.id()) != geschosssorte)
|
||||
if (adlerChargeTypeName(charge.chargeTypeId) != geschosssorte)
|
||||
continue;
|
||||
INFO_LOG(m_logger) << "---- geschosssorte: " << geschosssorte << ", chargeId:" << charge.id();
|
||||
return charge.id();
|
||||
INFO_LOG(m_logger) << "---- geschosssorte: " << geschosssorte << ", chargeTypeId:" << charge.chargeTypeId;
|
||||
return charge.chargeTypeId;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -457,7 +459,7 @@ int DtcImplCustom::getIgniterTypeIdFromAdlerIgniter(const QString &zuender)
|
||||
|
||||
if (!isIgniterTypeEnabled())
|
||||
{
|
||||
enableIgniterType();
|
||||
enableIgniterType(true);
|
||||
waitForHistoricalDataIgniterType(2000);
|
||||
}
|
||||
|
||||
@@ -465,11 +467,11 @@ int DtcImplCustom::getIgniterTypeIdFromAdlerIgniter(const QString &zuender)
|
||||
|
||||
for (const auto &ignType : ignTypeMap)
|
||||
{
|
||||
if (adlerIgniterTypeName(ignType.id()) != zuender)
|
||||
if (adlerIgniterTypeName(ignType.id) != zuender)
|
||||
continue;
|
||||
|
||||
INFO_LOG(m_logger) << "---- zuender: " << zuender << ", igniterTypeId:" << ignType.id();
|
||||
igniterTypeId = ignType.id();
|
||||
INFO_LOG(m_logger) << "---- zuender: " << zuender << ", igniterTypeId:" << ignType.id;
|
||||
igniterTypeId = ignType.id;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -482,7 +484,7 @@ int DtcImplCustom::getIgniterFunctionIdFromAdlerIgniterFunction(const QString &z
|
||||
|
||||
if (!isIgniterFunctionEnabled())
|
||||
{
|
||||
enableIgniterFunction();
|
||||
enableIgniterFunction(true);
|
||||
waitForHistoricalDataIgniterFunction(2000);
|
||||
}
|
||||
|
||||
@@ -490,11 +492,11 @@ int DtcImplCustom::getIgniterFunctionIdFromAdlerIgniterFunction(const QString &z
|
||||
|
||||
for (const auto &ignFunc : ignFunctionMap)
|
||||
{
|
||||
if (adlerIgniterFunctionName(ignFunc.id()) != zuenderFunktion)
|
||||
if (adlerIgniterFunctionName(ignFunc.id) != zuenderFunktion)
|
||||
continue;
|
||||
|
||||
INFO_LOG(m_logger) << "---- zuender: " << zuenderFunktion << ", igniterFunctionId:" << ignFunc.id();
|
||||
igniterFunctionId = ignFunc.id();
|
||||
INFO_LOG(m_logger) << "---- zuender: " << zuenderFunktion << ", igniterFunctionId:" << ignFunc.id;
|
||||
igniterFunctionId = ignFunc.id;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -507,17 +509,17 @@ int DtcImplCustom::getLoadTypeIdFromAdlerLoad(const QString &ladung)
|
||||
|
||||
if (!isLoadTypeEnabled())
|
||||
{
|
||||
enableLoadType();
|
||||
enableLoadType(true);
|
||||
waitForHistoricalDataLoadType(2000);
|
||||
}
|
||||
|
||||
for (const auto < : loadTypes())
|
||||
{
|
||||
if (adlerLoadTypeName(lt.id()) != ladung)
|
||||
if (adlerLoadTypeName(lt.id) != ladung)
|
||||
continue;
|
||||
|
||||
INFO_LOG(m_logger) << "---- zuender: " << ladung << ", loadTypeId:" << lt.id();
|
||||
loadTypeId = lt.id();
|
||||
INFO_LOG(m_logger) << "---- zuender: " << ladung << ", loadTypeId:" << lt.id;
|
||||
loadTypeId = lt.id;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -703,8 +705,8 @@ int DtcImplCustom::maxCharge(int gearTypeId, int chargeTypeId)
|
||||
const auto gear2ChargeMap = gearTypeChargeTypes();
|
||||
for (auto gIt = gear2ChargeMap.begin(); gIt != gear2ChargeMap.end(); ++gIt)
|
||||
{
|
||||
if (gIt.value().gearTypeId() == gearTypeId && gIt.value().chargeTypeId() == chargeTypeId)
|
||||
return gearTypeChargeTypeProps(gIt.value().id()).maxCharge;
|
||||
if (gIt->gearTypeId == gearTypeId && gIt->chargeTypeId == chargeTypeId)
|
||||
return gearTypeChargeTypeProps(gIt->id).maxCharge;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -714,8 +716,8 @@ int DtcImplCustom::factoryDefault(int gearTypeId, int chargeTypeId)
|
||||
const auto gear2ChargeMap = gearTypeChargeTypes();
|
||||
for (auto gIt = gear2ChargeMap.begin(); gIt != gear2ChargeMap.end(); ++gIt)
|
||||
{
|
||||
if (gIt.value().gearTypeId() == gearTypeId && gIt.value().chargeTypeId() == chargeTypeId)
|
||||
return gearTypeChargeTypeProps(gIt.value().id()).factoryDefault;
|
||||
if (gIt->gearTypeId == gearTypeId && gIt->chargeTypeId == chargeTypeId)
|
||||
return gearTypeChargeTypeProps(gIt->id).factoryDefault;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -727,11 +729,11 @@ QVector<TargetSubType> DtcImplCustom::targetSubTypesForTargetType(int targetType
|
||||
const auto &targetTypeTargetSubtypeMap = targetTypeTargetSubTypes();
|
||||
const auto &targetSubtypesMap = targetSubTypes();
|
||||
|
||||
for (const auto &targeTypeTargetSubtype : targetTypeTargetSubtypeMap)
|
||||
for (const auto &targetTypeTargetSubtype : targetTypeTargetSubtypeMap)
|
||||
{
|
||||
if (targeTypeTargetSubtype.targetTypeId() == targetTypeId)
|
||||
if (targetTypeTargetSubtype.targetTypeId == targetTypeId)
|
||||
{
|
||||
ProjectDataManagement::TargetSubType targetSubType = targetSubtypesMap.value(targeTypeTargetSubtype.targetSubTypeId());
|
||||
ProjectDataManagement::TargetSubType targetSubType = targetSubtypesMap.value(targetTypeTargetSubtype.targetSubTypeId);
|
||||
if (!ret.contains(targetSubType))
|
||||
ret += targetSubType;
|
||||
}
|
||||
@@ -753,8 +755,8 @@ QVector<int> DtcImplCustom::gearTypeIdFromChargeTypeId(int chargeTypeId)
|
||||
QVector<int> ret;
|
||||
for (const auto >ct : gearTypeChargeTypes())
|
||||
{
|
||||
if (gtct.chargeTypeId() == chargeTypeId)
|
||||
ret << gtct.gearTypeId();
|
||||
if (gtct.chargeTypeId == chargeTypeId)
|
||||
ret << gtct.gearTypeId;
|
||||
}
|
||||
|
||||
s_gearTypeChargeTypeCache[chargeTypeId] = ret;
|
||||
@@ -788,9 +790,9 @@ GearClass DtcImplCustom::gearClassFromChargeTypeId(int chargeTypeId)
|
||||
|
||||
for (const auto &gearType2ChargeType : gear2ChargeMap) // gear2ChargeMap is already const :-)
|
||||
{
|
||||
if (gearType2ChargeType.chargeTypeId() == chargeTypeId)
|
||||
if (gearType2ChargeType.chargeTypeId == chargeTypeId)
|
||||
{
|
||||
const auto &gearType = gearTypesMap.value(gearType2ChargeType.gearTypeId());
|
||||
const auto &gearType = gearTypesMap.value(gearType2ChargeType.gearTypeId);
|
||||
|
||||
// update cache:
|
||||
s_gearClassChargeTypeCache[requestedCTID] = gearType.gearClassId();
|
||||
@@ -819,7 +821,7 @@ QVector<SanitationProcedure> DtcImplCustom::getSanitationProcedures(qint64 proce
|
||||
|
||||
for (const auto &proc : procs)
|
||||
{
|
||||
if (procedures & proc.dataCode())
|
||||
if (procedures & proc.dataCode)
|
||||
ret.append(proc);
|
||||
}
|
||||
/*
|
||||
@@ -946,11 +948,11 @@ QStringList DtcImplCustom::sanitationProceduresList(qint64 procedures)
|
||||
if (!proc.isEmpty())
|
||||
{
|
||||
// No Procedure Taken so it's a connect/disconnect telegram missused.... later check for qualification for DISconnect
|
||||
if (proc.size() == 1 && proc.at(0).id() == 0)
|
||||
if (proc.size() == 1 && proc.at(0).id == 0)
|
||||
return ret << tr("DCU Connected");
|
||||
ret.reserve(proc.size());
|
||||
for (const auto &s : proc)
|
||||
ret << trSanitationProcedureName(s.name());
|
||||
ret << trSanitationProcedureName(s.name);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -967,9 +969,9 @@ int DtcImplCustom::chargeTypeIdFromLegacyId(GearClass gearClass, int legacyId)
|
||||
for (const auto &charge : chargeMap)
|
||||
{
|
||||
// igniterType/igniterFunction default 0
|
||||
auto chargeIgniterFunction = getChargeTypeIgniterTypeIgniterFunction(charge.id(), 0, 0);
|
||||
if (chargeIgniterFunction.chargeLegacyId() == legacyId)
|
||||
return charge.id();
|
||||
auto chargeIgniterFunction = getChargeTypeIgniterTypeIgniterFunction(charge.chargeTypeId, 0, 0);
|
||||
if (chargeIgniterFunction.chargeLegacyId == legacyId)
|
||||
return charge.chargeTypeId;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1001,7 +1003,7 @@ ChargeTypeIgniterTypeIgniterFunction DtcImplCustom::getChargeTypeIgniterTypeIgni
|
||||
|
||||
for (const ChargeTypeIgniterTypeIgniterFunction &ctigtf : chargeTIgnTFunctVec)
|
||||
{
|
||||
if (ctigtf.igniterFunctionId() == igniterFunctionId)
|
||||
if (ctigtf.igniterFunctionId == igniterFunctionId)
|
||||
return ctigtf;
|
||||
}
|
||||
|
||||
@@ -1018,7 +1020,7 @@ ChargeTypeLoadType DtcImplCustom::getChargeTypeLoadType(int chargeTypeId, int lo
|
||||
|
||||
for (const ChargeTypeLoadType &ctlt : chargeTypeLoadTypes())
|
||||
{
|
||||
if (ctlt.chargeTypeId() == chargeTypeId && ctlt.loadTypeId() == loadTypeId)
|
||||
if (ctlt.chargeTypeId == chargeTypeId && ctlt.loadTypeId == loadTypeId)
|
||||
return ctlt;
|
||||
}
|
||||
|
||||
@@ -1157,14 +1159,14 @@ QStringList DtcImplCustom::chargeNames(std::vector<int> &chargeIds)
|
||||
QString chargeName = translate(&DtcImpl::chargeType, &ProjectDataManagement::trChargeTypeName, it.key());
|
||||
|
||||
QStringList sl;
|
||||
auto uleisClassOffsets = it.value();
|
||||
auto uleisClassOffsets = (*it);
|
||||
sl.reserve(uleisClassOffsets.size());
|
||||
for (UleisClassOffset o : qAsConst(uleisClassOffsets))
|
||||
sl << offsetName(o);
|
||||
|
||||
if (sl.size() == 6)
|
||||
chargeName += tr(" (all)");
|
||||
else if (sl.size() == 1 && (it.value().contains(UleisClassOffset::DirectImpactGrandparent) || it.value().contains(UleisClassOffset::None)))
|
||||
else if (sl.size() == 1 && ((*it).contains(UleisClassOffset::DirectImpactGrandparent) || (*it).contains(UleisClassOffset::None)))
|
||||
{
|
||||
// Noop
|
||||
}
|
||||
@@ -1181,41 +1183,41 @@ QString DtcImplCustom::translate(const std::function<PdmBaseName(DtcImplCustom &
|
||||
qint32 id)
|
||||
{
|
||||
const auto item = getItem(*this, id);
|
||||
if (item.id() != id)
|
||||
if (item.id != id)
|
||||
return tr("[invalid:%1]").arg(id);
|
||||
return pdmTranslate(item.name());
|
||||
return pdmTranslate(item.name);
|
||||
}
|
||||
|
||||
QString DtcImplCustom::translateShortChargeType(const std::function<QString(const std::string &)> &pdmTranslate, qint32 id)
|
||||
{
|
||||
const auto item = chargeType(id);
|
||||
if (item.id() != id)
|
||||
if (item.id != id)
|
||||
return tr("[invalid:%1]").arg(id);
|
||||
return pdmTranslate(item.shortName());
|
||||
return pdmTranslate(item.shortName);
|
||||
}
|
||||
|
||||
QString DtcImplCustom::translateShortIgniterType(const std::function<QString(const std::string &)> &pdmTranslate, qint32 id)
|
||||
{
|
||||
const auto item = igniterType(id);
|
||||
if (item.id() != id)
|
||||
if (item.id != id)
|
||||
return tr("[invalid:%1]").arg(id);
|
||||
return pdmTranslate(item.shortName());
|
||||
return pdmTranslate(item.shortName);
|
||||
}
|
||||
|
||||
QString DtcImplCustom::translateShortIgniterFunction(const std::function<QString(const std::string &)> &pdmTranslate, qint32 id)
|
||||
{
|
||||
const auto item = igniterFunction(id);
|
||||
if (item.id() != id)
|
||||
if (item.id != id)
|
||||
return tr("[invalid:%1]").arg(id);
|
||||
return pdmTranslate(item.shortName());
|
||||
return pdmTranslate(item.shortName);
|
||||
}
|
||||
|
||||
QString DtcImplCustom::translateShortLoadType(const std::function<QString(const std::string &)> &pdmTranslate, qint32 id)
|
||||
{
|
||||
const auto item = loadType(id);
|
||||
if (item.id() != id)
|
||||
if (item.id != id)
|
||||
return tr("[invalid:%1]").arg(id);
|
||||
return pdmTranslate(item.shortName());
|
||||
return pdmTranslate(item.shortName);
|
||||
}
|
||||
|
||||
QString DtcImplCustom::trBiteComponentTextName(int biteComponentId)
|
||||
@@ -1295,18 +1297,29 @@ QString DtcImplCustom::trSanitationMaterialName(int sanitationMaterialId)
|
||||
return translate(&DtcImpl::sanitationMaterial, &ProjectDataManagement::trSanitationMaterialName, sanitationMaterialId);
|
||||
}
|
||||
|
||||
QJsonObject DtcImplCustom::propertiesToJson(const std::string &properties)
|
||||
QString DtcImplCustom::trSanitationProcedureName(int sanitationProcedureId)
|
||||
{
|
||||
QJsonParseError parserError;
|
||||
const QByteArray props(QByteArray::fromRawData(properties.c_str(), properties.size()));
|
||||
const QJsonDocument doc(QJsonDocument::fromJson(props, &parserError));
|
||||
if (parserError.error != QJsonParseError::NoError)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Cannot parse properties: no valid json:" << properties;
|
||||
return {};
|
||||
}
|
||||
return translate(&DtcImpl::sanitationProcedure, &ProjectDataManagement::trSanitationProcedureName, sanitationProcedureId);
|
||||
}
|
||||
|
||||
return doc.object();
|
||||
QString DtcImplCustom::trSanitationInjuryKindName(int sanitationInjuryKindId)
|
||||
{
|
||||
return translate(&DtcImpl::sanitationInjuryKind, &ProjectDataManagement::trSanitationInjuryKindName, sanitationInjuryKindId);
|
||||
}
|
||||
|
||||
QString DtcImplCustom::trSanitationInjuryPlace1Name(int sanitationInjuryPlace1Id)
|
||||
{
|
||||
return translate(&DtcImpl::sanitationInjuryPlace1, &ProjectDataManagement::trSanitationInjuryPlace1Name, sanitationInjuryPlace1Id);
|
||||
}
|
||||
|
||||
QString DtcImplCustom::trSanitationInjuryPlace2Name(int sanitationInjuryPlace2Id)
|
||||
{
|
||||
return translate(&DtcImpl::sanitationInjuryPlace2, &ProjectDataManagement::trSanitationInjuryPlace2Name, sanitationInjuryPlace2Id);
|
||||
}
|
||||
|
||||
QJsonObject DtcImplCustom::propertiesToJson(const QJsonObject &properties)
|
||||
{
|
||||
return properties;
|
||||
}
|
||||
|
||||
void DtcImplCustom::setProps(ChargeTypeIgniterTypeIgniterFunctionProps &props, QJsonObject obj)
|
||||
@@ -1370,7 +1383,7 @@ void DtcImplCustom::setProps(ChargeTypeIgniterTypeIgniterFunctionProps &props, Q
|
||||
ce.impactRadius(objFt.value(QStringLiteral("impactRadius")).toInt());
|
||||
props.casEffects.append(ce);
|
||||
}
|
||||
std::sort(props.casEffects.begin(), props.casEffects.end(), [](const CasEffect &a, const CasEffect &b) { return a.severityType() < b.severityType(); });
|
||||
std::sort(props.casEffects.begin(), props.casEffects.end(), [](const CasEffect &a, const CasEffect &b) { return a.severityType < b.severityType; });
|
||||
|
||||
// Caution: Negate as suppressVisibility is negation of isVisible!
|
||||
props.isVisible = !obj.value(QStringLiteral("suppressVisibility")).toBool(false);
|
||||
@@ -1384,7 +1397,7 @@ void DtcImplCustom::setProps(ChargeTypeIgniterTypeIgniterFunctionProps &props, Q
|
||||
// Malte: primary: most severe CasEffect
|
||||
const QVector<CasEffect> &casEffectsCopy = props.casEffects;
|
||||
if (!casEffectsCopy.empty())
|
||||
props.impactRadius = casEffectsCopy.first().impactRadius();
|
||||
props.impactRadius = casEffectsCopy.first().impactRadius;
|
||||
|
||||
props.impactEdgeLength = props.impactRadius * 2.0;
|
||||
// : impactRadius by most severe CasEffect)
|
||||
@@ -1400,22 +1413,22 @@ DtcImplCustom::ChargeTypeIgniterTypeIgniterFunctionProps DtcImplCustom::chargeTy
|
||||
|
||||
for (auto it = m_ctItIfProps.constBegin(); it != m_ctItIfProps.constEnd(); ++it)
|
||||
{
|
||||
if (it.value().chargeTypeId == chargeTypeId && it.value().igniterTypeId == igniterTypeId && it.value().igniterFunctionId == igniterFunctionId)
|
||||
return it.value();
|
||||
if ((*it).chargeTypeId == chargeTypeId && (*it).igniterTypeId == igniterTypeId && (*it).igniterFunctionId == igniterFunctionId)
|
||||
return (*it);
|
||||
}
|
||||
|
||||
// if no entry, find first entry for chargeTypeId & igniterTypeId
|
||||
for (auto it = m_ctItIfProps.constBegin(); it != m_ctItIfProps.constEnd(); ++it)
|
||||
{
|
||||
if (it.value().chargeTypeId == chargeTypeId && it.value().igniterTypeId == igniterTypeId)
|
||||
return it.value();
|
||||
if ((*it).chargeTypeId == chargeTypeId && (*it).igniterTypeId == igniterTypeId)
|
||||
return (*it);
|
||||
}
|
||||
|
||||
// if no entry, find first entry for chargeTypeId
|
||||
for (auto it = m_ctItIfProps.constBegin(); it != m_ctItIfProps.constEnd(); ++it)
|
||||
{
|
||||
if (it.value().chargeTypeId == chargeTypeId)
|
||||
return it.value();
|
||||
if ((*it).chargeTypeId == chargeTypeId)
|
||||
return (*it);
|
||||
}
|
||||
|
||||
return {};
|
||||
@@ -1427,8 +1440,8 @@ DtcImplCustom::ChargeTypeLoadTypeProps DtcImplCustom::chargeTypeLoadTypeProps(in
|
||||
|
||||
for (auto it = m_ctLtProps.constBegin(); it != m_ctLtProps.constEnd(); ++it)
|
||||
{
|
||||
if (it.value().chargeTypeId == chargeTypeId && it.value().loadTypeId == loadTypeId)
|
||||
return it.value();
|
||||
if ((*it).chargeTypeId == chargeTypeId && (*it).loadTypeId == loadTypeId)
|
||||
return (*it);
|
||||
}
|
||||
|
||||
return {};
|
||||
@@ -1436,14 +1449,14 @@ DtcImplCustom::ChargeTypeLoadTypeProps DtcImplCustom::chargeTypeLoadTypeProps(in
|
||||
|
||||
void DtcImplCustom::onGearTypeChanged(const GearType >)
|
||||
{
|
||||
if (gt.id() <= 0)
|
||||
if (gt.id <= 0)
|
||||
return;
|
||||
QJsonParseError parserError;
|
||||
const QByteArray props(QByteArray::fromRawData(gt.properties().c_str(), gt.properties().size()));
|
||||
const QByteArray props(QByteArray::fromRawData(gt.properties.c_str(), gt.properties.size()));
|
||||
const QJsonDocument doc(QJsonDocument::fromJson(props, &parserError));
|
||||
if (parserError.error != QJsonParseError::NoError)
|
||||
{
|
||||
m_gtProps.remove(gt.id());
|
||||
m_gtProps.remove(gt.id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1455,7 +1468,7 @@ void DtcImplCustom::onGearTypeChanged(const GearType >)
|
||||
gtp.maxCharges = obj.value(QStringLiteral("maxCharges")).toInt(12);
|
||||
gtp.adlerWeaponSystemId = obj.value(QStringLiteral("AdlerWeaponSystemId")).toInt();
|
||||
gtp.cadence = obj.value(QStringLiteral("cadence")).toInt(-1);
|
||||
m_gtProps.insert(gt.id(), gtp);
|
||||
m_gtProps.insert(gt.id, gtp);
|
||||
}
|
||||
|
||||
DtcImplCustom::GearTypeProps DtcImplCustom::gearTypeProps(int gearTypeId)
|
||||
@@ -1467,7 +1480,7 @@ DtcImplCustom::GearTypeProps DtcImplCustom::gearTypeProps(int gearTypeId)
|
||||
it = m_gtProps.constFind(gearTypeId);
|
||||
}
|
||||
if (it != m_gtProps.constEnd())
|
||||
return it.value();
|
||||
return (*it);
|
||||
return GearTypeProps();
|
||||
}
|
||||
|
||||
@@ -1502,7 +1515,7 @@ DtcImplCustom::GearTypeChargeTypeProps DtcImplCustom::gearTypeChargeTypeProps(in
|
||||
it = m_gtctProps.constFind(gearTypeChargeTypeId);
|
||||
}
|
||||
if (it != m_gtctProps.constEnd())
|
||||
return it.value();
|
||||
return (*it);
|
||||
return GearTypeChargeTypeProps();
|
||||
}
|
||||
|
||||
@@ -1579,8 +1592,8 @@ double DtcImplCustom::getLethalRadius(int chargeTypeId, int igniterTypeId, int i
|
||||
const auto &vec = casEffects(chargeTypeId, igniterTypeId, igniterFunctionId);
|
||||
for (const ProjectDataManagement::CasEffect &casEffect : vec)
|
||||
{
|
||||
if (casEffect.severityType() == SeverityType_def::lethal)
|
||||
return casEffect.impactRadius();
|
||||
if (casEffect.severityType == SeverityType_def::lethal)
|
||||
return casEffect.impactRadius;
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
@@ -1590,8 +1603,8 @@ double DtcImplCustom::getNonLethalRadius(int chargeTypeId, int igniterTypeId, in
|
||||
const auto &vec = casEffects(chargeTypeId, igniterTypeId, igniterFunctionId);
|
||||
for (const ProjectDataManagement::CasEffect &casEffect : vec)
|
||||
{
|
||||
if (casEffect.severityType() == SeverityType_def::medium)
|
||||
return casEffect.impactRadius();
|
||||
if (casEffect.severityType == SeverityType_def::medium)
|
||||
return casEffect.impactRadius;
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
@@ -1601,8 +1614,8 @@ double DtcImplCustom::getMaxRange(int chargeTypeId, int gearTypeId)
|
||||
const auto gear2ChargeMap = gearTypeChargeTypes();
|
||||
for (auto gIt = gear2ChargeMap.begin(); gIt != gear2ChargeMap.end(); ++gIt)
|
||||
{
|
||||
if (gIt.value().gearTypeId() == gearTypeId && gIt.value().chargeTypeId() == chargeTypeId)
|
||||
return gIt.value().maxRange();
|
||||
if (gIt->gearTypeId == gearTypeId && gIt->chargeTypeId == chargeTypeId)
|
||||
return gIt->maxRange;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1617,7 +1630,7 @@ ProjectDataManagement::BuildingChargeEffect DtcImplCustom::getBuildingChargeEffe
|
||||
|
||||
for (const ProjectDataManagement::BuildingChargeEffect &bcEffect : qAsConst(m_buildingChargeEffectCont))
|
||||
{
|
||||
if (bcEffect.chargeTypeId() == chargeTypeId)
|
||||
if (bcEffect.chargeTypeId == chargeTypeId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "getBuildingChargeEffectByChargeTypeId: chargeTypeId '" << chargeTypeId << "' found"
|
||||
<< ", bcEffect=" << bcEffect;
|
||||
@@ -1636,8 +1649,8 @@ QString DtcImplCustom::adlerChargeTypeName(int chargeTypeId)
|
||||
// if no entry, find first entry for chargeTypeId
|
||||
for (auto it = m_ctItIfProps.constBegin(); it != m_ctItIfProps.constEnd(); ++it)
|
||||
{
|
||||
if (it.value().chargeTypeId == chargeTypeId)
|
||||
return it.value().adlerChargeTypeName;
|
||||
if ((*it).chargeTypeId == chargeTypeId)
|
||||
return (*it).adlerChargeTypeName;
|
||||
}
|
||||
|
||||
return {};
|
||||
@@ -1647,8 +1660,8 @@ QString DtcImplCustom::adlerIgniterTypeName(int igniterTypeId)
|
||||
{
|
||||
for (auto it = m_ctItIfProps.constBegin(); it != m_ctItIfProps.constEnd(); ++it)
|
||||
{
|
||||
if (it.value().igniterTypeId == igniterTypeId)
|
||||
return it.value().adlerIgniterTypeName;
|
||||
if ((*it).igniterTypeId == igniterTypeId)
|
||||
return (*it).adlerIgniterTypeName;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
@@ -1657,8 +1670,8 @@ QString DtcImplCustom::adlerIgniterFunctionName(int igniterFunctionId)
|
||||
{
|
||||
for (auto it = m_ctItIfProps.constBegin(); it != m_ctItIfProps.constEnd(); ++it)
|
||||
{
|
||||
if (it.value().igniterFunctionId == igniterFunctionId)
|
||||
return it.value().adlerIgniterFunctionName;
|
||||
if ((*it).igniterFunctionId == igniterFunctionId)
|
||||
return (*it).adlerIgniterFunctionName;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
@@ -1667,8 +1680,8 @@ QString DtcImplCustom::adlerLoadTypeName(int loadTypeId)
|
||||
{
|
||||
for (auto it = m_ctLtProps.constBegin(); it != m_ctLtProps.constEnd(); ++it)
|
||||
{
|
||||
if (it.value().loadTypeId == loadTypeId)
|
||||
return it.value().adlerLoadTypeName;
|
||||
if ((*it).loadTypeId == loadTypeId)
|
||||
return (*it).adlerLoadTypeName;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
@@ -1677,9 +1690,9 @@ QString DtcImplCustom::adlerTargetTypeName(int targetTypeId)
|
||||
{
|
||||
for (const ProjectDataManagement::TargetType &targetTyp : qAsConst(m_targetTypeCont))
|
||||
{
|
||||
const QJsonObject obj = QJsonDocument::fromJson(QByteArray::fromRawData(targetTyp.properties().c_str(),
|
||||
targetTyp.properties().size())).object();
|
||||
if (targetTyp.id() == targetTypeId)
|
||||
const QJsonObject obj = QJsonDocument::fromJson(QByteArray::fromRawData(targetTyp.properties.c_str(),
|
||||
targetTyp.properties.size())).object();
|
||||
if (targetTyp.id == targetTypeId)
|
||||
return obj[QStringLiteral("AdlerL20String")].toString();
|
||||
}
|
||||
return {};
|
||||
@@ -1689,9 +1702,9 @@ QString DtcImplCustom::adlerTargetSubTypeName(int targetSubTypeId)
|
||||
{
|
||||
for (const ProjectDataManagement::TargetSubType &targetSubTyp : qAsConst(m_targetSubTypeCont))
|
||||
{
|
||||
const QJsonObject obj = QJsonDocument::fromJson(QByteArray::fromRawData(targetSubTyp.properties().c_str(),
|
||||
targetSubTyp.properties().size())).object();
|
||||
if (targetSubTyp.id() == targetSubTypeId)
|
||||
const QJsonObject obj = QJsonDocument::fromJson(QByteArray::fromRawData(targetSubTyp.properties.c_str(),
|
||||
targetSubTyp.properties.size())).object();
|
||||
if (targetSubTyp.id == targetSubTypeId)
|
||||
return obj[QStringLiteral("AdlerL21String")].toString();
|
||||
}
|
||||
return {};
|
||||
@@ -1700,14 +1713,14 @@ QString DtcImplCustom::adlerTargetSubTypeName(int targetSubTypeId)
|
||||
int DtcImplCustom::getAmountFireMarkers(int firePurposeId)
|
||||
{
|
||||
const ProjectDataManagement::FirePurpose &fp = firePurpose(firePurposeId);
|
||||
QJsonObject obj = propertiesToJson(fp.properties());
|
||||
QJsonObject obj = propertiesToJson(fp.properties);
|
||||
return obj.value(QStringLiteral("FireMarkers")).toInt();
|
||||
}
|
||||
|
||||
bool DtcImplCustom::getWithDurationFirePurpose(int firePurposeId)
|
||||
{
|
||||
const ProjectDataManagement::FirePurpose &fp = firePurpose(firePurposeId);
|
||||
QJsonObject obj = propertiesToJson(fp.properties());
|
||||
QJsonObject obj = propertiesToJson(fp.properties);
|
||||
return obj.value(QStringLiteral("withDuration")).toBool();
|
||||
}
|
||||
|
||||
|
||||
+19
-2
@@ -12,6 +12,7 @@
|
||||
#include <QJsonObject>
|
||||
#include <QtCore/QVector>
|
||||
#include <ProjectDataManagement/pdm_dtc_impl.h>
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
namespace ProjectDataManagement
|
||||
@@ -53,7 +54,7 @@ class DtcImplCustom final : public Interface::DtcImpl
|
||||
|
||||
// custom procs, body must be implemented by user
|
||||
// Might need a "baseChargesForGearClass" later on...
|
||||
QVector<ProjectDataManagement::ChargeType> chargesForGearClass(GearClass gearClass) override;
|
||||
QVector<ProjectDataManagement::ChargeTypeData> chargesForGearClass(GearClass gearClass) override;
|
||||
QVector<ProjectDataManagement::IgniterType> ignitersForChargeType(int chargeTypeId) override;
|
||||
QVector<ProjectDataManagement::ChargeTypeIgniterTypeIgniterFunction> igniterFunctionsForChargeTypeIgniterType(int chargeTypeId, int igniterTypeId) override;
|
||||
QVector<ProjectDataManagement::LoadType> loadsForChargeType(int chargeTypeId) override;
|
||||
@@ -152,6 +153,10 @@ class DtcImplCustom final : public Interface::DtcImpl
|
||||
QString trRadioGroupName(int radioGroupId) override;
|
||||
QString trVulnerabilityKindName(int vulnerabilityKindId, VulnerabilityClass vulnerabilityClassId) override;
|
||||
QString trSanitationMaterialName(int sanitationMaterialId) override;
|
||||
QString trSanitationProcedureName(int sanitationProcedureId) override;
|
||||
QString trSanitationInjuryKindName(int sanitationInjuryKindId) override;
|
||||
QString trSanitationInjuryPlace1Name(int sanitationInjuryPlace1Id) override;
|
||||
QString trSanitationInjuryPlace2Name(int sanitationInjuryPlace2Id) override;
|
||||
|
||||
QStringList chargeNames(std::vector<int> &chargeIds) override;
|
||||
int getAvailableChargeTypeId(int chargeTypeId /*, bool *bOk = nullptr*/) override;
|
||||
@@ -247,6 +252,7 @@ class DtcImplCustom final : public Interface::DtcImpl
|
||||
|
||||
ChargeTypeIgniterTypeIgniterFunctionProps chargeTypeIgniterTypeIgniterFunctionProps(int chargeTypeId, int igniterTypeId, int igniterFunctionId);
|
||||
DtcImplCustom::ChargeTypeLoadTypeProps chargeTypeLoadTypeProps(int chargeTypeId, int loadTypeId);
|
||||
ChargeTypeIgniterTypeIgniterFunction chargeTypeIgniterTypeIgniterFunction(int id) const;
|
||||
|
||||
QString suffix(int chargeTypeId, bool omitBaseSuffix = false);
|
||||
static QString offsetName(UleisClassOffset o);
|
||||
@@ -260,19 +266,30 @@ class DtcImplCustom final : public Interface::DtcImpl
|
||||
void setProps(ChargeTypeIgniterTypeIgniterFunctionProps &props, QJsonObject obj);
|
||||
void setProps(ChargeTypeLoadTypeProps &props, QJsonObject obj);
|
||||
|
||||
QJsonObject propertiesToJson(const std::string &properties);
|
||||
QJsonObject propertiesToJson(const QJsonObject &properties);
|
||||
void mergeProperties(QHash<int, ChargeTypeIgniterTypeIgniterFunctionProps>::iterator &it,
|
||||
const QJsonObject &ifProps,
|
||||
const QJsonObject &ctProps,
|
||||
const QJsonObject &ctitifProps,
|
||||
const QJsonObject &itProps);
|
||||
|
||||
// enable* methods
|
||||
void enableIgniterType(bool enable) override;
|
||||
void enableChargeTypeIgniterTypeIgniterFunction(bool enable) override;
|
||||
void enableIgniterFunction(bool enable) override;
|
||||
void enableLoadType(bool enable) override;
|
||||
void enableChargeTypeLoadType(bool enable) override;
|
||||
void enableTargetType(bool enable) override;
|
||||
|
||||
private:
|
||||
QHash<int, ChargeTypeIgniterTypeIgniterFunctionProps> m_ctItIfProps;
|
||||
QHash<int, ChargeTypeLoadTypeProps> m_ctLtProps;
|
||||
QHash<int, GearTypeProps> m_gtProps;
|
||||
QHash<int, GearTypeChargeTypeProps> m_gtctProps;
|
||||
QString indirectString(bool isIndirect) const;
|
||||
|
||||
// Logger member
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace Interface
|
||||
} // namespace ProjectDataManagement
|
||||
@@ -1039,6 +1039,18 @@
|
||||
<function name="trSanitationMaterialName" returns="QString">
|
||||
<parameter pos="1" name="sanitationMaterialId" type="int"/>
|
||||
</function>
|
||||
<function name="trSanitationProcedureName" returns="QString">
|
||||
<parameter pos="1" name="sanitationProcedureId" type="int"/>
|
||||
</function>
|
||||
<function name="trSanitationInjuryKindName" returns="QString">
|
||||
<parameter pos="1" name="sanitationInjuryKindId" type="int"/>
|
||||
</function>
|
||||
<function name="trSanitationInjuryPlace1Name" returns="QString">
|
||||
<parameter pos="1" name="sanitationInjuryPlace1Id" type="int"/>
|
||||
</function>
|
||||
<function name="trSanitationInjuryPlace2Name" returns="QString">
|
||||
<parameter pos="1" name="sanitationInjuryPlace2Id" type="int"/>
|
||||
</function>
|
||||
<function name="chargeNames" returns="QStringList">
|
||||
<parameter pos="1" name="chargeIds" type="std::vector<int> &"/>
|
||||
</function>
|
||||
|
||||
+130
-9
@@ -7,6 +7,8 @@
|
||||
#include "../pdm_enums_stub.hpp"
|
||||
#include "../pdm_stub.hpp"
|
||||
#include "../pdm_db_stub.hpp"
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
// Forward declarations and stub types for ProjectDataManagement namespace
|
||||
// Used when BUILD_RTI=OFF to allow compilation without RTI Connext DDS
|
||||
@@ -15,39 +17,158 @@ namespace ProjectDataManagement {
|
||||
|
||||
// Stub types for RTI IDL-generated classes
|
||||
struct RadioGroup {
|
||||
int id = 0;
|
||||
int m_id = 0;
|
||||
int id() const { return m_id; }
|
||||
void id(int val) { m_id = val; }
|
||||
};
|
||||
|
||||
struct ChargeType {
|
||||
int id = 0;
|
||||
int m_id = 0;
|
||||
QString m_properties;
|
||||
int id() const { return m_id; }
|
||||
void id(int val) { m_id = val; }
|
||||
QString properties() const { return m_properties; }
|
||||
void properties(const QString& val) { m_properties = val; }
|
||||
};
|
||||
|
||||
struct GearClass {
|
||||
int id = 0;
|
||||
int m_id = 0;
|
||||
QString m_properties;
|
||||
int id() const { return m_id; }
|
||||
void id(int val) { m_id = val; }
|
||||
QString properties() const { return m_properties; }
|
||||
void properties(const QString& val) { m_properties = val; }
|
||||
};
|
||||
|
||||
struct GearType {
|
||||
int id = 0;
|
||||
int m_id = 0;
|
||||
int m_gearClassId = 0;
|
||||
QString m_properties;
|
||||
int id() const { return m_id; }
|
||||
void id(int val) { m_id = val; }
|
||||
int gearClassId() const { return m_gearClassId; }
|
||||
void gearClassId(int val) { m_gearClassId = val; }
|
||||
QString properties() const { return m_properties; }
|
||||
void properties(const QString& val) { m_properties = val; }
|
||||
};
|
||||
|
||||
struct GearTypeChargeType {
|
||||
int id = 0;
|
||||
int m_id = 0;
|
||||
int m_gearTypeId = 0;
|
||||
int m_chargeTypeId = 0;
|
||||
QString m_properties;
|
||||
int id() const { return m_id; }
|
||||
void id(int val) { m_id = val; }
|
||||
int gearTypeId() const { return m_gearTypeId; }
|
||||
void gearTypeId(int val) { m_gearTypeId = val; }
|
||||
int chargeTypeId() const { return m_chargeTypeId; }
|
||||
void chargeTypeId(int val) { m_chargeTypeId = val; }
|
||||
QString properties() const { return m_properties; }
|
||||
void properties(const QString& val) { m_properties = val; }
|
||||
};
|
||||
|
||||
struct BuildingChargeEffect {
|
||||
int id = 0;
|
||||
int m_id = 0;
|
||||
QString m_properties;
|
||||
int id() const { return m_id; }
|
||||
void id(int val) { m_id = val; }
|
||||
QString properties() const { return m_properties; }
|
||||
void properties(const QString& val) { m_properties = val; }
|
||||
};
|
||||
|
||||
struct VulnerabilityKind {
|
||||
int id = 0;
|
||||
int m_id = 0;
|
||||
QString m_properties;
|
||||
int id() const { return m_id; }
|
||||
void id(int val) { m_id = val; }
|
||||
QString properties() const { return m_properties; }
|
||||
void properties(const QString& val) { m_properties = val; }
|
||||
};
|
||||
|
||||
struct IgniterType {
|
||||
int m_id = 0;
|
||||
QString m_properties;
|
||||
int id() const { return m_id; }
|
||||
void id(int val) { m_id = val; }
|
||||
QString properties() const { return m_properties; }
|
||||
void properties(const QString& val) { m_properties = val; }
|
||||
};
|
||||
|
||||
struct LoadType {
|
||||
int m_id = 0;
|
||||
QString m_properties;
|
||||
int id() const { return m_id; }
|
||||
void id(int val) { m_id = val; }
|
||||
QString properties() const { return m_properties; }
|
||||
void properties(const QString& val) { m_properties = val; }
|
||||
};
|
||||
|
||||
struct CanComponentString {
|
||||
int id = 0;
|
||||
int m_id = 0;
|
||||
QString m_text;
|
||||
int id() const { return m_id; }
|
||||
void id(int val) { m_id = val; }
|
||||
QString text() const { return m_text; }
|
||||
void text(const QString& val) { m_text = val; }
|
||||
};
|
||||
|
||||
struct BiteComponentText {
|
||||
int id = 0;
|
||||
int m_id = 0;
|
||||
QString m_text;
|
||||
int id() const { return m_id; }
|
||||
void id(int val) { m_id = val; }
|
||||
QString text() const { return m_text; }
|
||||
void text(const QString& val) { m_text = val; }
|
||||
};
|
||||
|
||||
struct SanitationProcedure {
|
||||
int m_id = 0;
|
||||
QString m_name;
|
||||
QString m_longName;
|
||||
QString m_type;
|
||||
int m_typeId = 0;
|
||||
int m_minimumQualification = 0;
|
||||
int m_dataCode = 0;
|
||||
QString m_version;
|
||||
|
||||
int id() const { return m_id; }
|
||||
void id(int val) { m_id = val; }
|
||||
QString name() const { return m_name; }
|
||||
void name(const QString& val) { m_name = val; }
|
||||
QString longName() const { return m_longName; }
|
||||
void longName(const QString& val) { m_longName = val; }
|
||||
QString type() const { return m_type; }
|
||||
void type(const QString& val) { m_type = val; }
|
||||
int typeId() const { return m_typeId; }
|
||||
void typeId(int val) { m_typeId = val; }
|
||||
int minimumQualification() const { return m_minimumQualification; }
|
||||
void minimumQualification(int val) { m_minimumQualification = val; }
|
||||
int dataCode() const { return m_dataCode; }
|
||||
void dataCode(int val) { m_dataCode = val; }
|
||||
QString version() const { return m_version; }
|
||||
void version(const QString& val) { m_version = val; }
|
||||
};
|
||||
|
||||
struct SanitationInjury {
|
||||
int m_id = 0;
|
||||
QString m_name;
|
||||
int m_kind = 0;
|
||||
int m_place1 = 0;
|
||||
int m_place2 = 0;
|
||||
int m_vbg = 0;
|
||||
|
||||
int id() const { return m_id; }
|
||||
void id(int val) { m_id = val; }
|
||||
QString name() const { return m_name; }
|
||||
void name(const QString& val) { m_name = val; }
|
||||
int kind() const { return m_kind; }
|
||||
void kind(int val) { m_kind = val; }
|
||||
int place1() const { return m_place1; }
|
||||
void place1(int val) { m_place1 = val; }
|
||||
int place2() const { return m_place2; }
|
||||
void place2(int val) { m_place2 = val; }
|
||||
int vbg() const { return m_vbg; }
|
||||
void vbg(int val) { m_vbg = val; }
|
||||
};
|
||||
|
||||
// Forward declaration for Interface::Dtc
|
||||
|
||||
+4
@@ -16,6 +16,10 @@ enum class ProjectType : int {
|
||||
Unknown = 0
|
||||
};
|
||||
|
||||
enum class GearClass : int {
|
||||
Unknown = 0
|
||||
};
|
||||
|
||||
} // namespace enums
|
||||
} // namespace pdm
|
||||
|
||||
|
||||
Reference in new issue
Block a user