Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list
Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF
Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
- Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
- Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)
Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified
Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
115 lines
2.9 KiB
C++
115 lines
2.9 KiB
C++
/**
|
|
* @RDE_HEADER@
|
|
* Manages all the Sessions
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*
|
|
* Created by Mike Wille, SLSE, 2016-05-15
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LtsSession/ltssession_export.h>
|
|
#include <LtsPluginManager/lts_plugin_loader.h>
|
|
#include <LtsPluginManager/lts_plugin_manager.h>
|
|
#include <Common/ProjectConfig/project_defines.h>
|
|
|
|
#include <memory>
|
|
#include <QString>
|
|
#include <QObject>
|
|
#include <QVector>
|
|
#include <QMap>
|
|
|
|
|
|
namespace NGL
|
|
{
|
|
class INGLLogger;
|
|
}
|
|
namespace DeveloperTools
|
|
{
|
|
class AppWidget;
|
|
}
|
|
|
|
|
|
namespace LtsSession
|
|
{
|
|
class LtsSession;
|
|
struct DdsConnectionParams;
|
|
|
|
class LTSSESSION_EXPORT LtsSessionManager : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
LtsSessionManager();
|
|
~LtsSessionManager();
|
|
|
|
// create a new session, return old session if already exists [allowClosingSession => true => base layout close = close session | false => base layout close = base layout hide + session still open]
|
|
LtsSession *createSession(const DdsConnectionParams &connParams,
|
|
bool hasBaseLayout = true,
|
|
bool payloads = true,
|
|
bool hidden = false);
|
|
// return an already created session or null
|
|
|
|
LtsSession *getSession(IDL::PartitionType partitionType, int partitionId);
|
|
bool init(const DdsConnectionParams &connParams,
|
|
const QVector<LtsPluginManager::AppPluginInstance> &dataPluginList,
|
|
const QVector<LtsPluginManager::AppPluginInstance> &guiPluginList,
|
|
LtsAppDescriptor::App appId, const QString &workspaceId,
|
|
bool headless, bool hidden);
|
|
int sessionCount() const { return m_sessionMap.count(); }
|
|
LtsAppDescriptor::App appId() const { return m_appId; }
|
|
bool isHeadless() const { return m_headless; }
|
|
QVector<LtsSession *> sessions();
|
|
void softQuit();
|
|
|
|
private:
|
|
friend class DeveloperTools::DevDialog;
|
|
friend class DeveloperTools::AppWidget;
|
|
|
|
struct SessionKey
|
|
{
|
|
SessionKey(IDL::PartitionType pt = IDL::PartitionType::Any, int pId = 0)
|
|
: partitionType(pt)
|
|
, partitionId(pId)
|
|
{}
|
|
IDL::PartitionType partitionType;
|
|
int partitionId;
|
|
|
|
bool operator<(const SessionKey &o) const
|
|
{
|
|
if (partitionType != o.partitionType)
|
|
return partitionType < o.partitionType;
|
|
return partitionId < o.partitionId;
|
|
}
|
|
};
|
|
|
|
void logout();
|
|
void addPayloads(LtsSession *session);
|
|
|
|
QMap<SessionKey, LtsSession *> m_sessionMap;
|
|
QVector<LtsPluginManager::AppPluginInstance> m_dataPluginList;
|
|
QVector<LtsPluginManager::AppPluginInstance> m_guiPluginList;
|
|
LtsAppDescriptor::App m_appId;
|
|
bool m_headless;
|
|
NGL::INGLLogger &m_logger;
|
|
|
|
private slots:
|
|
void slotCloseSession();
|
|
|
|
signals:
|
|
/**
|
|
* @brief signalStopBlock (see slotCloseRequest)
|
|
*/
|
|
void signalStopBlock();
|
|
void signalLogout();
|
|
void signalQuit();
|
|
void signalInitializationFinished();
|
|
void signalInitializationAborted();
|
|
void hideAllOtherBLWs(QObject *caller);
|
|
void taskSwitch(QObject *caller);
|
|
};
|
|
|
|
} // namespace LtsSession
|