- Copy Lts/Application from qt5-before (AarApp, OpApp, THP submodules) - Update all CMakeLists.txt to use Qt6::Core, Qt6::Widgets, Qt6::Xml, Qt6::Network, Qt6::PrintSupport, Qt6::Svg, Qt6::WebEngineCore, Qt6::WebEngineWidgets - No SIGNAL/SLOT, QRegExp, QDesktopWidget, or QTextCodec issues found in Application source code - Module ready for Qt6 build validation
150 lines
8.8 KiB
C++
Executable File
150 lines
8.8 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Plugin Provider for standalone SRP / THP
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Ehrlicher, SLSE, 2016-02-29
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <SituationMap/AdapterDds/plugin_provider.h>
|
|
#include <BuildingViewer/Common/bdv_plugin_provider.h>
|
|
#include <AlarmManagement/alm_info_gui_plugin_interface.h>
|
|
#include <LtsAppDescriptor/lts_app_descriptor.h>
|
|
#include <LtsSession/lts_session_data_dds.h>
|
|
#include <QtCore/QVector>
|
|
|
|
namespace DDSConnector
|
|
{
|
|
class DdsConnector;
|
|
}
|
|
namespace THP
|
|
{
|
|
class BuildingPluginProvider;
|
|
class SitMapPluginProvider final : public SituationMap::PluginProvider
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
using SituationMap::PluginProvider::PluginProvider;
|
|
|
|
QString toString() const override;
|
|
|
|
bool init(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector);
|
|
|
|
void emitPartitionTimeChanged(qint64 curTime) { m_curPartitionTime = curTime; emit partitionTimeChanged(curTime); }
|
|
|
|
void setExerciseId(int exerciseId) { m_exerciseId = exerciseId; }
|
|
int exerciseId() const override { return m_exerciseId; }
|
|
bool isSessionValid() const override { return true; }
|
|
qint64 partitionTime() const override { return m_curPartitionTime; }
|
|
int partitionId() const override { return -1; }
|
|
int operatorId() const override { return 42; }
|
|
LtsAppDescriptor::App appId() const override { return LtsAppDescriptor::App::ThpSituationReplay; }
|
|
|
|
bool isVisibleParty(int) const override { return true; }
|
|
QString workspaceId() const override { return {}; }
|
|
bool isReplayPartition() const override { return false; }
|
|
|
|
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> aesDtc() const override { return m_aesDtc; }
|
|
std::shared_ptr<AreaEffectSimulation::ForeignInfoGuiInterface> aesInfoIfc() const override { return {}; }
|
|
std::shared_ptr<AlarmManagement::Interface::Dtc> almDtc() const override { return {}; }
|
|
std::shared_ptr<AlarmManagement::Interface::Ftc> almFtc() const override { return {}; }
|
|
std::shared_ptr<AlarmManagement::ForeignInfoGuiInterface> almInfoIfc() const override { return {}; }
|
|
std::shared_ptr<AssetManagement::Interface::Dtc> asmDtc() const override { return {}; }
|
|
std::shared_ptr<AssetManagement::Interface::Ftc> asmFtc() const override { return {}; }
|
|
std::shared_ptr<Buildings::Interface::Dtc> bldDtc() const override { return m_bldDtc; }
|
|
std::shared_ptr<Buildings::Interface::Ftc> bldFtc() const override { return {}; }
|
|
std::shared_ptr<Buildings::ForeignInfoGuiInterface> bldInfoIfc() const override { return {}; }
|
|
std::shared_ptr<CentralEffectSimulation::Interface::Dtc> cesDtc() const override { return m_cesDtc; }
|
|
std::shared_ptr<ExerciseManagement::Interface::Dtc> exmDtc() const override { return {}; }
|
|
std::shared_ptr<ExerciseManagement::Interface::Ftc> exmFtc() const override { return {}; }
|
|
std::shared_ptr<FilterManagement::Interface::Dtc> fltDtc() const override { return {}; }
|
|
std::shared_ptr<FilterManagement::Interface::Ftc> fltFtc() const override { return {}; }
|
|
std::shared_ptr<FilterManagement::ForeignFltParticipantGuiInterface> fltParticipantIfc() const override { return m_fltParticipantIfc; }
|
|
std::shared_ptr<FilterManagement::ForeignAesGuiInterface> fltAesIfc() const override { return m_fltAesIfc; }
|
|
std::shared_ptr<FilterManagement::ForeignFltBuildingComponentGuiInterface> fltBuildingComponentIfc() const override { return m_fltBuildingComponentIfc; }
|
|
std::shared_ptr<GuezIedManagement::Interface::Dtc> gimDtc() const override { return m_gimDtc; }
|
|
std::shared_ptr<GuezIedManagement::ForeignGuiInterface> gimIfc() const override { return {}; }
|
|
std::shared_ptr<GuezNasat::Interface::Dtc> gnaDtc() const override { return {}; }
|
|
std::shared_ptr<GuezNasat::ForeignGuiInterface> gnaIfc() const override { return {}; }
|
|
std::shared_ptr<InfrastructureManagement::Interface::Dtc> ismDtc() const override;
|
|
std::shared_ptr<InfrastructureManagement::ForeignDataInterface> ismDataIfc() const override;
|
|
std::shared_ptr<InfrastructureManagement::ForeignResourceManagementGuiInterface> ismGuiIfc() const override { return {}; }
|
|
std::shared_ptr<OperatorManagement::Interface::Dtc> opmDtc() const override { return {}; }
|
|
std::shared_ptr<OperatorManagement::Interface::Ftc> opmFtc() const override { return {}; }
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> ppmDtc() const override { return m_ppmDtc; }
|
|
std::shared_ptr<ParticipantManagement::Interface::Ftc> ppmFtc() const override { return {}; }
|
|
std::shared_ptr<ParticipantManagement::ForeignParticipantInfoGuiInterface> ppmParticipantInfoIfc() const override { return {}; }
|
|
std::shared_ptr<ProjectDataManagement::Interface::Dtc> pdmDtc() const override { return m_pdmDtc; }
|
|
std::shared_ptr<SituationReplay::Interface::Dtc> srpDtc() const override { return m_srpDtc; }
|
|
std::shared_ptr<OcSituationClient::ForeignParticipantInfoGuiInterface> ocParticipantInfoIfc() const override { return {}; }
|
|
std::shared_ptr<ServiceMonitor::ForeignGuiInterface> smoServiceMonitorIfc() const override { return {}; }
|
|
std::shared_ptr<TargetManagement::Interface::Dtc> tgtDtc() const override { return {}; }
|
|
std::shared_ptr<ComponentMonitor::Interface::Dtc> cmoDtc() const override { return {}; }
|
|
|
|
// for BuildingPluginProvider
|
|
BuildingPluginProvider *buildingPluginProvider() { return m_buildingPluginProvider.get(); }
|
|
|
|
private:
|
|
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> m_aesDtc;
|
|
std::shared_ptr<Buildings::Interface::Dtc> m_bldDtc;
|
|
std::shared_ptr<CentralEffectSimulation::Interface::Dtc> m_cesDtc;
|
|
std::shared_ptr<FilterManagement::ForeignFltParticipantGuiInterface> m_fltParticipantIfc;
|
|
std::shared_ptr<FilterManagement::ForeignAesGuiInterface> m_fltAesIfc;
|
|
std::shared_ptr<FilterManagement::ForeignFltBuildingComponentGuiInterface> m_fltBuildingComponentIfc;
|
|
std::shared_ptr<GuezIedManagement::Interface::Dtc> m_gimDtc;
|
|
mutable std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
|
|
mutable std::shared_ptr<InfrastructureManagement::ForeignDataInterface> m_ismForeign;
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
|
std::shared_ptr<SituationReplay::Interface::Dtc> m_srpDtc;
|
|
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_pdmDtc;
|
|
|
|
qint64 m_curPartitionTime = 0;
|
|
int m_exerciseId = 0;
|
|
|
|
std::shared_ptr<BuildingPluginProvider> m_buildingPluginProvider;
|
|
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
|
};
|
|
|
|
class BuildingPluginProvider final : public BuildingViewer::PluginProvider
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
using BuildingViewer::PluginProvider::PluginProvider;
|
|
|
|
BuildingPluginProvider() = default;
|
|
|
|
QString toString() const override { return m_smPluginProvider->toString(); }
|
|
|
|
bool init(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector,
|
|
SitMapPluginProvider *smPluginProvider);
|
|
|
|
void emitPartitionTimeChanged(qint64 curTime) { m_smPluginProvider->emitPartitionTimeChanged(curTime); }
|
|
|
|
int exerciseId() const override { return m_smPluginProvider->exerciseId(); }
|
|
qint64 partitionTime() const override { return m_smPluginProvider->partitionTime(); }
|
|
bool isReplayPartition() const override { return false; }
|
|
bool isVisibleParty(int partyId) const override { return m_smPluginProvider->isVisibleParty(partyId); }
|
|
LtsSession::DdsConnectionParams connParams() const override { return m_connectionParams; }
|
|
|
|
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> asbIfc() const override { return m_asbIfc; }
|
|
std::shared_ptr<AudioVideoManagement::ForeignDataInterface> avmDataIfc() const override { return nullptr; } // optional
|
|
std::shared_ptr<Buildings::Interface::Dtc> bldDtc() const override { return m_smPluginProvider->bldDtc(); }
|
|
std::shared_ptr<Buildings::ForeignInfoGuiInterface> bldInfoIfc() const override { return m_smPluginProvider->bldInfoIfc(); } // optional
|
|
std::shared_ptr<InfrastructureManagement::Interface::Dtc> ismDtc() const override { return m_smPluginProvider->ismDtc(); }
|
|
std::shared_ptr<InfrastructureManagement::ForeignDataInterface> ismDataIfc() const override { return m_smPluginProvider->ismDataIfc(); }
|
|
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> aesDtc() const override { return m_smPluginProvider->aesDtc(); } // optional
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> ppmDtc() const override { return m_smPluginProvider->ppmDtc(); } // optional
|
|
std::shared_ptr<ProjectDataManagement::Interface::Dtc> pdmDtc() const override { return m_smPluginProvider->pdmDtc(); } // optional
|
|
std::shared_ptr<SituationReplay::Interface::Dtc> srpDtc() const override { return m_smPluginProvider->srpDtc(); } // optional
|
|
std::shared_ptr<ParticipantManagement::ForeignParticipantInfoGuiInterface> ppmParticipantInfoIfc() const override { return m_smPluginProvider->ppmParticipantInfoIfc(); } // optional
|
|
|
|
private:
|
|
SitMapPluginProvider *m_smPluginProvider{nullptr};
|
|
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> m_asbIfc;
|
|
LtsSession::DdsConnectionParams m_connectionParams;
|
|
};
|
|
}
|