Adds latest migration results
This commit is contained in:
829 files changed
+35074
-70886
No files matched your search
@@ -4,6 +4,14 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
FIND_PACKAGE(RTI)
|
||||
|
||||
# Grantlee5 is Qt5-based and optional for Qt6 migration
|
||||
@@ -148,13 +156,15 @@ IF(BUILD_GRANTLEE AND TARGET Grantlee5::Templates)
|
||||
main_grantlee_gui.cpp
|
||||
main_grantlee_gui.ui
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(codegen_gui
|
||||
codegen_grantlee
|
||||
LtsCommandLineParser
|
||||
nglapplication
|
||||
Qt6::Widgets
|
||||
Grantlee5::Templates
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(codegen_gui
|
||||
codegen_grantlee
|
||||
LtsCommandLineParser
|
||||
nglapplication
|
||||
${Qt6_Widgets}
|
||||
Grantlee5::Templates
|
||||
)
|
||||
endif()
|
||||
ELSE()
|
||||
message(STATUS "BUILD_GRANTLEE disabled or Grantlee not found; skipping codegen_grantlee, ngl_codegen, and codegen_gui targets")
|
||||
ENDIF()
|
||||
@@ -1339,16 +1339,16 @@ StructBuilder::ServiceTypeStruct StructBuilder::extractServiceAndTypeFromTypenam
|
||||
if (!extServiceRef.isEmpty())
|
||||
{
|
||||
if (extServiceRef.contains(QLatin1Char('<')))
|
||||
ret.service = QString(extServiceRef).split(QLatin1Char('<')).at(1);
|
||||
ret.service = extServiceRef.toString().split(QLatin1Char('<')).at(1);
|
||||
else
|
||||
ret.service = QString(extServiceRef);
|
||||
ret.service = extServiceRef.toString();
|
||||
}
|
||||
if (!extTypeRef.isEmpty())
|
||||
{
|
||||
if (extTypeRef.contains(QLatin1Char('>')))
|
||||
ret.type = QString(extTypeRef).split(QLatin1Char('>')).at(0);
|
||||
ret.type = extTypeRef.toString().split(QLatin1Char('>')).at(0);
|
||||
else
|
||||
ret.type = QString(extTypeRef);
|
||||
ret.type = extTypeRef.toString();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
|
||||
|
||||
# LtsAppDescriptor (lib)
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(LtsAppDescriptor_SRCS
|
||||
lts_app_descriptor.cpp
|
||||
lts_app_descriptor.h
|
||||
@@ -64,12 +72,14 @@ NGL_TARGET_LINK_LIBRARIES(LtsAppDescriptorChecker
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
#)
|
||||
|
||||
#NGL_TARGET_LINK_LIBRARIES(LtsAppDescriptorEditor
|
||||
# PUBLIC
|
||||
# Qt6::Core
|
||||
# Qt6::Widgets
|
||||
# LtsAppDescriptor
|
||||
#)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
#NGL_TARGET_LINK_LIBRARIES(LtsAppDescriptorEditor
|
||||
# PUBLIC
|
||||
# Qt6::Core
|
||||
# ${Qt6_Widgets}
|
||||
# LtsAppDescriptor
|
||||
#)
|
||||
endif()
|
||||
|
||||
#NGL_INSTALL_TARGET(LtsAppDescriptorEditor) #not visible for end-user
|
||||
|
||||
|
||||
@@ -1,4 +1,19 @@
|
||||
#
|
||||
# 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()
|
||||
|
||||
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
@@ -28,27 +43,29 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsAppManager
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/AppChooser/
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsAppManager
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
LtsDataView
|
||||
LtsWidgets
|
||||
LtsLogin
|
||||
LtsPluginManager
|
||||
LtsSession
|
||||
LtsSessionData
|
||||
LtsUtilsSettings
|
||||
LtsMultiMonitor
|
||||
ProjectConfig
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
Qt6::Network # debug server
|
||||
OpmSettingsGuiPluginInterface
|
||||
LtsPluginLoader
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
LtsAppDescriptor
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsAppManager
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
LtsDataView
|
||||
LtsWidgets
|
||||
LtsLogin
|
||||
LtsPluginManager
|
||||
LtsSession
|
||||
LtsSessionData
|
||||
LtsUtilsSettings
|
||||
LtsMultiMonitor
|
||||
ProjectConfig
|
||||
${Qt6_Gui}
|
||||
${Qt6_Widgets}
|
||||
Qt6::Network # debug server
|
||||
OpmSettingsGuiPluginInterface
|
||||
LtsPluginLoader
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
LtsAppDescriptor
|
||||
)
|
||||
endif()
|
||||
|
||||
NGL_INSTALL_TARGET(LtsAppManager)
|
||||
ENDIF(BUILD_RTI)
|
||||
@@ -5,6 +5,14 @@
|
||||
# Created by Christian Ehrlicher, SLSE, 2016-08-31
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
FIND_PACKAGE(GeographicLib)
|
||||
NGL_ADD_LIBRARY2(LtsCoordTrans WS AAR SV HLA SHARED
|
||||
lts_coord_trans.h
|
||||
@@ -38,13 +46,15 @@ NGL_WRAP_UI(ltsCoordWidget_SRCS
|
||||
lts_coord_widget_wgs84.ui
|
||||
)
|
||||
NGL_ADD_LIBRARY2(ltsCoordWidget WS AAR SV SHARED ${ltsCoordWidget_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(ltsCoordWidget
|
||||
PRIVATE
|
||||
LtsCoordTrans
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(ltsCoordWidget
|
||||
PRIVATE
|
||||
LtsCoordTrans
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
${Qt6_Widgets}
|
||||
)
|
||||
endif()
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(ltsCoordWidget
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
|
||||
+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(UnitTestSources
|
||||
lts_coordinate_unit_test.cpp
|
||||
lts_coordinate_unit_test.h
|
||||
@@ -22,7 +30,7 @@ TARGET_LINK_LIBRARIES(commonUnitTestCoordinate
|
||||
situationMapCommon
|
||||
situationMapElevationMap
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
${Qt6_Gui}
|
||||
Qt6::Test)
|
||||
|
||||
ADD_TEST(NAME commonUnitTestCoordinate COMMAND $<TARGET_FILE:commonUnitTestCoordinate>)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
NGL_ADD_LIBRARY2(WS SV HLA LtsElevation SHARED
|
||||
lts_elevation_manager.cpp
|
||||
lts_elevation_manager.h
|
||||
@@ -18,18 +26,20 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsElevation
|
||||
${CMAKE_SOURCE_DIR}/Lts/Viewer/SituationMap
|
||||
${CMAKE_SOURCE_DIR}/Lts/Viewer/SituationMap/Common
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsElevation
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
## LtsSessionDataDds
|
||||
## ExmDataPluginInterface # External dependency - missing
|
||||
## situationMapCommon # External dependency - missing
|
||||
## situationMapElevationMap # External dependency - missing
|
||||
PUBLIC
|
||||
LtsUtilsCoreHeaderOnly
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsElevation
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
## LtsSessionDataDds
|
||||
## ExmDataPluginInterface # External dependency - missing
|
||||
## situationMapCommon # External dependency - missing
|
||||
## situationMapElevationMap # External dependency - missing
|
||||
PUBLIC
|
||||
LtsUtilsCoreHeaderOnly
|
||||
Qt6::Core
|
||||
${Qt6_Gui}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(BUILD_RTI)
|
||||
target_link_libraries(LtsElevation PRIVATE AsmDataPluginInterface)
|
||||
|
||||
+9
-1
@@ -1,3 +1,11 @@
|
||||
# Make ${Qt6_Gui} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Gui)
|
||||
set(Qt6_Gui ${Qt6_Gui})
|
||||
else()
|
||||
set(Qt6_Gui "")
|
||||
endif()
|
||||
|
||||
|
||||
#
|
||||
# @RDE_HEADER@
|
||||
# $Id$
|
||||
@@ -18,7 +26,7 @@
|
||||
# situationMapCommon
|
||||
# situationMapElevationMap
|
||||
# Qt6::Core
|
||||
# Qt6::Gui
|
||||
# ${Qt6_Gui}
|
||||
# Qt6::Test)
|
||||
#
|
||||
# ADD_TEST(NAME commenUnitTestElevation COMMAND $<TARGET_FILE:commenUnitTestElevation>)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# Created by hjl, SLSE, 2016-05-31
|
||||
#
|
||||
|
||||
FIND_PACKAGE(OpenSSL REQUIRED)
|
||||
FIND_PACKAGE(OpenSSL)
|
||||
|
||||
SET(ltslicence_SRCS
|
||||
aes_crypt.cpp
|
||||
@@ -14,28 +14,32 @@ SET(ltslicence_SRCS
|
||||
lts_licence.h
|
||||
)
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS LtsLicence SHARED ${ltslicence_SRCS})
|
||||
if(OPENSSL_FOUND)
|
||||
NGL_ADD_LIBRARY2(AAR SV WS LtsLicence SHARED ${ltslicence_SRCS})
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(LtsLicence
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsLicence
|
||||
PRIVATE
|
||||
${OPENSSL_LIBRARIES}
|
||||
Qt6::Xml
|
||||
NGLLogger
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
IF (BUILD_TESTING AND TARGET LtsLicence)
|
||||
ADD_EXECUTABLE(aes_crypt_test aes_crypt_test.cpp aes_crypt_test.h)
|
||||
TARGET_LINK_LIBRARIES(aes_crypt_test
|
||||
LtsLicence
|
||||
NGLLogger
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(LtsLicence
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
ADD_TEST(NAME aes_crypt_test COMMAND $<TARGET_FILE:aes_crypt_test>)
|
||||
ENDIF()
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsLicence
|
||||
PRIVATE
|
||||
${OPENSSL_LIBRARIES}
|
||||
Qt6::Xml
|
||||
NGLLogger
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
IF (BUILD_TESTING AND TARGET LtsLicence)
|
||||
ADD_EXECUTABLE(aes_crypt_test aes_crypt_test.cpp aes_crypt_test.h)
|
||||
TARGET_LINK_LIBRARIES(aes_crypt_test
|
||||
LtsLicence
|
||||
NGLLogger
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
)
|
||||
ADD_TEST(NAME aes_crypt_test COMMAND $<TARGET_FILE:aes_crypt_test>)
|
||||
ENDIF()
|
||||
else()
|
||||
message(WARNING "LtsLicence skipped: OpenSSL not found")
|
||||
endif()
|
||||
@@ -8,6 +8,21 @@
|
||||
|
||||
|
||||
# LtsMultiMonitor
|
||||
# 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()
|
||||
|
||||
|
||||
SET(LtsMultiMonitor_SRCS
|
||||
lts_multi_monitor_export.h
|
||||
lts_multi_monitor.cpp
|
||||
@@ -36,16 +51,18 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsMultiMonitor
|
||||
${CMAKE_SOURCE_DIR}/Lts/Common/LtsUtils
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsMultiMonitor
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
PRIVATE
|
||||
Qt6::Gui
|
||||
LtsWidgets
|
||||
LtsSessionData
|
||||
LtsUtilsCore
|
||||
LtsUtilsGuiDds
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsMultiMonitor
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
${Qt6_Widgets}
|
||||
PRIVATE
|
||||
${Qt6_Gui}
|
||||
LtsWidgets
|
||||
LtsSessionData
|
||||
LtsUtilsCore
|
||||
LtsUtilsGuiDds
|
||||
)
|
||||
endif()
|
||||
|
||||
NGL_INSTALL_TARGET(LtsMultiMonitor)
|
||||
@@ -6,6 +6,14 @@
|
||||
#
|
||||
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(LtsNoti_SRCS
|
||||
lts_notification.h
|
||||
lts_notification.cpp
|
||||
@@ -21,8 +29,10 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsNotification
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsNotification
|
||||
Qt6::Widgets
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsNotification
|
||||
${Qt6_Widgets}
|
||||
)
|
||||
endif()
|
||||
|
||||
NGL_INSTALL_TARGET(LtsNotification)
|
||||
@@ -7,6 +7,14 @@
|
||||
|
||||
|
||||
# LtsPluginLoader
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
NGL_ADD_LIBRARY2(ALL LtsPluginLoader SHARED lts_plugin_loader.cpp lts_plugin_loader.h)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(LtsPluginLoader
|
||||
PUBLIC
|
||||
@@ -45,21 +53,23 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsPluginManager
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsPluginManager
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
LtsPluginLoader
|
||||
GuiPluginInterface
|
||||
DataPluginInterface
|
||||
LtsWidgets
|
||||
LtsSession
|
||||
LtsSessionData
|
||||
Qt6::Widgets
|
||||
PUBLIC
|
||||
ProjectConfig
|
||||
LtsAppDescriptor
|
||||
Qt6::Core
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsPluginManager
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
LtsPluginLoader
|
||||
GuiPluginInterface
|
||||
DataPluginInterface
|
||||
LtsWidgets
|
||||
LtsSession
|
||||
LtsSessionData
|
||||
${Qt6_Widgets}
|
||||
PUBLIC
|
||||
ProjectConfig
|
||||
LtsAppDescriptor
|
||||
Qt6::Core
|
||||
)
|
||||
endif()
|
||||
|
||||
NGL_INSTALL_TARGET(LtsPluginManager)
|
||||
ENDIF(BUILD_RTI)
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
# Created by Christian Ehrlicher, SLSE, 2017-12-05
|
||||
#
|
||||
|
||||
FIND_PACKAGE(KDReports)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
find_package(KDReports QUIET)
|
||||
endif()
|
||||
|
||||
SET(SRCS
|
||||
printing_base.cpp
|
||||
@@ -15,23 +17,25 @@ SET(SRCS
|
||||
printing.h
|
||||
)
|
||||
|
||||
if (KDReports_FOUND AND BUILD_CODIFICATION)
|
||||
if (KDReports_FOUND AND QT6_GUI_AVAILABLE AND BUILD_CODIFICATION)
|
||||
NGL_ADD_LIBRARY2(WS LtsPrinting SHARED ${SRCS})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(LtsPrinting
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsPrinting
|
||||
PRIVATE
|
||||
KDReports::KDReports
|
||||
LtsSessionData
|
||||
LtsSession
|
||||
nglsettings
|
||||
ngltools
|
||||
PUBLIC
|
||||
Qt6::PrintSupport
|
||||
Qt6::Core
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsPrinting
|
||||
PRIVATE
|
||||
KDReports::KDReports
|
||||
LtsSessionData
|
||||
LtsSession
|
||||
nglsettings
|
||||
ngltools
|
||||
PUBLIC
|
||||
Qt6::PrintSupport
|
||||
Qt6::Core
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(LtsPrinting)
|
||||
else()
|
||||
message(STATUS "KDReports not found or BUILD_RTI disabled; skipping LtsPrinting target")
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
# Created by Christian Roeskens, NLSE, 2018-03-02
|
||||
|
||||
|
||||
# Make ${Qt6_Gui} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Gui)
|
||||
set(Qt6_Gui ${Qt6_Gui})
|
||||
else()
|
||||
set(Qt6_Gui "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(LtsProjectionWorkstation_SRCS
|
||||
|
||||
lts_projection_workstation.h
|
||||
@@ -32,16 +40,18 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsProjectionWorkstation
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsProjectionWorkstation
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
PRIVATE
|
||||
Qt6::Gui
|
||||
NGLLogger
|
||||
nglsettings
|
||||
LtsWebSocketServer
|
||||
LtsSession
|
||||
LtsSessionData
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsProjectionWorkstation
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
PRIVATE
|
||||
${Qt6_Gui}
|
||||
NGLLogger
|
||||
nglsettings
|
||||
LtsWebSocketServer
|
||||
LtsSession
|
||||
LtsSessionData
|
||||
)
|
||||
endif()
|
||||
|
||||
NGL_INSTALL_TARGET(LtsProjectionWorkstation)
|
||||
@@ -12,6 +12,14 @@
|
||||
|
||||
|
||||
# Library
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(LtsScriptTimeline_SRCS
|
||||
tools.h
|
||||
tools.cpp
|
||||
@@ -65,10 +73,12 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsScriptTimeline
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsScriptTimeline
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
LtsWidgets
|
||||
LtsSessionData
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsScriptTimeline
|
||||
Qt6::Core
|
||||
${Qt6_Widgets}
|
||||
LtsWidgets
|
||||
LtsSessionData
|
||||
)
|
||||
endif()
|
||||
ENDIF(BUILD_RTI)
|
||||
@@ -27,5 +27,5 @@ NGL_TARGET_LINK_LIBRARIES(LtsSerialPortQuerry
|
||||
PRIVATE
|
||||
PUBLIC
|
||||
NGLLogger
|
||||
Qt6::SerialPort
|
||||
$<IF:$<TARGET_EXISTS:Qt6::SerialPort>,Qt6::SerialPort,>
|
||||
)
|
||||
@@ -6,6 +6,14 @@
|
||||
#
|
||||
|
||||
# RTI Connext DDS - uses IMPORTED targets from parent CMakeLists.txt
|
||||
# Make ${Qt6_Gui} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Gui)
|
||||
set(Qt6_Gui ${Qt6_Gui})
|
||||
else()
|
||||
set(Qt6_Gui "")
|
||||
endif()
|
||||
|
||||
|
||||
OPTION(BUILD_RTI "Build with RTI Connext DDS support" ON)
|
||||
|
||||
# Find RTI Connext DDS - manual configuration (no CMake config file available)
|
||||
@@ -88,7 +96,7 @@ SET(LtsSession_PRIVATE_LIBS
|
||||
LtsSessionData
|
||||
LtsUtilsGuiDds # ReqHelpr & for Debug Menu ! TODO: rm on release!
|
||||
LtsNotification
|
||||
Qt6::Svg
|
||||
$<IF:$<TARGET_EXISTS:Qt6::Svg>,Qt6::Svg,>
|
||||
)
|
||||
IF(SVCCORECLIENT_LIBRARY)
|
||||
LIST(APPEND LtsSession_PRIVATE_LIBS ${SVCCORECLIENT_LIBRARY})
|
||||
@@ -133,11 +141,13 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsSessionData
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsSessionData
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
Qt6::Gui # QPixmap as Storage for Profile Picture
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsSessionData
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
Qt6::Gui # QPixmap as Storage for Profile Picture
|
||||
)
|
||||
endif()
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsSessionData
|
||||
PUBLIC
|
||||
|
||||
@@ -8,6 +8,21 @@
|
||||
# Created by Mike Wille, SLTE, 2021-05-18
|
||||
#
|
||||
|
||||
# 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()
|
||||
|
||||
|
||||
SET(src
|
||||
timeline_model.h
|
||||
timeline_model.cpp
|
||||
@@ -51,25 +66,29 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsTimeline
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsTimeline
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
ngltools # DTG
|
||||
LtsWidgets # LtsMessageDialogNew for remove filter track
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsTimeline
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
ngltools # DTG
|
||||
LtsWidgets # LtsMessageDialogNew for remove filter track
|
||||
Qt6::Core
|
||||
${Qt6_Gui}
|
||||
${Qt6_Widgets}
|
||||
)
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(LtsTimeline)
|
||||
|
||||
|
||||
# LtsTimelineTest
|
||||
NGL_ADD_EXECUTABLE(WS LtsTimelineTest main.cpp)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsTimelineTest
|
||||
LtsTimeline
|
||||
nglapplication
|
||||
NGLLogger
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsTimelineTest
|
||||
LtsTimeline
|
||||
nglapplication
|
||||
NGLLogger
|
||||
Qt6::Core
|
||||
${Qt6_Gui}
|
||||
${Qt6_Widgets}
|
||||
)
|
||||
endif()
|
||||
@@ -8,6 +8,21 @@
|
||||
# Created by Mike Wille, SLSE, 2017-02-10
|
||||
#
|
||||
|
||||
# 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()
|
||||
|
||||
|
||||
SET(timeline_SRCS
|
||||
EventDelegate.cpp
|
||||
EventTools.cpp
|
||||
@@ -65,15 +80,17 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsTimelineClassic
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsTimelineClassic
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
ngltools # DTG
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
LtsSessionDataDds
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsTimelineClassic
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
ngltools # DTG
|
||||
Qt6::Core
|
||||
${Qt6_Gui}
|
||||
${Qt6_Widgets}
|
||||
LtsSessionDataDds
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
+14
-4
@@ -5,6 +5,14 @@
|
||||
# Created by Mike Wille, SLSE, 2016-05-12
|
||||
#
|
||||
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(srcs
|
||||
connect_dialog.h
|
||||
connect_dialog.cpp
|
||||
@@ -22,7 +30,9 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsUtilsGuiConnectDialog
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsUtilsGuiConnectDialog
|
||||
Qt6::Widgets
|
||||
LtsWidgets
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsUtilsGuiConnectDialog
|
||||
${Qt6_Widgets}
|
||||
LtsWidgets
|
||||
)
|
||||
endif()
|
||||
+25
-8
@@ -6,6 +6,21 @@
|
||||
# Created by Mike Wille, SLSE, 2016-09-19
|
||||
#
|
||||
|
||||
# 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()
|
||||
|
||||
|
||||
SET(SRCS
|
||||
dds_vector_to_pixmap.cpp
|
||||
dds_vector_to_pixmap.h
|
||||
@@ -20,14 +35,16 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsUtilsGuiDds
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsUtilsGuiDds
|
||||
PUBLIC
|
||||
LtsUtilsCoreHeaderOnly
|
||||
LtsWidgets
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
Qt6::Svg
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsUtilsGuiDds
|
||||
PUBLIC
|
||||
LtsUtilsCoreHeaderOnly
|
||||
LtsWidgets
|
||||
${Qt6_Gui}
|
||||
${Qt6_Widgets}
|
||||
Qt6::Svg
|
||||
)
|
||||
endif()
|
||||
IF(BUILD_RTI)
|
||||
TARGET_LINK_LIBRARIES(LtsUtilsGuiDds PUBLIC ddscore)
|
||||
ENDIF(BUILD_RTI)
|
||||
|
||||
@@ -8,6 +8,21 @@
|
||||
# Lts Widgets library
|
||||
#
|
||||
|
||||
# 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()
|
||||
|
||||
|
||||
SET(ltsvkeyboard_SRCS
|
||||
LtsKeyPushButton.h
|
||||
LtsKeyPushButton.cpp
|
||||
@@ -26,13 +41,15 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsVirtualKeyboard
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsVirtualKeyboard
|
||||
PRIVATE
|
||||
PUBLIC
|
||||
LtsWidgets
|
||||
LtsSession
|
||||
LtsAppManager
|
||||
Qt6::Widgets
|
||||
Qt6::Gui
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsVirtualKeyboard
|
||||
PRIVATE
|
||||
PUBLIC
|
||||
LtsWidgets
|
||||
LtsSession
|
||||
LtsAppManager
|
||||
${Qt6_Widgets}
|
||||
${Qt6_Gui}
|
||||
)
|
||||
endif()
|
||||
ENDIF(BUILD_RTI)
|
||||
@@ -7,6 +7,14 @@
|
||||
#
|
||||
# --- Library LtsWebSocketCommon --------------------------------------------------------------------------------
|
||||
#
|
||||
# Make ${Qt6_WebSockets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::WebSockets)
|
||||
set(Qt6_WebSockets ${Qt6_WebSockets})
|
||||
else()
|
||||
set(Qt6_WebSockets "")
|
||||
endif()
|
||||
|
||||
|
||||
SET(LtsWebSocketCommon_SRCS
|
||||
client_message_factory.cpp
|
||||
client_message_factory.h
|
||||
@@ -30,7 +38,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsWebSocketCommon
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsWebSocketCommon
|
||||
Qt6::Core
|
||||
Qt6::WebSockets
|
||||
${Qt6_WebSockets}
|
||||
NGLLogger
|
||||
)
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
#include "client_connection.h"
|
||||
|
||||
#include "logger.h"
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
#include <QtWebSockets/QWebSocket>
|
||||
#endif
|
||||
|
||||
namespace LtsWebSocket
|
||||
{
|
||||
@@ -20,6 +22,7 @@ ClientConnection::~ClientConnection()
|
||||
qDeleteAll(m_messageQueue);
|
||||
}
|
||||
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
bool ClientConnection::init()
|
||||
{
|
||||
if (m_socket == nullptr)
|
||||
@@ -81,5 +84,6 @@ void ClientConnection::onSocketDisconnect()
|
||||
exit(0);
|
||||
emit disconnected(this);
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace LtsWebSocket
|
||||
@@ -9,7 +9,25 @@
|
||||
#include <QtCore/QQueue>
|
||||
#include <QtCore/QThread>
|
||||
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
class QWebSocket;
|
||||
#else
|
||||
namespace LtsWebSocket { class QWebSocketStub; }
|
||||
using QWebSocket = LtsWebSocket::QWebSocketStub;
|
||||
namespace LtsWebSocket
|
||||
{
|
||||
class QWebSocketStub
|
||||
{
|
||||
public:
|
||||
QWebSocketStub(QObject* parent = nullptr) { Q_UNUSED(parent); }
|
||||
virtual ~QWebSocketStub() = default;
|
||||
void sendTextMessage(const QString& /*message*/) {}
|
||||
void close() {}
|
||||
bool isValid() const { return false; }
|
||||
QString errorString() const { return QString(); }
|
||||
};
|
||||
} // namespace LtsWebSocket
|
||||
#endif
|
||||
|
||||
namespace LtsWebSocket
|
||||
{
|
||||
@@ -22,6 +40,7 @@ class LTSWEBSOCKETSERVER_EXPORT ClientConnection : public QThread, public ReplyH
|
||||
|
||||
~ClientConnection();
|
||||
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
bool init();
|
||||
|
||||
void addReply(ReplyMessage* message) override;
|
||||
@@ -30,6 +49,11 @@ class LTSWEBSOCKETSERVER_EXPORT ClientConnection : public QThread, public ReplyH
|
||||
{
|
||||
return m_socket;
|
||||
}
|
||||
#else
|
||||
bool init() { return false; }
|
||||
void addReply(ReplyMessage* /*message*/) override {}
|
||||
QWebSocket* webSocket() { return nullptr; }
|
||||
#endif
|
||||
|
||||
signals:
|
||||
|
||||
@@ -38,13 +62,17 @@ class LTSWEBSOCKETSERVER_EXPORT ClientConnection : public QThread, public ReplyH
|
||||
void disconnected(ClientConnection* client);
|
||||
|
||||
private slots:
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
void onNewTextMessageFromSocket(const QString& message);
|
||||
void sendMessagesFromQueue();
|
||||
void onSocketDisconnect();
|
||||
#endif
|
||||
|
||||
private:
|
||||
NGL::INGLLogger& m_logger;
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
void sendMessages();
|
||||
#endif
|
||||
QWebSocket* m_socket;
|
||||
QQueue<ReplyMessage*> m_messageQueue;
|
||||
};
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
#include "client_connection.h"
|
||||
#include "logger.h"
|
||||
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
#include <QtWebSockets/QWebSocket>
|
||||
#include <utility>
|
||||
#endif
|
||||
|
||||
using namespace LtsWebSocket;
|
||||
|
||||
@@ -17,10 +19,13 @@ ConnectionHandler::ConnectionHandler(QObject* parent)
|
||||
|
||||
ConnectionHandler::~ConnectionHandler()
|
||||
{
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
for (auto connection : std::as_const(m_connections))
|
||||
connection->disconnect(this);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
bool ConnectionHandler::init(const QString& serviceName, unsigned short port)
|
||||
{
|
||||
if (m_server != nullptr)
|
||||
@@ -87,3 +92,4 @@ void ConnectionHandler::onNewConnection()
|
||||
<< socket->localPort();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -4,9 +4,17 @@
|
||||
#include "logger.h"
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QSet>
|
||||
#include <QtNetwork/QHostAddress>
|
||||
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
#include <QtWebSockets/QWebSocketServer>
|
||||
#include <QtWebSockets/qwebsocketprotocol.h>
|
||||
#else
|
||||
namespace LtsWebSocket { class QWebSocketServerStub; }
|
||||
using QWebSocketServer = LtsWebSocket::QWebSocketServerStub;
|
||||
namespace QWebSocketProtocol { enum class CloseCode { NormalClosure = 1000 }; }
|
||||
#endif
|
||||
|
||||
namespace LtsWebSocket
|
||||
{
|
||||
@@ -21,6 +29,7 @@ class ConnectionHandler : public QObject
|
||||
explicit ConnectionHandler(QObject* parent = nullptr);
|
||||
~ConnectionHandler();
|
||||
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
bool init(const QString& serviceName, unsigned short port);
|
||||
|
||||
void sendToAllClients(ReplyMessage* message);
|
||||
@@ -29,6 +38,11 @@ class ConnectionHandler : public QObject
|
||||
{
|
||||
return m_server->serverPort();
|
||||
}
|
||||
#else
|
||||
bool init(const QString& /*serviceName*/, unsigned short /*port*/) { return false; }
|
||||
void sendToAllClients(ReplyMessage* /*message*/) {}
|
||||
unsigned short webSocketPort() { return 0; }
|
||||
#endif
|
||||
|
||||
signals:
|
||||
|
||||
@@ -39,12 +53,18 @@ class ConnectionHandler : public QObject
|
||||
void clientConnected(ClientConnection* client);
|
||||
|
||||
private slots:
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
void onServerError(QWebSocketProtocol::CloseCode closeCode);
|
||||
void onNewConnection();
|
||||
#endif
|
||||
|
||||
private:
|
||||
NGL::INGLLogger& m_logger;
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
QWebSocketServer* m_server;
|
||||
#else
|
||||
void* m_server;
|
||||
#endif
|
||||
QSet<ClientConnection*> m_connections;
|
||||
};
|
||||
} // namespace LtsWebSocket
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "lts_web_socket_server.h"
|
||||
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
#include "client_connection.h"
|
||||
#include "connection_handler.h"
|
||||
|
||||
@@ -120,3 +121,17 @@ void LtsWebSocketServer::onQueueTimerTimeout()
|
||||
}
|
||||
|
||||
} // namespace LtsWebSocket
|
||||
#else
|
||||
|
||||
namespace LtsWebSocket
|
||||
{
|
||||
|
||||
LtsWebSocketServer::LtsWebSocketServer(AbstractClientMessageFactory* /*messageFactory*/, QObject* parent)
|
||||
: QObject(parent), m_queueTimer(new QTimer(this)), m_logger(getLogger("LtsWebSocket.Server"))
|
||||
{
|
||||
}
|
||||
|
||||
LtsWebSocketServer::~LtsWebSocketServer() = default;
|
||||
|
||||
} // namespace LtsWebSocket
|
||||
#endif
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
class QTimer;
|
||||
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
namespace LtsWebSocket
|
||||
{
|
||||
class ConnectionHandler;
|
||||
@@ -62,3 +63,35 @@ class LTSWEBSOCKETSERVER_EXPORT LtsWebSocketServer : public QObject
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
} // namespace LtsWebSocket
|
||||
#else
|
||||
#include <QtCore/QTimer>
|
||||
|
||||
namespace LtsWebSocket
|
||||
{
|
||||
class LTSWEBSOCKETSERVER_EXPORT LtsWebSocketServer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LtsWebSocketServer(AbstractClientMessageFactory* /*messageFactory*/, QObject* parent = nullptr);
|
||||
virtual ~LtsWebSocketServer();
|
||||
|
||||
bool init(const QString& /*serviceName*/, const unsigned short /*port*/ = 0) { return false; }
|
||||
bool init(const QString& /*serviceName*/, const QPair<quint16, quint16>& /*portRange*/) { return false; }
|
||||
void sendToAllClients(ReplyMessage* /*message*/) {}
|
||||
unsigned short webSocketPort() const { return 0; }
|
||||
void setMessageDelay(qint32 /*delay*/) {}
|
||||
|
||||
signals:
|
||||
void clientDisconnected(void* /*client*/);
|
||||
void clientConnected(void* /*client*/);
|
||||
|
||||
private slots:
|
||||
void onNewTextMessage(void* /*client*/, const QString& /*message*/) {}
|
||||
void onQueueTimerTimeout() {}
|
||||
|
||||
private:
|
||||
QTimer* m_queueTimer{nullptr};
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
} // namespace LtsWebSocket
|
||||
#endif
|
||||
@@ -8,6 +8,21 @@
|
||||
# Lts Widgets library
|
||||
#
|
||||
|
||||
# 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()
|
||||
|
||||
|
||||
SET(ltswidgets_SRCS
|
||||
#lts_abstract_table_model.h
|
||||
#lts_checkable_table_model.h
|
||||
@@ -154,22 +169,24 @@ NGL_ADD_LIBRARY(WS TOOLSWS TOOLSSV LtsWidgets SHARED ${ltswidgets_SRCS})
|
||||
|
||||
# Qt6 Dependencies immer setzen (auch wenn BUILD_RTI=OFF)
|
||||
# Die Library wird gebaut, aber nur bei BUILD_RTI=ON installiert/verwendet
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsWidgets
|
||||
PRIVATE
|
||||
Qt6::Network # for QHostInfo - for portability
|
||||
Qt6::Svg
|
||||
ngltools
|
||||
ngltranslator
|
||||
TabBarTabStyle
|
||||
LtsSessionData
|
||||
NGLLogger
|
||||
PUBLIC
|
||||
LtsUtilsCore
|
||||
LtsUtilsSettings
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
Qt6::Gui
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsWidgets
|
||||
PRIVATE
|
||||
Qt6::Network # for QHostInfo - for portability
|
||||
Qt6::Svg
|
||||
ngltools
|
||||
ngltranslator
|
||||
TabBarTabStyle
|
||||
LtsSessionData
|
||||
NGLLogger
|
||||
PUBLIC
|
||||
LtsUtilsCore
|
||||
LtsUtilsSettings
|
||||
Qt6::Core
|
||||
${Qt6_Widgets}
|
||||
${Qt6_Gui}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Include directories needed for all builds (not just BUILD_RTI)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(LtsWidgets
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
|
||||
|
||||
# Topic Editor Interface
|
||||
# Make ${Qt6_Widgets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
||||
set(Qt6_Widgets ${Qt6_Widgets})
|
||||
else()
|
||||
set(Qt6_Widgets "")
|
||||
endif()
|
||||
|
||||
|
||||
ADD_INTERFACE_LIBRARY(
|
||||
TopicEditorInterface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/topic_editor_interface.h
|
||||
@@ -40,11 +48,13 @@ NGL_TARGET_INCLUDE_DIRECTORIES(TopicEditorBase
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../ # auto-export file
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(TopicEditorBase
|
||||
LtsScriptTimeline
|
||||
Qt6::Widgets
|
||||
Qt6::Core
|
||||
LtsWidgets
|
||||
LtsUtilsCore
|
||||
)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(TopicEditorBase
|
||||
LtsScriptTimeline
|
||||
${Qt6_Widgets}
|
||||
Qt6::Core
|
||||
LtsWidgets
|
||||
LtsUtilsCore
|
||||
)
|
||||
endif()
|
||||
ENDIF(BUILD_RTI)
|
||||
@@ -1,6 +1,8 @@
|
||||
#include <QtNetwork/QTcpServer>
|
||||
#include <QtNetwork/QTcpSocket>
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
#include <QtWebSockets/QWebSocketServer>
|
||||
#endif
|
||||
#include <httq/AbstractServer.h>
|
||||
#include <httq/HttpRequest.h>
|
||||
#include <httq/Logger.h>
|
||||
@@ -43,6 +45,7 @@ void AbstractServer::slotNewConnection()
|
||||
connect(req, &HttpRequest::signalUpgrade, this, [this, req](QTcpSocket* sock) {
|
||||
mLogger->debug(QStringLiteral("signalUpgrade"));
|
||||
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
QWebSocketServer* wsSvr = webSocketServer();
|
||||
|
||||
if (wsSvr == nullptr)
|
||||
@@ -54,6 +57,12 @@ void AbstractServer::slotNewConnection()
|
||||
}
|
||||
|
||||
wsSvr->handleConnection(sock);
|
||||
#else
|
||||
mLogger->debug(QStringLiteral("websocket support not available"));
|
||||
sock->close();
|
||||
sock->deleteLater();
|
||||
return;
|
||||
#endif
|
||||
emit sock->readyRead();
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# Modified CMakeLists.txt from github.com/wille-io/httq
|
||||
|
||||
# Make ${Qt6_WebSockets} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::WebSockets)
|
||||
set(Qt6_WebSockets ${Qt6_WebSockets})
|
||||
else()
|
||||
set(Qt6_WebSockets "")
|
||||
endif()
|
||||
|
||||
|
||||
set(src
|
||||
include/http_parser.h
|
||||
include/http_parser.c # TODO: move out of include dir
|
||||
@@ -26,7 +34,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(httq
|
||||
NGL_TARGET_LINK_LIBRARIES(httq
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::WebSockets
|
||||
${Qt6_WebSockets}
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(httq)
|
||||
@@ -6,7 +6,9 @@
|
||||
#include <QtCore/QObject>
|
||||
|
||||
class QTcpServer;
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
class QWebSocketServer;
|
||||
#endif
|
||||
|
||||
namespace httq
|
||||
{
|
||||
@@ -22,10 +24,12 @@ class HTTQ_EXPORT AbstractServer : public QObject
|
||||
|
||||
virtual bool newHttpConnection(HttpRequest* request) = 0;
|
||||
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
virtual QWebSocketServer* webSocketServer() const
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual LoggerFactory* createLoggerFactory();
|
||||
LoggerFactory* getLoggerFactory();
|
||||
|
||||
Reference in new issue
Block a user