Qt6 Migration: BUILD_RTI Guards, Export-Header und Include-Pfade korrigiert
- BUILD_RTI Guards in LtsSession implementiert (6 Dateien) - LtsSessionDataDds Stub für BUILD_RTI=OFF erstellt - Export-Header Stubs erstellt (GuezNasat, AlarmManagement, MarkerManagement) - Include-Pfade korrigiert (resource_path.h, logger.h, Proxies) - QStringRef → QString migriert (Qt6 Kompatibilität) - Qt6::Gui Dependencies hinzugefügt (LtsElevation, AdvancedSymbology) - FilterManagement-Plugins temporär vom Build ausgeschlossen - MOC-Probleme gefixt (staticMetaObject, override final) - Build erfolgreich: 1940 Targets mit BUILD_RTI=OFF im Docker-Container Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
46 files changed
+2487
-110
No files matched your search
@@ -13,18 +13,23 @@ NGL_ADD_LIBRARY2(WS SV HLA LtsElevation SHARED
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(LtsElevation
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../Lts/Viewer/SituationMap
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsElevation
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
## LtsSessionDataDds
|
||||
AsmDataPluginInterface
|
||||
ExmDataPluginInterface
|
||||
situationMapCommon
|
||||
situationMapElevationMap
|
||||
PUBLIC
|
||||
LtsUtilsCoreHeaderOnly
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
)
|
||||
|
||||
if(BUILD_RTI)
|
||||
target_link_libraries(LtsElevation PRIVATE AsmDataPluginInterface)
|
||||
endif()
|
||||
|
||||
ADD_SUBDIRECTORY(UnitTest_Elevation)
|
||||
@@ -2,13 +2,15 @@
|
||||
|
||||
#include "lts_elevation_manager.h"
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
#include <Plugins/AssetManagement/asm_data_plugin_interface.h>
|
||||
#include <Plugins/ExerciseManagement/exm_data_plugin_interface.h>
|
||||
#endif
|
||||
#include <QDir>
|
||||
#include <QHash>
|
||||
#include <QSharedPointer>
|
||||
#include <QUrl>
|
||||
#include <Viewer/SituationMap/Common/resource_path.h>
|
||||
#include <Common/resource_path.h>
|
||||
#include <Viewer/SituationMap/ElevationMap/elevation_map_manager.h>
|
||||
#include <utility>
|
||||
|
||||
@@ -64,7 +66,9 @@ class LtsElevationManager::Private
|
||||
}
|
||||
|
||||
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_exmDtc;
|
||||
#ifdef BUILD_RTI
|
||||
std::shared_ptr<AssetManagement::Interface::Dtc> m_asmDtc;
|
||||
#endif
|
||||
|
||||
QStringList m_filePaths_rough_to_fine;
|
||||
SituationMap::ElevationMapManager* m_elevationManager{nullptr};
|
||||
@@ -87,7 +91,12 @@ LtsElevationManager::~LtsElevationManager()
|
||||
|
||||
LTS_ELEVATION_MANAGER_TYPE
|
||||
LtsElevationManager::createInstance(int exerciseId, const std::shared_ptr<ExerciseManagement::Interface::Dtc>& exmDtc,
|
||||
const std::shared_ptr<AssetManagement::Interface::Dtc>& asmDtc)
|
||||
#ifdef BUILD_RTI
|
||||
const std::shared_ptr<AssetManagement::Interface::Dtc>& asmDtc
|
||||
#else
|
||||
const std::shared_ptr<void>& asmDtc
|
||||
#endif
|
||||
)
|
||||
{
|
||||
LOGGER_T logger = getLogger("LtsElevationManager");
|
||||
TRACE_LOG(logger) << Q_FUNC_INFO << " START, exerciseId=" << exerciseId;
|
||||
@@ -105,12 +114,11 @@ LtsElevationManager::createInstance(int exerciseId, const std::shared_ptr<Exerci
|
||||
const auto exTaIt = s_exIdToTaIdStore.find(exerciseId);
|
||||
if (exTaIt != s_exIdToTaIdStore.end())
|
||||
{
|
||||
|
||||
trainingAreaId = *exTaIt;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
if (!exmDtc || !asmDtc)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " no dtcs for exerciseId=" << exerciseId << ", asmDtc=" << asmDtc
|
||||
@@ -127,17 +135,37 @@ LtsElevationManager::createInstance(int exerciseId, const std::shared_ptr<Exerci
|
||||
}
|
||||
|
||||
s_exIdToTaIdStore[exerciseId] = trainingAreaId;
|
||||
}
|
||||
|
||||
LTS_ELEVATION_MANAGER_TYPE temp = createInstanceForTrainingAreaId(trainingAreaId, asmDtc);
|
||||
if (!temp)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " Error on createInstanceForTrainingAreaId"
|
||||
<< ", exerciseId=" << exerciseId << ", trainingAreaId=" << trainingAreaId;
|
||||
return nullptr;
|
||||
}
|
||||
LTS_ELEVATION_MANAGER_TYPE temp = createInstanceForTrainingAreaId(trainingAreaId, asmDtc);
|
||||
#else
|
||||
Q_UNUSED(asmDtc)
|
||||
if (!exmDtc)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " no exmDtc for exerciseId=" << exerciseId;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
temp->initDDS(exmDtc, asmDtc);
|
||||
trainingAreaId = exerciseIdToTrainingAreaId(exerciseId, exmDtc);
|
||||
if (trainingAreaId <= 0)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " Error getting trainingAreaId"
|
||||
<< ", exerciseId=" << exerciseId << ", trainingAreaId=" << trainingAreaId;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
s_exIdToTaIdStore[exerciseId] = trainingAreaId;
|
||||
|
||||
LTS_ELEVATION_MANAGER_TYPE temp = createInstanceForTrainingAreaId(trainingAreaId);
|
||||
#endif
|
||||
if (!temp)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " Error on createInstanceForTrainingAreaId"
|
||||
<< ", exerciseId=" << exerciseId << ", trainingAreaId=" << trainingAreaId;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
temp->initDDS(exmDtc, asmDtc);
|
||||
}
|
||||
|
||||
TRACE_LOG(logger) << Q_FUNC_INFO << " END, exerciseId=" << exerciseId;
|
||||
return temp;
|
||||
@@ -148,6 +176,7 @@ LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::getInstance(int exerciseId)
|
||||
return LtsElevationManager::createInstance(exerciseId);
|
||||
}
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
LTS_ELEVATION_MANAGER_TYPE
|
||||
LtsElevationManager::createInstanceForTrainingAreaId(int trainingAreaId,
|
||||
const std::shared_ptr<AssetManagement::Interface::Dtc>& asmDtc)
|
||||
@@ -203,6 +232,7 @@ LtsElevationManager::createInstanceForTrainingAreaId(int trainingAreaId,
|
||||
TRACE_LOG(logger) << Q_FUNC_INFO << " END, trainingAreaId=" << trainingAreaId;
|
||||
return map[trainingAreaId];
|
||||
}
|
||||
#endif
|
||||
|
||||
LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::createInstanceUnitTest(int id,
|
||||
const QStringList& filePaths_rough_to_fine)
|
||||
@@ -244,6 +274,7 @@ void LtsElevationManager::cleanupAll()
|
||||
TRACE_LOG(logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsElevationManager::initDDS(const std::shared_ptr<ExerciseManagement::Interface::Dtc>& exmDtc,
|
||||
const std::shared_ptr<AssetManagement::Interface::Dtc>& asmDtc)
|
||||
{
|
||||
@@ -259,6 +290,20 @@ void LtsElevationManager::initDDS(const std::shared_ptr<ExerciseManagement::Inte
|
||||
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
#else
|
||||
void LtsElevationManager::initDDS(const std::shared_ptr<ExerciseManagement::Interface::Dtc>& exmDtc,
|
||||
const std::shared_ptr<void>& asmDtc)
|
||||
{
|
||||
Q_UNUSED(asmDtc);
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START (BUILD_RTI=OFF, no DDS init)";
|
||||
|
||||
d->m_exmDtc = exmDtc;
|
||||
if (d->m_exmDtc)
|
||||
d->m_exmDtc->waitForHistoricalDataExercise(1000);
|
||||
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
#endif
|
||||
|
||||
QStringList LtsElevationManager::getFilenamesForExercise(int exerciseId)
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@ class Dtc;
|
||||
}
|
||||
} // namespace ExerciseManagement
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
namespace AssetManagement
|
||||
{
|
||||
namespace Interface
|
||||
@@ -33,6 +34,7 @@ namespace Interface
|
||||
class Dtc;
|
||||
}
|
||||
} // namespace AssetManagement
|
||||
#endif
|
||||
|
||||
namespace LtsElevation
|
||||
{
|
||||
@@ -47,13 +49,20 @@ class LTSELEVATION_EXPORT LtsElevationManager : public QObject
|
||||
public:
|
||||
static LTS_ELEVATION_MANAGER_TYPE
|
||||
createInstance(int exerciseId, const std::shared_ptr<ExerciseManagement::Interface::Dtc>& exmDtc = {},
|
||||
const std::shared_ptr<AssetManagement::Interface::Dtc>& asmDtc = {});
|
||||
#ifdef BUILD_RTI
|
||||
const std::shared_ptr<AssetManagement::Interface::Dtc>& asmDtc = {}
|
||||
#else
|
||||
const std::shared_ptr<void>& asmDtc = {}
|
||||
#endif
|
||||
);
|
||||
|
||||
static LTS_ELEVATION_MANAGER_TYPE getInstance(int exerciseId);
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
static LTS_ELEVATION_MANAGER_TYPE
|
||||
createInstanceForTrainingAreaId(int trainingAreaId,
|
||||
const std::shared_ptr<AssetManagement::Interface::Dtc>& asmDtc = nullptr);
|
||||
#endif
|
||||
|
||||
static void cleanupAll();
|
||||
virtual ~LtsElevationManager();
|
||||
@@ -74,7 +83,12 @@ class LTSELEVATION_EXPORT LtsElevationManager : public QObject
|
||||
explicit LtsElevationManager();
|
||||
|
||||
void initDDS(const std::shared_ptr<ExerciseManagement::Interface::Dtc>& exmDtc,
|
||||
const std::shared_ptr<AssetManagement::Interface::Dtc>& asmDtc);
|
||||
#ifdef BUILD_RTI
|
||||
const std::shared_ptr<AssetManagement::Interface::Dtc>& asmDtc
|
||||
#else
|
||||
const std::shared_ptr<void>& asmDtc
|
||||
#endif
|
||||
);
|
||||
bool init(const QStringList& filePaths_rough_to_fine);
|
||||
static int exerciseIdToTrainingAreaId(int exerciseId,
|
||||
const std::shared_ptr<ExerciseManagement::Interface::Dtc>& exmDtc);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QRandomGenerator>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
@@ -15,7 +16,6 @@ struct AesCryptPrivate
|
||||
: passPhrase(QLatin1String("LTS " LTS_VERSION_MAJOR "." LTS_VERSION_MINOR)),
|
||||
logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("LtsLicenceLib.AesCrypt"))
|
||||
{
|
||||
qsrand(time(nullptr));
|
||||
#if OPENSSL_VERSION_NUMBER < 0x1010000fL
|
||||
ERR_load_crypto_strings();
|
||||
#endif
|
||||
@@ -134,7 +134,7 @@ QByteArray encryptData(const QByteArray& dataToEncrypt, const QString& pw, bool*
|
||||
|
||||
QByteArray baSalt(EVP_MAX_IV_LENGTH, 0);
|
||||
for (int i = 0; i < EVP_MAX_IV_LENGTH; ++i)
|
||||
baSalt[i] = qrand();
|
||||
baSalt[i] = static_cast<char>(QRandomGenerator::global()->bounded(256));
|
||||
const unsigned char* salt = reinterpret_cast<const unsigned char*>(baSalt.data());
|
||||
|
||||
EVP_CIPHER_CTX* ctx = EVP_CIPHER_CTX_new();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ltsprojectionworkstation_export.h"
|
||||
#include <Lts/Common/LtsProjectionWorkstation/ltsprojectionworkstation_export.h>
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
|
||||
|
||||
@@ -26,6 +26,22 @@ IF(BUILD_RTI)
|
||||
NGLLogger
|
||||
Qt6::Core
|
||||
)
|
||||
ELSE()
|
||||
# Stub version for BUILD_RTI=OFF
|
||||
SET(LtsSessionDataDds_SRCS
|
||||
lts_session_data_dds_stub.cpp
|
||||
lts_session_data_dds_stub.h
|
||||
)
|
||||
NGL_ADD_LIBRARY2(WS LtsSessionDataDds SHARED ${LtsSessionDataDds_SRCS})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(LtsSessionDataDds
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsSessionDataDds
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
||||
@@ -35,11 +51,13 @@ SET(ltssession_SRCS
|
||||
lts_session.h
|
||||
lts_session.cpp
|
||||
lts_session_lock_handler.h
|
||||
lts_session_manager.h
|
||||
lts_session_manager.cpp
|
||||
lts_session_lock_handler.cpp
|
||||
)
|
||||
|
||||
# lts_session_manager and lts_session_lock_handler.cpp only needed when BUILD_RTI=ON
|
||||
IF(BUILD_RTI)
|
||||
LIST(APPEND ltssession_SRCS lts_session_manager.h lts_session_manager.cpp lts_session_lock_handler.cpp)
|
||||
ENDIF()
|
||||
|
||||
NGL_ADD_LIBRARY2(WS LtsSession SHARED ${ltssession_SRCS})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(LtsSession
|
||||
PUBLIC
|
||||
@@ -48,16 +66,28 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsSession
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../LtsUtils/LtsUtilsGui
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsSession
|
||||
PRIVATE
|
||||
# Optional external dependencies
|
||||
FIND_LIBRARY(SVCCORECLIENT_LIBRARY NAMES svcCoreClient PATHS /usr/local/lib /usr/lib NO_DEFAULT_PATH)
|
||||
FIND_LIBRARY(OHPONLINEHELP_LIBRARY NAMES OhpOnlineHelpViewerGuiPluginInterface PATHS /usr/local/lib /usr/lib NO_DEFAULT_PATH)
|
||||
|
||||
SET(LtsSession_PRIVATE_LIBS
|
||||
Qt6::Network
|
||||
LtsMultiMonitor
|
||||
LtsSessionData
|
||||
LtsUtilsGuiDds # ReqHelpr & for Debug Menu ! TODO: rm on release!
|
||||
LtsNotification
|
||||
svcCoreClient # Core Ftc - for TLH
|
||||
OhpOnlineHelpViewerGuiPluginInterface
|
||||
Qt6::Svg
|
||||
)
|
||||
IF(SVCCORECLIENT_LIBRARY)
|
||||
LIST(APPEND LtsSession_PRIVATE_LIBS ${SVCCORECLIENT_LIBRARY})
|
||||
ENDIF()
|
||||
IF(OHPONLINEHELP_LIBRARY)
|
||||
LIST(APPEND LtsSession_PRIVATE_LIBS ${OHPONLINEHELP_LIBRARY})
|
||||
ENDIF()
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsSession
|
||||
PRIVATE
|
||||
${LtsSession_PRIVATE_LIBS}
|
||||
PUBLIC
|
||||
LtsWidgets
|
||||
Qt6::Core
|
||||
|
||||
@@ -10,8 +10,20 @@
|
||||
|
||||
#include "lts_session.h"
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
#include "lts_session_data_dds.h"
|
||||
#include "lts_session_lock_handler.h"
|
||||
#endif
|
||||
// Stub logging macros when BUILD_RTI=OFF
|
||||
#ifndef BUILD_RTI
|
||||
// Logging deaktivieren - qDebug() wird verwendet weil es operator<< für QString unterstützt
|
||||
#define DEBUG_LOG(logger) if (false) qDebug()
|
||||
#define WARNING_LOG(logger) if (false) qDebug()
|
||||
#define ERROR_LOG(logger) if (false) qDebug()
|
||||
#define INFO_LOG(logger) if (false) qDebug()
|
||||
#define TRACE_LOG(logger) if (false) qDebug()
|
||||
#define LOGFUNCTION ""
|
||||
#endif
|
||||
#include "lts_session_manager.h"
|
||||
|
||||
#include <LtsMultiMonitor/lts_multi_monitor.h>
|
||||
@@ -28,9 +40,10 @@
|
||||
#include <LtsWidgets/lts_tab_widget.h>
|
||||
#include <PluginInterfaces/data_plugin_interface.h>
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Plugins/OnlineHelp/ohp_online_help_viewer_gui_plugin_interface.h> // XXX: grrr..
|
||||
#ifdef BUILD_FILTERMANAGEMENT
|
||||
#include <Lts/Plugins/OnlineHelp/ohp_online_help_viewer_gui_plugin_interface.h> // XXX: grrr..
|
||||
#endif
|
||||
#include <QApplication>
|
||||
#include <QDesktopWidget>
|
||||
#include <QHostInfo>
|
||||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
@@ -50,12 +63,21 @@ namespace LtsSession
|
||||
bool LtsSession::s_valgrind = false;
|
||||
int LtsSession::s_nextSessionId = 0;
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
LtsSession::LtsSession(LtsSessionManager* sessionManager)
|
||||
: m_sessionManager(sessionManager), m_mainBackground(nullptr), m_hasBaseLayout(false), m_baseLayout(nullptr),
|
||||
m_markedForDeletion(false), m_payloads(false), m_initDone(false), m_menuVisible(true), m_firstActionsFetch(true),
|
||||
m_exerciseData(new LtsWidgets::ExerciseData), m_currentInitIfc(nullptr), m_slotPluginInitDoneMutex(false),
|
||||
m_pluginInitDone(false), m_hidden(false), m_loadedFromSavegame(false), m_foreverInvisible(false),
|
||||
m_exerciseData(new LtsWidgets::ExerciseData),
|
||||
m_currentInitIfc(nullptr), m_slotPluginInitDoneMutex(false), m_pluginInitDone(false),
|
||||
m_hidden(false), m_loadedFromSavegame(false), m_foreverInvisible(false),
|
||||
m_id(s_nextSessionId++)
|
||||
#else
|
||||
LtsSession::LtsSession()
|
||||
: m_mainBackground(nullptr), m_hasBaseLayout(false), m_baseLayout(nullptr),
|
||||
m_markedForDeletion(false), m_payloads(false), m_initDone(false), m_menuVisible(true), m_firstActionsFetch(true),
|
||||
m_exerciseData(nullptr), m_hidden(false), m_loadedFromSavegame(false), m_foreverInvisible(false),
|
||||
m_id(s_nextSessionId++)
|
||||
#endif
|
||||
{
|
||||
LtsWidgets::LtsGlobalWaitDialog::getInstance()->wait();
|
||||
|
||||
@@ -81,17 +103,23 @@ LtsSession::LtsSession(LtsSessionManager* sessionManager)
|
||||
// [Qatar MNQ-474] Crash open Script Editor application Hack
|
||||
if (strcmp(PROJECTBUILD, "qatarmout") == 0 || strcmp(PROJECTBUILD, "qatar") == 0)
|
||||
{
|
||||
#ifdef BUILD_RTI
|
||||
DEBUG_LOG(m_logger) << "qatarmout Timer = 4000";
|
||||
#endif
|
||||
m_scriptEditorTimer->setInterval(4000);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef BUILD_RTI
|
||||
DEBUG_LOG(m_logger) << "qatarmout Timer = 0";
|
||||
#endif
|
||||
m_scriptEditorTimer->setInterval(0);
|
||||
}
|
||||
|
||||
m_scriptEditorTimer->setSingleShot(true);
|
||||
#ifdef BUILD_RTI
|
||||
connect(m_scriptEditorTimer, &QTimer::timeout, this, &LtsSession::delayScriptEditorStart);
|
||||
#endif
|
||||
}
|
||||
|
||||
LtsSession::~LtsSession()
|
||||
@@ -99,63 +127,70 @@ LtsSession::~LtsSession()
|
||||
// qCritical() << "~LtsSession";
|
||||
|
||||
// delete m_mainBackground; parented on hiddenWidget!
|
||||
#ifdef BUILD_RTI
|
||||
delete m_baseLayout; // TODO: deleteLater? problem: clear interfaces!
|
||||
// qWarning() << this << "deleted" << m_baseLayout;
|
||||
#endif
|
||||
|
||||
// Don't: qDeleteAll(m_notiCtlList);
|
||||
|
||||
// make sure to unref the data plugins, as they carry this LtsSession, and the erase method would not delete the
|
||||
// Session (avoid circular dependencies)
|
||||
#ifdef BUILD_RTI
|
||||
clearGuiPluginInterfaces();
|
||||
clearDataPluginInterfaces();
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
delete m_exerciseData;
|
||||
#endif
|
||||
}
|
||||
|
||||
QString LtsSession::toString() const
|
||||
{
|
||||
std::ostringstream stream;
|
||||
stream << "LtsSession:"
|
||||
<< " this=" << this << ", domainId=" << this->domainId() << ", partitionId=" << this->partitionId()
|
||||
<< ", partitionType=" << this->partitionType() << ", exerciseId='" << this->exerciseId() << "'"
|
||||
<< ", workspaceId='" << this->workspaceId() << "'"
|
||||
<< ", appToString='" << this->appToString(this->app()) << "'"
|
||||
<< ", LtsSessionDataDds=" << LtsSessionDataDds::toString();
|
||||
return QString::fromStdString(stream.str());
|
||||
|
||||
// QString str;
|
||||
// str.append(QStringLiteral(" domainId='%1'").arg()));
|
||||
// str.append(QStringLiteral(", ='%1'").arg(this->partitionId()));
|
||||
// str.append(QStringLiteral(", partitionType='%1'").arg(this->partitionType()));
|
||||
// str.append(QStringLiteral(", exerciseId='%1'").arg(this->exerciseId()));
|
||||
// str.append(QStringLiteral(", workspaceId='%1'").arg(this->workspaceId()));
|
||||
// return str;
|
||||
QString str;
|
||||
str.append(QStringLiteral("LtsSession: this=%1").arg(QString::number(reinterpret_cast<quintptr>(this))));
|
||||
#ifdef BUILD_RTI
|
||||
str.append(QStringLiteral(", domainId=%1, partitionId=%2").arg(domainId()).arg(partitionId()));
|
||||
#endif
|
||||
str.append(QStringLiteral(", workspaceId='%1'").arg(workspaceId()));
|
||||
#ifdef BUILD_RTI
|
||||
str.append(QStringLiteral(", appToString='%1'").arg(appToString(app())));
|
||||
str.append(QStringLiteral(", partitionType=%1, exerciseId='%2'").arg(partitionType()).arg(exerciseId()));
|
||||
str.append(QStringLiteral(", LtsSessionDataDds=%1").arg(LtsSessionDataDds::toString()));
|
||||
#else
|
||||
str.append(QStringLiteral(", app=Login (stub)"));
|
||||
#endif
|
||||
return str;
|
||||
}
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
QWidget* LtsSession::baseLayoutWidget()
|
||||
{
|
||||
// qWarning() << "baseLayoutWidget" << m_baseLayout;
|
||||
// qWarning() << "baseLayoutWidget (widget)" << static_cast<QWidget *>(m_baseLayout);
|
||||
return static_cast<QWidget*>(m_baseLayout);
|
||||
}
|
||||
#else
|
||||
QWidget* LtsSession::baseLayoutWidget()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::aboutToCloseTab(LayoutArea area)
|
||||
{
|
||||
m_baseLayout->getTabFromLayoutArea(area)->aboutToClose();
|
||||
}
|
||||
|
||||
void LtsSession::setDependency(LtsSession* session)
|
||||
#else
|
||||
void LtsSession::aboutToCloseTab(LayoutArea /*area*/)
|
||||
{
|
||||
if (session == this)
|
||||
{
|
||||
Q_ASSERT(session != this);
|
||||
ERROR_LOG(m_logger) << "Tried to set session dependency on self";
|
||||
return;
|
||||
}
|
||||
|
||||
m_dependency = session;
|
||||
// no-op in non-RTI build
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::aboutToClose()
|
||||
{
|
||||
emit sessionAboutToBeDestroyed(this);
|
||||
@@ -168,11 +203,20 @@ void LtsSession::aboutToClose()
|
||||
aboutToCloseTab(LayoutArea::eSpecialTab);
|
||||
aboutToCloseTab(LayoutArea::eMainTab);
|
||||
}
|
||||
#else
|
||||
void LtsSession::aboutToClose()
|
||||
{
|
||||
emit sessionAboutToBeDestroyed(this);
|
||||
// no-op in non-RTI build
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
void LtsSession::slotStopWaitDialog()
|
||||
{
|
||||
#ifdef BUILD_RTI
|
||||
disconnect(this, &LtsSession::signalDoneInitializingSession, this, &LtsSession::slotStopWaitDialog);
|
||||
disconnect(this, &LtsSession::signalInitializationAborted, this, &LtsSession::slotStopWaitDialog);
|
||||
#endif
|
||||
|
||||
LtsWidgets::LtsGlobalWaitDialog::getInstance()->done();
|
||||
}
|
||||
@@ -284,13 +328,16 @@ QIcon LtsSession::appToIcon(LtsAppDescriptor::App app)
|
||||
return LtsUtils::iconFromSvg(appIconFilename(app));
|
||||
}
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
bool LtsSession::removeMenuAction(LtsWidgets::LtsDragIcon* icon)
|
||||
{
|
||||
if (!m_baseLayout)
|
||||
return false;
|
||||
return m_baseLayout->removeMenuAction(icon);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::setMenuVisible(bool visible)
|
||||
{
|
||||
m_menuVisible = visible;
|
||||
@@ -300,7 +347,14 @@ void LtsSession::setMenuVisible(bool visible)
|
||||
|
||||
m_baseLayout->getMenu()->setVisible(visible);
|
||||
}
|
||||
#else
|
||||
void LtsSession::setMenuVisible(bool /*visible*/)
|
||||
{
|
||||
// no-op in non-RTI build
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
LtsDragIcon* LtsSession::addAction(const LtsWidgets::PluginData& plData, bool isFirstRun)
|
||||
{
|
||||
if (!m_baseLayout)
|
||||
@@ -327,7 +381,21 @@ LtsNotification::LtsNotification* LtsSession::createNotification(const QString&
|
||||
|
||||
return n;
|
||||
}
|
||||
#else
|
||||
LtsDragIcon* LtsSession::addAction(const LtsWidgets::PluginData& /*plData*/, bool /*isFirstRun*/)
|
||||
{
|
||||
// no-op in non-RTI build
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
LtsNotification::LtsNotification* LtsSession::createNotification(const QString& /*identifier*/)
|
||||
{
|
||||
// no-op in non-RTI build
|
||||
return nullptr;
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
bool LtsSession::init(const DdsConnectionParams& connParams,
|
||||
const QVector<LtsPluginManager::AppPluginInstance>& dataPluginList,
|
||||
const QVector<LtsPluginManager::AppPluginInstance>& guiPluginList, bool hidden)
|
||||
@@ -348,7 +416,9 @@ bool LtsSession::init(const dds::domain::DomainParticipant& dp, const DdsConnect
|
||||
initializePlugins(dataPluginList, guiPluginList);
|
||||
return true;
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::initializePlugins(const QVector<LtsPluginManager::AppPluginInstance>& dataPluginList,
|
||||
const QVector<LtsPluginManager::AppPluginInstance>& guiPluginList)
|
||||
{
|
||||
@@ -410,7 +480,9 @@ void LtsSession::initializeDataPlugins(const QVector<LtsPluginManager::AppPlugin
|
||||
|
||||
addAvailablaeDataPluginInterfaces(newDataPluginInterfaces);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::initializeGuiPlugins(const QVector<LtsPluginManager::AppPluginInstance>& guiPluginList)
|
||||
{
|
||||
m_failedFetches.clear();
|
||||
@@ -526,7 +598,9 @@ void LtsSession::initializeGuiPlugins(const QVector<LtsPluginManager::AppPluginI
|
||||
QTimer::singleShot(100, this, &LtsSession::slotStartPluginInit);
|
||||
// executePayloads(); // does not execute when there are no payloads, but is needed to be called here !
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
LtsTabWidget* LtsSession::locateWidget(QWidget* widgetToLocate, LayoutArea area)
|
||||
{
|
||||
if (!m_baseLayout)
|
||||
@@ -539,7 +613,14 @@ LtsTabWidget* LtsSession::locateWidget(QWidget* widgetToLocate, LayoutArea area)
|
||||
|
||||
return nullptr; // not found!
|
||||
}
|
||||
#else
|
||||
LtsTabWidget* LtsSession::locateWidget(QWidget* /*widgetToLocate*/, LayoutArea /*area*/)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::enableBaseLayoutMenu(bool on)
|
||||
{
|
||||
if (m_baseLayout)
|
||||
@@ -560,6 +641,17 @@ void LtsSession::enableBaseLayoutArea(LtsWidgets::LayoutArea area, bool on)
|
||||
ltsWidget->setEnabled(on);
|
||||
}
|
||||
}
|
||||
#else
|
||||
void LtsSession::enableBaseLayoutMenu(bool /*on*/)
|
||||
{
|
||||
// no-op in non-RTI build
|
||||
}
|
||||
|
||||
void LtsSession::enableBaseLayoutArea(LtsWidgets::LayoutArea /*area*/, bool /*on*/)
|
||||
{
|
||||
// no-op in non-RTI build
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
int LtsSession::workstationIp()
|
||||
{
|
||||
@@ -610,30 +702,41 @@ QString LtsSession::workstationName()
|
||||
|
||||
const QString LtsSession::workspaceId() const
|
||||
{
|
||||
#ifdef BUILD_RTI
|
||||
if (isReplayPartition())
|
||||
return QStringLiteral("replay_%1").arg(QString::number(partitionId()));
|
||||
#endif
|
||||
return m_workspaceId; // sessionManager->workspaceId();
|
||||
}
|
||||
|
||||
void LtsSession::setWorkspaceId(const QString &newWorkspaceId /* <= MW: that's why I like "get" in getter names (needed to prepend "new" because of already existing method with the name "workspaceId") */)
|
||||
{
|
||||
#ifdef BUILD_RTI
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " change workspaceId: cur = '" << m_workspaceId << "' for app '"
|
||||
<< appToString(app()) << "'";
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " change workspaceId: new = '" << newWorkspaceId << "' for app '"
|
||||
<< appToString(app()) << "'";
|
||||
#else
|
||||
Q_UNUSED(newWorkspaceId)
|
||||
#endif
|
||||
m_workspaceId = newWorkspaceId; // m_sessionManager->setWorkspaceId(workspaceId);
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
if (m_baseLayout)
|
||||
m_baseLayout->setWorkspaceId(workspaceId() /* use getter instead of member var, as replay partition strings can only be retrieved with the getter */);
|
||||
#endif // BUILD_RTI
|
||||
|
||||
emit workspaceIdChanged(newWorkspaceId);
|
||||
}
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
ExcState LtsSession::exerciseState() const
|
||||
{
|
||||
return m_exerciseData ? m_exerciseData->exState : ExerciseState::eUnknown;
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::connectOnlineHelpButton(LtsWidgets::LtsDialog* widget)
|
||||
{
|
||||
// FIXME: HACK: also connect show online help here !!
|
||||
@@ -649,7 +752,6 @@ void LtsSession::slotStapleTopicLockHandler(LtsWidgets::LtsDialog* widget)
|
||||
}
|
||||
widget->setProperty("topicLockStapled", true);
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
connectOnlineHelpButton(widget);
|
||||
if (m_coreFtc == nullptr)
|
||||
{
|
||||
@@ -684,12 +786,22 @@ void LtsSession::slotStapleTopicLockHandler(LtsWidgets::LtsDialog* widget)
|
||||
// qWarning() << "added tlh to" << widget->windowTitle();
|
||||
|
||||
connectOnlineHelpButton(widget);
|
||||
}
|
||||
#else
|
||||
void LtsSession::connectOnlineHelpButton(LtsWidgets::LtsDialog* widget)
|
||||
{
|
||||
Q_UNUSED(widget)
|
||||
DEBUG_LOG(m_logger) << "BUILD_RTI=OFF, skipping TopicLockHandler setup";
|
||||
#endif
|
||||
// no-op in non-RTI build
|
||||
}
|
||||
|
||||
void LtsSession::slotStapleTopicLockHandler(LtsWidgets::LtsDialog* widget)
|
||||
{
|
||||
Q_UNUSED(widget)
|
||||
// no-op in non-RTI build
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
bool LtsSession::focusTab(const QString& menuGroup, const QString& identifier, LtsWidgets::LayoutArea area)
|
||||
{
|
||||
if (!m_baseLayout)
|
||||
@@ -700,7 +812,17 @@ bool LtsSession::focusTab(const QString& menuGroup, const QString& identifier, L
|
||||
|
||||
return m_baseLayout->focusTab(menuGroup, identifier, area);
|
||||
}
|
||||
#else
|
||||
bool LtsSession::focusTab(const QString& menuGroup, const QString& identifier, LtsWidgets::LayoutArea area)
|
||||
{
|
||||
Q_UNUSED(menuGroup)
|
||||
Q_UNUSED(identifier)
|
||||
Q_UNUSED(area)
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
LtsWidgets::LtsDialog* LtsSession::getWidget(const QString& menuGroup, const QString& identifier,
|
||||
LtsWidgets::LayoutArea area)
|
||||
{
|
||||
@@ -713,7 +835,18 @@ LtsWidgets::LtsDialog* LtsSession::getWidget(const QString& menuGroup, const QSt
|
||||
|
||||
return m_baseLayout->getWidget(menuGroup, identifier, area);
|
||||
}
|
||||
#else
|
||||
LtsWidgets::LtsDialog* LtsSession::getWidget(const QString& menuGroup, const QString& identifier,
|
||||
LtsWidgets::LayoutArea area)
|
||||
{
|
||||
Q_UNUSED(menuGroup)
|
||||
Q_UNUSED(identifier)
|
||||
Q_UNUSED(area)
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
bool LtsSession::widgetExists(const QString& menuGroup, const QString& identifier, LayoutArea area) const
|
||||
{
|
||||
if (!m_baseLayout)
|
||||
@@ -724,7 +857,14 @@ bool LtsSession::widgetExists(const QString& menuGroup, const QString& identifie
|
||||
QWidget* existingWidget = tab->getWidget(menuGroup, identifier);
|
||||
return existingWidget != nullptr;
|
||||
}
|
||||
#else
|
||||
bool LtsSession::widgetExists(const QString& /*menuGroup*/, const QString& /*identifier*/, LayoutArea /*area*/) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
bool LtsSession::addWidget(LtsDialog* widget, const QString& menuGroup, const QString& identifier, LayoutArea area,
|
||||
bool setClosable)
|
||||
{
|
||||
@@ -739,12 +879,25 @@ bool LtsSession::addWidget(LtsDialog* widget, const QString& menuGroup, const QS
|
||||
// slotStapleTopicLockHandler(widget); => already done in blw's addWidget (below!)
|
||||
// FIXMe: connect(widget, &LtsDialog::signalShowOnlineHelp,
|
||||
// this, &LtsSession::slotShowOnlineHelp,
|
||||
// Qt::UniqueConnection); done in slotStaple.. because using LtsDialog::addDialog does NOT reach this
|
||||
// Qt::UniqueConnection) done in slotStaple.. because using LtsDialog::addDialog does NOT reach this
|
||||
// code here !
|
||||
|
||||
return m_baseLayout->addWidget(widget, menuGroup, identifier, area, setClosable);
|
||||
}
|
||||
#else
|
||||
bool LtsSession::addWidget(LtsDialog* widget, const QString& menuGroup, const QString& identifier, LayoutArea area,
|
||||
bool setClosable)
|
||||
{
|
||||
Q_UNUSED(widget)
|
||||
Q_UNUSED(menuGroup)
|
||||
Q_UNUSED(identifier)
|
||||
Q_UNUSED(area)
|
||||
Q_UNUSED(setClosable)
|
||||
return false;
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::setExerciseData(const LtsWidgets::ExerciseData& exerciseData)
|
||||
{
|
||||
// avoid mutiple calls (and signal to emitted multiple times)
|
||||
@@ -759,11 +912,6 @@ void LtsSession::setExerciseData(const LtsWidgets::ExerciseData& exerciseData)
|
||||
emit signalExerciseDataChanged();
|
||||
}
|
||||
|
||||
const LtsWidgets::ExerciseData* LtsSession::exerciseData() const
|
||||
{
|
||||
return m_exerciseData;
|
||||
}
|
||||
|
||||
void LtsSession::setProfilePicture(const QPixmap& pixmap)
|
||||
{
|
||||
// partitionType(); ?!?
|
||||
@@ -771,7 +919,9 @@ void LtsSession::setProfilePicture(const QPixmap& pixmap)
|
||||
return;
|
||||
m_baseLayout->setProfilePicture(pixmap);
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::makeVisible()
|
||||
{
|
||||
Q_ASSERT(m_baseLayout == nullptr);
|
||||
@@ -783,7 +933,14 @@ void LtsSession::makeVisible()
|
||||
|
||||
createBaseLayout();
|
||||
}
|
||||
#else
|
||||
void LtsSession::makeVisible()
|
||||
{
|
||||
// BUILD_RTI=OFF: No base layout to create
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::refetchActions()
|
||||
{
|
||||
// get actions
|
||||
@@ -853,12 +1010,27 @@ void LtsSession::refetchActions()
|
||||
|
||||
m_firstActionsFetch = false;
|
||||
}
|
||||
#else
|
||||
void LtsSession::refetchActions()
|
||||
{
|
||||
// BUILD_RTI=OFF: No actions to fetch
|
||||
m_firstActionsFetch = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::slotSwap()
|
||||
{
|
||||
LtsMultiMonitor::LtsMultiMonitor::getInstance()->selectAndSwap(m_baseLayout);
|
||||
}
|
||||
#else
|
||||
void LtsSession::slotSwap()
|
||||
{
|
||||
// BUILD_RTI=OFF: No base layout to swap
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
int LtsSession::screenId() const
|
||||
{
|
||||
if (m_baseLayout == nullptr)
|
||||
@@ -872,7 +1044,14 @@ int LtsSession::screenId() const
|
||||
|
||||
return screen->screenId();
|
||||
}
|
||||
#else
|
||||
int LtsSession::screenId() const
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
int LtsSession::screenContainerId() const
|
||||
{
|
||||
if (m_baseLayout == nullptr)
|
||||
@@ -894,7 +1073,14 @@ int LtsSession::screenContainerId() const
|
||||
|
||||
return -3;
|
||||
}
|
||||
#else
|
||||
int LtsSession::screenContainerId() const
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
int LtsSession::screenTypeId() const
|
||||
{
|
||||
if (m_baseLayout == nullptr)
|
||||
@@ -908,12 +1094,26 @@ int LtsSession::screenTypeId() const
|
||||
|
||||
return screen->screenType();
|
||||
}
|
||||
#else
|
||||
int LtsSession::screenTypeId() const
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
LtsAppDescriptor::App LtsSession::app() const
|
||||
{
|
||||
return m_sessionManager ? m_sessionManager->appId() : LtsAppDescriptor::App::Login;
|
||||
}
|
||||
#else
|
||||
LtsAppDescriptor::App LtsSession::app() const
|
||||
{
|
||||
return LtsAppDescriptor::App::Login;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
bool LtsSession::event(QEvent* e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange)
|
||||
@@ -921,7 +1121,15 @@ bool LtsSession::event(QEvent* e)
|
||||
|
||||
return LtsSessionDataDds::event(e);
|
||||
}
|
||||
#else
|
||||
bool LtsSession::event(QEvent* e)
|
||||
{
|
||||
Q_UNUSED(e)
|
||||
return LtsSessionDataDds::event(e);
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::addDeveloperActions()
|
||||
{
|
||||
// DEVELOPER / DEBUG MENU
|
||||
@@ -992,7 +1200,9 @@ void LtsSession::addDeveloperActions()
|
||||
}
|
||||
// END DEVELOPER / DEBUG MENU
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
bool LtsSession::notifyUnsavedChanges()
|
||||
{
|
||||
if (m_baseLayout == nullptr)
|
||||
@@ -1000,7 +1210,14 @@ bool LtsSession::notifyUnsavedChanges()
|
||||
|
||||
return m_baseLayout->notifyUnsavedChanges();
|
||||
}
|
||||
#else
|
||||
bool LtsSession::notifyUnsavedChanges()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::createBaseLayout()
|
||||
{
|
||||
// qWarning() << "mep" <<
|
||||
@@ -1154,7 +1371,9 @@ void LtsSession::createBaseLayout()
|
||||
|
||||
emit hideAllOtherBLWs(this);
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::slotMonitorSelected()
|
||||
{
|
||||
auto mmm = LtsMultiMonitor::LtsMultiMonitor::getInstance();
|
||||
@@ -1182,7 +1401,9 @@ void LtsSession::slotMonitorSelected()
|
||||
emit signalScreenIdChanged(m_screenId, m_screenContainerId, screen->screenType());
|
||||
}
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::delayScriptEditorStart()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "LtsSession::delayScriptEditorStart ";
|
||||
@@ -1195,7 +1416,9 @@ void LtsSession::delayScriptEditorStart()
|
||||
// TRUE, it was not emitted before
|
||||
}
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
bool LtsSession::isChildOfSession(QWidget* child)
|
||||
{
|
||||
if (!child)
|
||||
@@ -1204,6 +1427,12 @@ bool LtsSession::isChildOfSession(QWidget* child)
|
||||
}
|
||||
return baseLayout()->isAncestorOf(child);
|
||||
}
|
||||
#else
|
||||
bool LtsSession::isChildOfSession(QWidget* /*child*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
void LtsSession::doneInitializingSession()
|
||||
{
|
||||
@@ -1219,6 +1448,7 @@ void LtsSession::doneInitializingSession()
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
if (!m_sessionManager->isHeadless()) // disallow base layout creation if app is headless
|
||||
{
|
||||
int sessionCount = m_sessionManager->sessionCount();
|
||||
@@ -1234,7 +1464,9 @@ void LtsSession::doneInitializingSession()
|
||||
// return;
|
||||
// }
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
// qWarning() << "emit signalDoneInitializingSession();";
|
||||
|
||||
if (!createTopicClient<Core::Interface::Ftc>(m_coreFtc))
|
||||
@@ -1258,10 +1490,15 @@ void LtsSession::doneInitializingSession()
|
||||
}
|
||||
|
||||
// qWarning() << "not headless !";
|
||||
#else
|
||||
// Non-RTI build: always emit signal after initialization
|
||||
emit _signalDoneInitializingSession();
|
||||
#endif // BUILD_RTI
|
||||
}
|
||||
|
||||
void LtsSession::slotShowOnlineHelp(const QString& fileName)
|
||||
{
|
||||
#ifdef BUILD_RTI
|
||||
if (m_ohvIfc == nullptr)
|
||||
{
|
||||
LtsWidgets::LtsMessageDialog::showMessage(baseLayout() /* can be 0ptr */, tr("Online Help not available."));
|
||||
@@ -1269,8 +1506,13 @@ void LtsSession::slotShowOnlineHelp(const QString& fileName)
|
||||
}
|
||||
|
||||
m_ohvIfc->showHelp(fileName);
|
||||
#else
|
||||
Q_UNUSED(fileName)
|
||||
// no-op in non-RTI build
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::slotShowOperatorSettings()
|
||||
{
|
||||
const QMap<LtsDragIcon*, PluginData>& mapButtons = m_baseLayout->mapButtons();
|
||||
@@ -1297,7 +1539,9 @@ void LtsSession::slotShowOperatorSettings()
|
||||
|
||||
WARNING_LOG(m_logger) << "action for showing operator settings not found !!";
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::slotStartPluginInit()
|
||||
{
|
||||
m_initializeThesePlugins = m_guiPluginInterfaces; // copy
|
||||
@@ -1377,7 +1621,9 @@ void LtsSession::slotPluginInitDone() // NEVER call this directly, queue a signa
|
||||
|
||||
m_slotPluginInitDoneMutex = false; // unlock
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::slotExecuteNextPayload()
|
||||
{
|
||||
LtsWidgets::LtsGlobalWaitDialog::getInstance()->wait(); // show wait dialog again
|
||||
@@ -1481,7 +1727,9 @@ void LtsSession::slotExecuteNextPayload()
|
||||
|
||||
// m_ignoreSignalInLoop = false; // executing payload is done, clear the ignore-flag
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::executePayloads()
|
||||
{
|
||||
// look for gui plugins (needed to get execution priority and run payloads)
|
||||
@@ -1511,7 +1759,9 @@ void LtsSession::executePayloads()
|
||||
doneInitializingSession();
|
||||
}
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::clearDataPluginInterfaces()
|
||||
{
|
||||
QMap<QString, std::weak_ptr<DataPluginBase::Interface>> weakDataPluginInterfaces;
|
||||
@@ -1540,7 +1790,9 @@ void LtsSession::clearDataPluginInterfaces()
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void LtsSession::clearGuiPluginInterfaces()
|
||||
{
|
||||
bool bInClearPluginInterfaces = true;
|
||||
@@ -1581,10 +1833,13 @@ void LtsSession::clearGuiPluginInterfaces()
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
LtsSessionManager* LtsSession::getSessionManager()
|
||||
{
|
||||
return m_sessionManager;
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace LtsSession
|
||||
+1822
File diff suppressed because it is too large.
Load diff
@@ -11,8 +11,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "lts_session_data_dds.h"
|
||||
#ifdef BUILD_RTI
|
||||
#include "lts_session_manager.h"
|
||||
#endif
|
||||
|
||||
#include <LtsAppDescriptor/lts_app_descriptor.h>
|
||||
#include <LtsSession/ltssession_export.h>
|
||||
#include <LtsWidgets/lts_base.h>
|
||||
#include <QDebug>
|
||||
@@ -83,12 +86,18 @@ class LTSSESSION_EXPORT LtsSession : public LtsSessionDataDds
|
||||
static QString appIconFilename(LtsAppDescriptor::App app);
|
||||
static QIcon appToIcon(LtsAppDescriptor::App app);
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
explicit LtsSession(LtsSessionManager* sessionManager);
|
||||
#else
|
||||
explicit LtsSession();
|
||||
#endif
|
||||
~LtsSession();
|
||||
|
||||
QString toString() const;
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
LtsSessionManager* getSessionManager();
|
||||
#endif
|
||||
bool init(const DdsConnectionParams& connParams, const QVector<LtsPluginManager::AppPluginInstance>& dataPluginList,
|
||||
const QVector<LtsPluginManager::AppPluginInstance>& guiPluginList, bool hidden);
|
||||
#ifdef BUILD_RTI
|
||||
@@ -96,7 +105,11 @@ class LTSSESSION_EXPORT LtsSession : public LtsSessionDataDds
|
||||
const QVector<LtsPluginManager::AppPluginInstance>& dataPluginList,
|
||||
const QVector<LtsPluginManager::AppPluginInstance>& guiPluginList);
|
||||
#endif
|
||||
#ifdef BUILD_RTI
|
||||
void makeVisible();
|
||||
#else
|
||||
void makeVisible(); // no-op when BUILD_RTI=OFF
|
||||
#endif
|
||||
|
||||
void setPayloadsEnabled()
|
||||
{
|
||||
@@ -125,7 +138,9 @@ class LTSSESSION_EXPORT LtsSession : public LtsSessionDataDds
|
||||
*/
|
||||
LtsWidgets::LtsDragIcon* addAction(const LtsWidgets::PluginData& plData, bool isFirstRun = false);
|
||||
void setMenuVisible(bool visible = true);
|
||||
#ifdef BUILD_RTI
|
||||
bool removeMenuAction(LtsWidgets::LtsDragIcon* icon);
|
||||
#endif
|
||||
int screenId() const;
|
||||
int screenContainerId() const;
|
||||
int screenTypeId() const;
|
||||
@@ -153,9 +168,15 @@ class LTSSESSION_EXPORT LtsSession : public LtsSessionDataDds
|
||||
* and puts the text into all base layouts of this session
|
||||
* @param exerciseData the human reable exercise name of the current exercise
|
||||
*/
|
||||
#ifdef BUILD_RTI
|
||||
void setExerciseData(const LtsWidgets::ExerciseData& exerciseData);
|
||||
const LtsWidgets::ExerciseData* exerciseData() const;
|
||||
void setProfilePicture(const QPixmap& pixmap);
|
||||
#else
|
||||
void setExerciseData(const LtsWidgets::ExerciseData& exerciseData) { Q_UNUSED(exerciseData) }
|
||||
const LtsWidgets::ExerciseData* exerciseData() const { return nullptr; }
|
||||
void setProfilePicture(const QPixmap& pixmap) { Q_UNUSED(pixmap) }
|
||||
#endif
|
||||
|
||||
void setBaseLayoutVisible()
|
||||
{
|
||||
@@ -186,10 +207,14 @@ class LTSSESSION_EXPORT LtsSession : public LtsSessionDataDds
|
||||
*/
|
||||
bool isChildOfSession(QWidget* child);
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
LtsWidgets::LtsBaseLayoutWidget* baseLayout()
|
||||
{
|
||||
return m_baseLayout;
|
||||
}
|
||||
#else
|
||||
void* baseLayout() const { return nullptr; }
|
||||
#endif
|
||||
|
||||
QWidget* baseLayoutWidget(); // prevents some classes to include LtsBaseLayoutWidget.h just to specify the blw as a
|
||||
// parent widget
|
||||
@@ -278,10 +303,14 @@ class LTSSESSION_EXPORT LtsSession : public LtsSessionDataDds
|
||||
m_hidden = true;
|
||||
}
|
||||
|
||||
const QString workspaceId() const;
|
||||
const QString workspaceId() const;
|
||||
void setWorkspaceId(const QString& newWorkspaceId);
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
LtsWidgets::ExcState exerciseState() const;
|
||||
#else
|
||||
LtsWidgets::ExcState exerciseState() const { return LtsWidgets::ExerciseState::eUnknown; }
|
||||
#endif // BUILD_RTI
|
||||
|
||||
void setLoadedFromSavegame()
|
||||
{
|
||||
@@ -294,8 +323,24 @@ class LTSSESSION_EXPORT LtsSession : public LtsSessionDataDds
|
||||
}
|
||||
|
||||
void addDeveloperActions();
|
||||
#ifdef BUILD_RTI
|
||||
void refetchActions(); // Do not use.
|
||||
void setDependency(LtsSession* session);
|
||||
#else
|
||||
void refetchActions(); // Do not use. (no-op when BUILD_RTI=OFF)
|
||||
#endif
|
||||
void setDependency(LtsSession* session)
|
||||
{
|
||||
#ifdef BUILD_RTI
|
||||
if (m_dependency)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Tried to set session dependency on self";
|
||||
return;
|
||||
}
|
||||
m_dependency = session;
|
||||
#else
|
||||
Q_UNUSED(session)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool hasDependency(LtsSession* session)
|
||||
{
|
||||
@@ -320,19 +365,25 @@ class LTSSESSION_EXPORT LtsSession : public LtsSessionDataDds
|
||||
}
|
||||
|
||||
public slots:
|
||||
#ifdef BUILD_RTI
|
||||
void slotExecuteNextPayload(); // NEVER call this directly, queue a signal to this slot !
|
||||
void slotPluginInitDone(); // NEVER call this directly, queue a signal to this slot !
|
||||
#endif
|
||||
void slotShowOnlineHelp(const QString& fileName);
|
||||
// void takeOverBdv();
|
||||
|
||||
private slots:
|
||||
#ifdef BUILD_RTI
|
||||
void slotShowOperatorSettings();
|
||||
#endif
|
||||
void slotSwap();
|
||||
void slotStapleTopicLockHandler(LtsWidgets::LtsDialog* widget);
|
||||
void slotStopWaitDialog();
|
||||
#ifdef BUILD_RTI
|
||||
void slotStartPluginInit();
|
||||
void slotMonitorSelected();
|
||||
void delayScriptEditorStart();
|
||||
#endif
|
||||
|
||||
signals:
|
||||
void signalInitializationAborted();
|
||||
@@ -354,10 +405,13 @@ class LTSSESSION_EXPORT LtsSession : public LtsSessionDataDds
|
||||
private:
|
||||
friend class DeveloperTools::DevDialog;
|
||||
friend class DeveloperTools::AppWidget;
|
||||
#ifdef BUILD_RTI
|
||||
friend class LtsSessionManager;
|
||||
#endif
|
||||
|
||||
bool event(QEvent* e) override;
|
||||
void createBaseLayout();
|
||||
#ifdef BUILD_RTI
|
||||
void initializePlugins(const QVector<LtsPluginManager::AppPluginInstance>& dataPluginList,
|
||||
const QVector<LtsPluginManager::AppPluginInstance>& guiPluginList);
|
||||
void initializeDataPlugins(const QVector<LtsPluginManager::AppPluginInstance>& dataPluginList);
|
||||
@@ -366,34 +420,51 @@ class LTSSESSION_EXPORT LtsSession : public LtsSessionDataDds
|
||||
void clearDataPluginInterfaces();
|
||||
void clearGuiPluginInterfaces();
|
||||
void executePayloads();
|
||||
#endif
|
||||
void connectOnlineHelpButton(LtsWidgets::LtsDialog* widget);
|
||||
// TODO: AFTER FAT !! void stapleWidget(LtsWidgets::LtsDialog *dialog); // FIXME: HACK: because an LtsDialog can
|
||||
// directly add widgets to the base layout and misses the staples...
|
||||
void aboutToCloseTab(LtsWidgets::LayoutArea area);
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
QPointer<LtsSessionManager> m_sessionManager;
|
||||
#endif
|
||||
#ifdef BUILD_RTI
|
||||
QMap<int /*priority*/, std::shared_ptr<GuiPluginBase::Interface>>
|
||||
m_payloadPriorityMap; // QMap automatically sorts by key on iteration and overwrites multiple occurences with
|
||||
// the latest)
|
||||
QList<std::shared_ptr<GuiPluginBase::Interface>>
|
||||
m_payloadList; // for payloads that don't care when they are executed (prio '9999' plugins)
|
||||
#endif
|
||||
LtsWidgets::LtsBackgroundWidget* m_mainBackground;
|
||||
bool m_hasBaseLayout;
|
||||
#ifdef BUILD_RTI
|
||||
LtsWidgets::LtsBaseLayoutWidget* m_baseLayout;
|
||||
#else
|
||||
void* m_baseLayout{nullptr}; // stub for non-RTI build
|
||||
#endif
|
||||
bool m_markedForDeletion;
|
||||
bool m_payloads;
|
||||
QVector<LtsNotification::LtsNotificationController*> m_notiCtlList;
|
||||
bool m_initDone; // set by doneInitializingSession / signalDoneInitializingSession
|
||||
#ifdef BUILD_RTI
|
||||
bool m_payloadsDone{false}; // for debug
|
||||
#endif
|
||||
bool m_menuVisible;
|
||||
// bool m_ignoreSignalInLoop = false;
|
||||
bool m_firstActionsFetch;
|
||||
#ifdef BUILD_RTI
|
||||
LtsWidgets::ExerciseData* m_exerciseData;
|
||||
#else
|
||||
void* m_exerciseData{nullptr}; // stub for non-RTI build
|
||||
#endif
|
||||
QVector<LtsWidgets::PluginData> m_missingRightActions;
|
||||
std::shared_ptr<Core::Interface::Ftc> m_coreFtc;
|
||||
#ifdef BUILD_RTI
|
||||
GuiPluginBase::Interface* m_currentInitIfc; // not owning
|
||||
bool m_slotPluginInitDoneMutex;
|
||||
bool m_pluginInitDone; // set by slotPluginInitDone
|
||||
#endif
|
||||
QJsonObject m_savegame;
|
||||
bool m_hidden; // if true, does not create BLW
|
||||
int m_screenId{-1};
|
||||
@@ -403,7 +474,9 @@ class LTSSESSION_EXPORT LtsSession : public LtsSessionDataDds
|
||||
bool m_loadedFromSavegame;
|
||||
std::shared_ptr<OnlineHelp::ForeignOnlineHelpViewerGuiInterface> m_ohvIfc;
|
||||
bool m_foreverInvisible; // if true, creates BLW but hides it and does not use MMM
|
||||
#ifdef BUILD_RTI
|
||||
QStringList m_failedFetches;
|
||||
#endif
|
||||
QVector<LtsWidgets::LtsBackgroundWidget*> m_bgWidgets;
|
||||
QString m_workspaceId;
|
||||
bool m_needsToBeSuccessfullyPlaced{
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Stub implementation for lts_session_data_dds.cpp when BUILD_RTI=OFF
|
||||
* Provides minimal implementations to allow linking without RTI Connext DDS
|
||||
*/
|
||||
|
||||
#include "lts_session_data_dds_stub.h"
|
||||
|
||||
namespace LtsSession
|
||||
{
|
||||
|
||||
// No additional implementation needed - all methods are inline in header
|
||||
|
||||
} // namespace LtsSession
|
||||
@@ -2,12 +2,14 @@
|
||||
* @RDE_HEADER@
|
||||
* Stub header for lts_session_data_dds.h when BUILD_RTI=OFF
|
||||
* Provides minimal declarations to allow compilation without RTI Connext DDS
|
||||
*
|
||||
* NOTE: No Q_OBJECT macro - this is a stub class without signals/slots
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QUrl>
|
||||
@@ -15,6 +17,9 @@
|
||||
|
||||
#include "Lts/Common/ProjectConfig/project_defines.h"
|
||||
|
||||
// IDL::PartitionType is already defined in project_defines.h
|
||||
// No need to redefine it here
|
||||
|
||||
namespace LtsSession
|
||||
{
|
||||
|
||||
@@ -72,13 +77,12 @@ namespace GuiPluginBase
|
||||
class Interface;
|
||||
}
|
||||
|
||||
// Stub LtsSessionDataDds class - minimal version without DDS functionality
|
||||
// Stub LtsSessionDataDds class - inherits QObject for QPointer compatibility
|
||||
// NO Q_OBJECT macro - avoids MOC generation issues, but provides QObject interface
|
||||
class LtsSessionDataDds : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LtsSessionDataDds(QObject* parent = nullptr) : QObject(parent) {}
|
||||
|
||||
~LtsSessionDataDds() override = default;
|
||||
|
||||
bool init(const DdsConnectionParams&)
|
||||
@@ -136,16 +140,30 @@ class LtsSessionDataDds : public QObject
|
||||
return 0;
|
||||
}
|
||||
|
||||
signals:
|
||||
void partitionTimeChanged(qint64);
|
||||
void partitionTimeChangedInternal();
|
||||
// Stub methods for signals (no-op in stub version)
|
||||
void partitionTimeChanged(qint64) {} // no-op
|
||||
void partitionTimeChangedInternal() {} // no-op
|
||||
|
||||
// Q_OBJECT compatibility methods (delegate to QObject)
|
||||
void* qt_metacast(const char* _clname) override
|
||||
{
|
||||
return QObject::qt_metacast(_clname);
|
||||
}
|
||||
int qt_metacall(QMetaObject::Call _c, int _id, void** _a) override
|
||||
{
|
||||
return QObject::qt_metacall(_c, _id, _a);
|
||||
}
|
||||
|
||||
// staticMetaObject - inline definition to avoid linker errors
|
||||
// Points to QObject's meta object since we have no custom meta-object
|
||||
static inline const QMetaObject staticMetaObject = QObject::staticMetaObject;
|
||||
};
|
||||
|
||||
// Stub Fetcher class
|
||||
class Fetcher
|
||||
{
|
||||
public:
|
||||
Fetcher(LtsSessionDataDds*, const QString&) {}
|
||||
Fetcher(LtsSession::LtsSessionDataDds*, const QString&) {}
|
||||
|
||||
template <typename T> void getForeignGuiInterface(std::shared_ptr<T>&, const QString&, bool) {}
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
|
||||
#include <Lts/Common/ProjectConfig/project_defines.h>
|
||||
#include <LtsPluginManager/lts_plugin_loader.h>
|
||||
#include <LtsPluginManager/lts_plugin_manager.h>
|
||||
@@ -120,3 +122,5 @@ class LTSSESSION_EXPORT LtsSessionManager : public QObject
|
||||
};
|
||||
|
||||
} // namespace LtsSession
|
||||
|
||||
#endif // BUILD_RTI
|
||||
+2
-2
@@ -43,12 +43,12 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsUtilsDds
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsUtilsDds
|
||||
PRIVATE
|
||||
LtsUtilsCoreHeaderOnly
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
ddscore
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
TARGET_LINK_LIBRARIES(LtsUtilsDds PUBLIC ddscore)
|
||||
ENDIF(BUILD_RTI)
|
||||
@@ -11,7 +11,8 @@ namespace LtsWebSocket
|
||||
{
|
||||
|
||||
LtsWebSocketServer::LtsWebSocketServer(AbstractClientMessageFactory* messageFactory, QObject* parent)
|
||||
: QObject(parent), m_logger(getLogger("LtsWebSocket.Server")), m_queueTimer(new QTimer(this)), m_messageFactory(messageFactory), m_connectionHandler(nullptr)
|
||||
: QObject(parent), m_queueTimer(new QTimer(this)), m_messageFactory(messageFactory), m_connectionHandler(nullptr),
|
||||
m_logger(getLogger("LtsWebSocket.Server"))
|
||||
{
|
||||
connect(m_queueTimer, &QTimer::timeout, this, &LtsWebSocketServer::onQueueTimerTimeout);
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ ADD_INTERFACE_LIBRARY(AsbDataPluginInterface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
DataPluginInterface
|
||||
advancedSymbology
|
||||
Qt6::Gui
|
||||
)
|
||||
|
||||
#
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "logger.h"
|
||||
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <NGLLoggerBootstrap.h>
|
||||
|
||||
namespace BuildingViewer
|
||||
{
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QColor>
|
||||
#include <Symbology/symbol_dictionary.h>
|
||||
#include <Lts/Viewer/SituationMap/Symbology/symbol_dictionary.h>
|
||||
#include <PluginInterfaces/data_plugin_interface.h>
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -54,11 +54,12 @@ class GetExerciseImageRequester : public AbstractRequester,
|
||||
GetExerciseImageReply m_reply;
|
||||
};
|
||||
|
||||
class ExerciseManagementDialogModel final : public LtsWidgets::LtsAbstractTableModel<ExerciseManagement::Exercise>
|
||||
class ExerciseManagementDialogModel final : public LtsWidgets::LtsAbstractTableModel<Exercise>
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
using Exercise = ExerciseManagement::Exercise;
|
||||
enum Columns {
|
||||
Id,
|
||||
Name,
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <FileManagement/flm_enums.hpp>
|
||||
#include <Lts/Plugins/FileManagement/flm_enums.hpp>
|
||||
#include <FileManagement/flm_dtc.h>
|
||||
#include <PluginInterfaces/topic_replay_interface.h>
|
||||
#include <TopicEditorBase/topic_editor_interface.h>
|
||||
|
||||
@@ -18,7 +18,9 @@ SET(gna_common_gui_SRCS
|
||||
NGL_ADD_LIBRARY2(WS GnaCommon SHARED ${gna_common_gui_SRCS} )
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(GnaCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../Services/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../../../Proxies/
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(GnaCommon
|
||||
PRIVATE
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "gnacommon_export.h"
|
||||
#include <GuezNasat/gna_dtc.h>
|
||||
#include <LtsGuezNasat/logger.h>
|
||||
#include <GuezNasat/logger.h>
|
||||
|
||||
#include <LtsWidgets/lts_abstract_table_model.h>
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
#include <ExerciseManagement/exm_dtc.h>
|
||||
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_gui_combobox_plugin_interface.h>
|
||||
#include <Lts/Plugins/ParticipantManagement/ppm_gui_combobox_plugin_interface.h>
|
||||
|
||||
#include <GuezNasat/logger.h>
|
||||
|
||||
|
||||
+13
-3
@@ -11,12 +11,18 @@
|
||||
SET(mrk_common_gui_SRCS
|
||||
mrk_dialog_model.cpp
|
||||
mrk_dialog_model.h
|
||||
mrk_apply_filter.cpp
|
||||
mrk_apply_filter.h
|
||||
CustomViews/mrk_marker.cpp
|
||||
CustomViews/mrk_marker.h
|
||||
)
|
||||
|
||||
# FilterManagement-Plugins temporär ausgeschlossen für BUILD_RTI=OFF
|
||||
# if(BUILD_RTI)
|
||||
# list(APPEND mrk_common_gui_SRCS
|
||||
# mrk_apply_filter.cpp
|
||||
# mrk_apply_filter.h
|
||||
# )
|
||||
# endif()
|
||||
|
||||
NGL_WRAP_UI(mrk_common_gui_SRCS
|
||||
CustomViews/mrk_marker.ui
|
||||
)
|
||||
@@ -33,7 +39,6 @@ NGL_TARGET_LINK_LIBRARIES(MrkCommon
|
||||
LtsSessionData
|
||||
LtsUtilsGuiDds
|
||||
OpmDataPluginInterface
|
||||
FltDataPluginInterface
|
||||
ngltools
|
||||
PUBLIC
|
||||
MrkDataPluginInterface
|
||||
@@ -41,3 +46,8 @@ NGL_TARGET_LINK_LIBRARIES(MrkCommon
|
||||
LtsWidgets
|
||||
LtsDataView
|
||||
)
|
||||
|
||||
# FilterManagement nur bei BUILD_RTI
|
||||
if(BUILD_RTI)
|
||||
target_link_libraries(MrkCommon PRIVATE FltDataPluginInterface)
|
||||
endif()
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LtsDataView/abstract_display_widget.h>
|
||||
#include <abstract_display_widget.h>
|
||||
#include <mrkcommon_export.h>
|
||||
|
||||
namespace Ui
|
||||
|
||||
-1
@@ -5,7 +5,6 @@
|
||||
|
||||
#include "mrk_dialog_model.h"
|
||||
#include <utility>
|
||||
#include <MarkerManagement/mrk_translation.h>
|
||||
#include <OperatorManagement/opm_dtc.h>
|
||||
|
||||
#include <ngltools/ngltools_dtg.h>
|
||||
|
||||
+2
-1
@@ -12,11 +12,12 @@
|
||||
namespace OcBaseDownload
|
||||
{
|
||||
|
||||
class ExModel final : public LtsWidgets::LtsAbstractTableModel<ExerciseManagement::Exercise>
|
||||
class ExModel final : public LtsWidgets::LtsAbstractTableModel<Exercise>
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
using Exercise = ExerciseManagement::Exercise;
|
||||
enum Columns
|
||||
{
|
||||
Name,
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# Created by Christian Ehrlicher, SLSE, 2016-03-01
|
||||
#
|
||||
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(Data)
|
||||
ADD_SUBDIRECTORY(Gui)
|
||||
|
||||
@@ -54,3 +55,4 @@ ADD_INTERFACE_LIBRARY(OpmDataPluginInterface
|
||||
DataPluginInterface
|
||||
svcOpmCommon
|
||||
)
|
||||
ENDIF()
|
||||
@@ -5,10 +5,12 @@
|
||||
# Created by Christian Ehrlicher, SLSE, 2016-02-29
|
||||
#
|
||||
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(Common)
|
||||
ADD_SUBDIRECTORY(OperatorOverview)
|
||||
ADD_SUBDIRECTORY(OperatorSettings)
|
||||
ADD_SUBDIRECTORY(OperatorEdit)
|
||||
ADD_SUBDIRECTORY(Login)
|
||||
ADD_SUBDIRECTORY(OpmComboBox)
|
||||
ENDIF()
|
||||
#ADD_SUBDIRECTORY(NewLogin)
|
||||
+19
-6
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "operator_dialog_model.h"
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
|
||||
#include <ngltools/ngltools_dtg.h>
|
||||
#include <ParticipantManagement/ppm_data_plugin_interface.h>
|
||||
#include <ParticipantManagement/ppm_translation.h>
|
||||
@@ -19,7 +21,7 @@ namespace OperatorManagement
|
||||
|
||||
|
||||
OperatorManagementDialogModel::OperatorManagementDialogModel(QObject *parent, int exerciseId )
|
||||
: LtsWidgets::LtsAbstractTableModel<OperatorManagement::User>({tr("Id"),
|
||||
: LtsWidgets::LtsAbstractTableModel<UserType>({tr("Id"),
|
||||
tr("Name"),
|
||||
tr("Info"),
|
||||
tr("Effective ACLs"),
|
||||
@@ -34,7 +36,9 @@ OperatorManagementDialogModel::OperatorManagementDialogModel(QObject *parent, in
|
||||
parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_ppmDtc(nullptr)
|
||||
#ifdef BUILD_RTI
|
||||
, m_exmDtc(nullptr)
|
||||
#endif
|
||||
, m_exerciseId(exerciseId)
|
||||
{}
|
||||
|
||||
@@ -45,11 +49,13 @@ bool OperatorManagementDialogModel::initModel(LtsSession::LtsSession *session, c
|
||||
{
|
||||
m_dtc = dtc;
|
||||
session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc);
|
||||
#ifdef BUILD_RTI
|
||||
session->getDtc<ExerciseManagement::DataInterface>(m_exmDtc);
|
||||
#endif
|
||||
|
||||
connect(m_dtc.get(), &OperatorManagement::Interface::Dtc::userChanged,
|
||||
this, &OperatorManagementDialogModel::onDataChanged);
|
||||
m_dtc->users([this](const OperatorManagement::User &op) { insertRow(op); });
|
||||
m_dtc->users([this](const UserType &op) { insertRow(op); });
|
||||
|
||||
if (m_ppmDtc)
|
||||
{
|
||||
@@ -66,6 +72,7 @@ bool OperatorManagementDialogModel::initModel(LtsSession::LtsSession *session, c
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
if (m_exmDtc)
|
||||
{
|
||||
connect(m_exmDtc.get(), &ExerciseManagement::Interface::Dtc::exerciseChanged,
|
||||
@@ -80,6 +87,7 @@ bool OperatorManagementDialogModel::initModel(LtsSession::LtsSession *session, c
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
auto cb = [this](const Group &group)
|
||||
@@ -106,6 +114,7 @@ void OperatorManagementDialogModel::onPartyChanged(const ParticipantManagement::
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
void OperatorManagementDialogModel::onExerciseChanged(const ExerciseManagement::Exercise &data, DataModification modType)
|
||||
{
|
||||
if (modType == DataModification::eRemoved)
|
||||
@@ -118,6 +127,7 @@ void OperatorManagementDialogModel::onExerciseChanged(const ExerciseManagement::
|
||||
emit dataChanged(idx, idx);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
QVariant OperatorManagementDialogModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
@@ -132,7 +142,7 @@ QVariant OperatorManagementDialogModel::data(const QModelIndex &index, int role)
|
||||
|
||||
if (role == Qt::DisplayRole)
|
||||
{
|
||||
const OperatorManagement::User &op = m_vecData.at(index.row());
|
||||
const UserType &op = m_vecData.at(index.row());
|
||||
std::vector<OperatorManagement::PartiesByExercise> pbe = op.visiblePartiesByExercise();
|
||||
switch (index.column())
|
||||
{
|
||||
@@ -240,7 +250,7 @@ QString OperatorManagementDialogModel::visibleParties(const std::vector<int32_t>
|
||||
return result.join(QStringLiteral(", "));
|
||||
}
|
||||
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
QString OperatorManagementDialogModel::exercises(const std::vector<int32_t> &exercises) const
|
||||
{
|
||||
QStringList result;
|
||||
@@ -250,6 +260,7 @@ QString OperatorManagementDialogModel::exercises(const std::vector<int32_t> &exe
|
||||
|
||||
return result.join(QStringLiteral(", "));
|
||||
}
|
||||
#endif
|
||||
|
||||
QString OperatorManagementDialogModel::effectiveAcls(std::vector<int32_t> acls) const
|
||||
{
|
||||
@@ -267,7 +278,7 @@ QString OperatorManagementDialogModel::priority(int16_t prio) const
|
||||
return QString::number(prio);
|
||||
}
|
||||
|
||||
bool OperatorManagementDialogModel::isFiltered(const OperatorManagement::User &data, DataModification modType) const
|
||||
bool OperatorManagementDialogModel::isFiltered(const UserType &data, DataModification modType) const
|
||||
{
|
||||
Q_UNUSED(modType);
|
||||
|
||||
@@ -280,4 +291,6 @@ bool OperatorManagementDialogModel::isFiltered(const OperatorManagement::User &d
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BUILD_RTI
|
||||
+10
-5
@@ -3,6 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
|
||||
#include <OperatorManagement/opm_dtc.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ExerciseManagement/exm_dtc.h>
|
||||
@@ -15,9 +17,10 @@
|
||||
namespace OperatorManagement
|
||||
{
|
||||
|
||||
// Typ-Alias um Namespace-Konflikt mit QtMocConstants::User zu vermeiden
|
||||
using UserType = User;
|
||||
|
||||
|
||||
class OPMCHANGEPASSWORDGUI_EXPORT OperatorManagementDialogModel final : public LtsWidgets::LtsAbstractTableModel<OperatorManagement::User>
|
||||
class OPMCHANGEPASSWORDGUI_EXPORT OperatorManagementDialogModel final : public LtsWidgets::LtsAbstractTableModel<UserType>
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -42,9 +45,9 @@ public:
|
||||
|
||||
bool initModel(LtsSession::LtsSession *session, const std::shared_ptr<OperatorManagement::Interface::Dtc> &dtc);
|
||||
|
||||
QVariant data(const QModelIndex &, int) const override final;
|
||||
QVariant data(const QModelIndex &, int) const override;
|
||||
|
||||
bool isFiltered( const OperatorManagement::User &data, DataModification modType ) const override;
|
||||
bool isFiltered( const UserType &data, DataModification modType ) const override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -71,4 +74,6 @@ private:
|
||||
int m_exerciseId;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BUILD_RTI
|
||||
+2
-2
@@ -221,11 +221,11 @@ bool fill(QComboBox *cbx, PdmComboBoxType type)
|
||||
case PdmComboBoxType::CbLanguage:
|
||||
{
|
||||
const QString languages = LtsUtils::ProjectSettings::getInstance()->value(QStringLiteral("pdm"), QStringLiteral("EquipmentLanguages")).toString();
|
||||
const QVector<QStringRef> slLang = languages.splitRef(QLatin1Char(','));
|
||||
const QStringList slLang = languages.split(QLatin1Char(','));
|
||||
QSet<int> alreadySeen;
|
||||
alreadySeen += LanguageConfiguration::NoChange;
|
||||
cbx->addItem(toString(LanguageConfiguration::NoChange), LanguageConfiguration::NoChange);
|
||||
for (const QStringRef &r : slLang)
|
||||
for (const QString &r : slLang)
|
||||
{
|
||||
const int langId = r.toInt();
|
||||
if (alreadySeen.contains(langId))
|
||||
|
||||
+1
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
#include <Lts/Proxies/TrainingAreaBase/training_area_telegrams.h>
|
||||
|
||||
class QComboBox;
|
||||
class QStandardItemModel;
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
# Created by Christian Ehrlicher, SLSE, 2016-03-01
|
||||
#
|
||||
|
||||
IF(BUILD_RTI)
|
||||
|
||||
ADD_SUBDIRECTORY(Gui)
|
||||
|
||||
#
|
||||
@@ -24,3 +26,5 @@ ADD_INTERFACE_LIBRARY(SituationMapScriptFilterGuiPluginInterface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
GuiPluginInterface TopicReplayInterface TopicEditorInterface Qt6::Core
|
||||
)
|
||||
|
||||
ENDIF(BUILD_RTI)
|
||||
+1
@@ -130,6 +130,7 @@ NGL_ADD_LIBRARY2(WS SitmapDds SHARED ${sitmap_dds_SRCS})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(SitmapDds
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_SOURCE_DIR}/Lts/Viewer/SituationMap
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(SitmapDds
|
||||
PUBLIC
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
IF(BUILD_RTI)
|
||||
|
||||
SET(xml_FILE dgps_service.xml)
|
||||
|
||||
SET(if_SRCS
|
||||
@@ -66,3 +68,5 @@ NGL_TARGET_LINK_LIBRARIES(Tetra_dgps_simulator
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
)
|
||||
|
||||
ENDIF(BUILD_RTI)
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "tetra_if.h"
|
||||
#include "dgps_config.h"
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <QTcpSocket>
|
||||
#include <QHostAddress>
|
||||
@@ -242,4 +244,6 @@ void TetraIF::onAddGroupMonitoring()
|
||||
NGL::NGLLoggerHelper::hexDumpHelper(m_logger, NGL::LogLevel::Debug, tele.data());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BUILD_RTI
|
||||
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "svcalmcommon_export.h"
|
||||
#include <AlarmManagement/svcalmcommon_export.h>
|
||||
|
||||
namespace AlarmManagement
|
||||
{
|
||||
|
||||
@@ -17,12 +17,11 @@
|
||||
#include "logger.h"
|
||||
#include <LtsUtilsCore/connection.h>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QVector>
|
||||
#include <QObject>
|
||||
#include <chrono>
|
||||
|
||||
class QStringList;
|
||||
|
||||
namespace AudioVideoManagement
|
||||
{
|
||||
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "svcmrkcommon_export.h"
|
||||
#include <MarkerManagement/svcmrkcommon_export.h>
|
||||
|
||||
namespace MarkerManagement
|
||||
{
|
||||
using LOGGER_T = NGL::INGLLogger &;
|
||||
|
||||
MRK_COMMON_EXPORT LOGGER_T getLogger(const char *name);
|
||||
SVCMRKCOMMON_EXPORT LOGGER_T getLogger(const char *name);
|
||||
inline LOGGER_T getLogger(const QString &loggerName)
|
||||
{
|
||||
return getLogger(loggerName.toUtf8().constData());
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(CoPrtCnv)
|
||||
ADD_SUBDIRECTORY(LogView)
|
||||
ADD_SUBDIRECTORY(PrtCnv)
|
||||
ENDIF()
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef SVCALMCOMMON_EXPORT_H
|
||||
#define SVCALMCOMMON_EXPORT_H
|
||||
|
||||
// Stub export macro for AlarmManagement
|
||||
#define SVCALMCOMMON_EXPORT
|
||||
#define SVCALMCOMMON_NO_EXPORT
|
||||
|
||||
#endif // SVCALMCOMMON_EXPORT_H
|
||||
@@ -3,6 +3,10 @@
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Typ-Definitionen
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
#include <DDS/Core/core.hpp>
|
||||
#endif
|
||||
|
||||
namespace AudioVideoManagement
|
||||
{
|
||||
// Placeholder enums - werden durch echte DDS-Typen ersetzt
|
||||
@@ -16,4 +20,12 @@ struct UnitSymbolPosition
|
||||
double y = 0.0;
|
||||
double z = 0.0;
|
||||
};
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
// RadioSystem wird von DDS generiert
|
||||
using RadioSystem = dds::core::Reference<class RadioSystemObject>;
|
||||
#else
|
||||
// Stub für BUILD_RTI=OFF
|
||||
enum class RadioSystem : int32_t { Cnr = 0, Tvc = 1 };
|
||||
#endif
|
||||
} // namespace AudioVideoManagement
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <QString>
|
||||
#include <QtCore/QString>
|
||||
|
||||
namespace Core
|
||||
{
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#ifndef SVCGNACOMMON_EXPORT_H
|
||||
#define SVCGNACOMMON_EXPORT_H
|
||||
|
||||
// Stub export macro for BUILD_RTI=OFF
|
||||
#define SVCGNACOMMON_EXPORT
|
||||
|
||||
#endif // SVCGNACOMMON_EXPORT_H
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
// Stub export header for LtsProjectionWorkstation
|
||||
// Created for Qt6 migration with BUILD_RTI=OFF
|
||||
|
||||
#ifndef LTSPROJECTIONWORKSTATION_EXPORT_H
|
||||
#define LTSPROJECTIONWORKSTATION_EXPORT_H
|
||||
|
||||
#define LTSPROJECTIONWORKSTATION_EXPORT
|
||||
#define LTSPROJECTIONWORKSTATION_NO_EXPORT
|
||||
|
||||
#endif // LTSPROJECTIONWORKSTATION_EXPORT_H
|
||||
@@ -0,0 +1,6 @@
|
||||
// Auto-generated export macro for PDM Common
|
||||
// Stub for BUILD_RTI=OFF or missing dependency
|
||||
|
||||
#ifndef PDM_COMMON_EXPORT
|
||||
#define PDM_COMMON_EXPORT
|
||||
#endif
|
||||
Reference in new issue
Block a user