- Merged 292 changed files from dlbo snapshot - Fixed IDL enum collisions (PortType, PdmEventType) - Fixed Grantlee template for C++11 scoped enums - Fixed CMake VERSION_GREATER syntax - Added missing directories (THP, LtsRestClient, etc.) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
192 lines
6.8 KiB
C++
Executable File
192 lines
6.8 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* HMI Plugin for ParticipantManagement - TlnInfoDialog
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Ehrlicher, SLSE, 2016-02-29
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
//Lts
|
|
#include <LtsWidgets/lts_dialog.h>
|
|
#include <LtsSession/lts_session.h>
|
|
#include <LtsUtilsGuiDds/request_helper.h>
|
|
|
|
//Asb
|
|
#include <Plugins/AdvancedSymbology/asb_data_plugin_interface.h>
|
|
|
|
|
|
//ParticipantManagement
|
|
#include <ParticipantManagement/logger.h>
|
|
#include <ParticipantManagement/ppm_participant_info_gui_plugin_interface.h>
|
|
|
|
//DDS
|
|
#include <ParticipantManagement/ppm_dtc.h>
|
|
#include <ParticipantManagement/ppm_ftc.h>
|
|
#include <ProjectDataManagement/pdm_data_plugin_interface.h>
|
|
|
|
#include <InfrastructureManagement/ism_dtc.h>
|
|
|
|
#include <FilterManagement/flt_participant_plugin_interface.h>
|
|
#include <FilterManagement/flt_symbol_appearance_settings.h>
|
|
|
|
//SituationMap
|
|
#include <Plugins/SituationMapPlugin/situation_map_gui_plugin_interface.h>
|
|
|
|
//AES
|
|
#include <AreaEffectSimulation/aes_data_plugin_interface.h>
|
|
|
|
// TargetManagement
|
|
#include <TargetManagement/tgt_dtc.h>
|
|
#include <TargetManagement/tgt_ftc.h>
|
|
#include <TargetManagement/tgt_ftc_types.h>
|
|
|
|
//Qt
|
|
|
|
namespace Ui
|
|
{
|
|
class ParticipantInfoDialog;
|
|
}
|
|
|
|
namespace LtsUtils
|
|
{
|
|
class RequestHelper;
|
|
}
|
|
|
|
namespace ParticipantManagement
|
|
{
|
|
|
|
class ParticipantInfoLtdGearComponent;
|
|
|
|
// --------------------------------------------------------
|
|
// ParticipantInfoDialog
|
|
// --------------------------------------------------------
|
|
class ParticipantInfoDialog final : public LtsWidgets::LtsDialog
|
|
, protected FilterManagement::SymbolAppearanceSettings::SettingsChangedCallback
|
|
, protected TargetManagement::Interface::Ftc::ConfigureTargetReplyHandler
|
|
, protected ParticipantManagement::Interface::Ftc::CreateModifyUasReplyHandler
|
|
, protected ParticipantManagement::Interface::Ftc::ModifyUasStateReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ParticipantInfoDialog(int participantId, const QString &menuGroup, QWidget *parent = nullptr);
|
|
~ParticipantInfoDialog();
|
|
|
|
bool init(LtsSession::LtsSession *session,
|
|
const std::shared_ptr<Interface::Dtc> &dtc,
|
|
const std::shared_ptr<Interface::Ftc> &ftc,
|
|
const std::shared_ptr<ProjectDataManagement::Interface::Dtc> &pdmDtc,
|
|
const std::shared_ptr<SituationMap::ForeignGuiInterface> &sitMapGuiIfc,
|
|
const std::shared_ptr<AdvancedSymbology::ForeignDataInterface> &asbInterface,
|
|
const std::shared_ptr<ForeignParticipantInfoGuiInterface> &ppmGuiIfc);
|
|
|
|
void onConfigureTargetReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
void onCreateModifyUasReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); };
|
|
void onModifyUasStateReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); };
|
|
signals:
|
|
void entityInfoChanged(const QString &text);
|
|
|
|
|
|
private:
|
|
void retranslate() override;
|
|
bool setUiValues();
|
|
static void setBackgroundColor(QWidget *w, Qt::GlobalColor color, bool bSetColor);
|
|
void updateIcon(const Participant &participant);
|
|
void updateIcon(const QColor &color, const QString &sidc);
|
|
void setSanitationLabelColor(SanitationResult proceduresDone);
|
|
void setKindVisible(bool bVisible);
|
|
void setBottomSpacerVisibility(bool isOneListActive);
|
|
void setStatusVisible(bool bVisible);
|
|
void setHistoryVisible(bool bVisible);
|
|
void setEquipNrVisible(bool bVisible);
|
|
void setBiteVisible(bool bVisible);
|
|
void setMessageVisible(bool bVisible);
|
|
void onSymbolAppearanceSettingsChanged(FilterManagement::SymbolAppearanceSettings::Part part) override;
|
|
QString approachingAngle(const QPointF ¢erPoint, double direction, double distance, int mseId) const;
|
|
// Target (Qatar?)
|
|
bool initTargetConfig(bool bShow);
|
|
// Target (L400)
|
|
bool initTargetConfigL400(bool bShow);
|
|
bool loadGuiElementPLugin(const LtsPluginManager::PluginInstance &pi);
|
|
|
|
|
|
private Q_SLOTS:
|
|
void onDynamicParticipantDataChanged(const DynamicParticipantData &data, DataModification modType = DataModification::eModified);
|
|
void onPositionChanged(const ParticipantPosition &position);
|
|
void onUasChanged(const UAS &uas);
|
|
void onUnlockUAS();
|
|
void onUnitPositionChanged(const UnitPosition &position);
|
|
void onUpdatePosition(int participantId, const Core::GeoPosition &position, qint64 sampleTime);
|
|
void onParticipantChanged(const Participant &participant, DataModification modType = DataModification::eModified);
|
|
void onTypeChanged(const Type &type, DataModification modType);
|
|
void updateCurrentIcon();
|
|
|
|
void onOpenSetStatusDialog();
|
|
void onOpenSetInjuryDialog();
|
|
void onOpenSetSanitationDialog();
|
|
void onOpenHistory();
|
|
void onOpenBite();
|
|
void onOpenMessage();
|
|
void onFindOnMap();
|
|
void onMovementTrack();
|
|
void onParticipantMountedOn();
|
|
void onMountedParticipants();
|
|
void onPartitionTimeChanged(qint64 newPartitionTime);
|
|
void onGearRanges();
|
|
|
|
void showSpecialSensorData(int specialSensorData);
|
|
void onContextMenuRequested(const QPoint &position);
|
|
|
|
void onRestockDefaults(int gearId,int gearTypeId);
|
|
void onRestockNow(int gearId,int gearTypeId);
|
|
|
|
// Target (Qatar?)
|
|
void onTargetConfig();
|
|
void onTargetConfigChanged(const TargetManagement::TargetConfig &data, DataModification modType);
|
|
void onTargetModeChangeed();
|
|
void onTargetWeaponChanged();
|
|
|
|
// Target (L400)
|
|
void onOpenTargetConfigurationL400();
|
|
|
|
private:
|
|
Participant m_participant;
|
|
int m_uasId; // Needed to release uas again.
|
|
qint64 m_lastPositionMSec;
|
|
TypeClass m_typeClass;
|
|
std::vector<GearInformation> m_gearList;
|
|
std::vector<SanitationMaterial> m_sanMatStock;
|
|
int m_roomId;
|
|
|
|
QString m_menuGroup;
|
|
|
|
LtsSession::LtsSession *m_session;
|
|
std::shared_ptr<Interface::Dtc> m_dtc;
|
|
std::shared_ptr<Interface::Ftc> m_ftc;
|
|
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_pdmDtc;
|
|
std::shared_ptr<TargetManagement::Interface::Dtc> m_tgtDtc;
|
|
std::shared_ptr<TargetManagement::Interface::Ftc> m_tgtFtc;
|
|
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> m_aesDtc;
|
|
std::shared_ptr<SituationMap::ForeignGuiInterface> m_sitMapGuiIfc;
|
|
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> m_asbiIfc;
|
|
std::shared_ptr<ForeignParticipantInfoGuiInterface> m_ppmGuiIfc;
|
|
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
|
|
std::shared_ptr<FilterManagement::SymbolAppearanceSettings> m_symbolAppearanceSettings;
|
|
std::shared_ptr<FilterManagement::ForeignFltParticipantGuiInterface> m_fltParticipantIfc;
|
|
AdvancedSymbology::SymbolResultWatcherLabel *m_symbolWatcher;
|
|
LtsUtils::RequestHelper *m_requestHelper;
|
|
|
|
ParticipantInfoLtdGearComponent *m_ltdGearComponent { nullptr };
|
|
|
|
Ui::ParticipantInfoDialog *m_ui;
|
|
QPair<int,int> m_oldSpacerSize;
|
|
bool m_isTarget;
|
|
bool m_showPvSan{false};
|
|
bool m_showVulnerabilityKindProject{false};
|
|
LOGGER_T m_logger;
|
|
};
|
|
} // namespace ParticipantInfo
|