- cmake/FindRTI.cmake: Add INTERFACE placeholder targets when RTI not found - cmake/FindRTI.cmake: Force BUILD_RTI=OFF when RTI not installed - Lts/Common/LtsSession/CMakeLists.txt: Make LtsSessionDataDds conditional on BUILD_RTI - Lts/Viewer/CMakeLists.txt: Make LtsDataView conditional on BUILD_RTI - Lts/Plugins/*/CMakeLists.txt: 97 plugin files wrapped in BUILD_RTI conditionals - cmake/NGLMacros.cmake: Fix NGL_ADD_BIG_RESOURCES macro (removed premature return()) - Multiple Qt6 API fixes: QLinkedList→std::list, QStringRef→QStringView, etc. - BUILD_RTI_FIXES_SUMMARY.md: Comprehensive documentation of all fixes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
97 lines
2.7 KiB
C++
Executable File
97 lines
2.7 KiB
C++
Executable File
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <LtsWidgets/lts_dialog.h>
|
|
#include <Services/EffectShowClient/esc_dtc.h>
|
|
#include <Services/EffectShowClient/esc_ftc.h>
|
|
#include <EffectShowClient/logger.h>
|
|
#include <LtsUtils/LtsUtilsGui/LtsUtilsGuiDds/request_helper.h>
|
|
|
|
#include <QTimer>
|
|
|
|
namespace Ui
|
|
{
|
|
class OperatingCondition;
|
|
}
|
|
|
|
namespace SituationMap
|
|
{
|
|
class ForeignGuiInterface;
|
|
}
|
|
|
|
namespace EffectShowClient
|
|
{
|
|
class SmokeState;
|
|
class SafetyConfirmationWidget;
|
|
|
|
|
|
|
|
class OperatingCondition : public LtsWidgets::LtsDialog,
|
|
protected EffectShowClient::Interface::Ftc::SendAmmunitionReplyHandler,
|
|
protected EffectShowClient::Interface::Ftc::SendReadinessReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit OperatingCondition(QWidget *parent = nullptr);
|
|
~OperatingCondition();
|
|
|
|
bool init(const std::shared_ptr<EffectShowClient::Interface::Dtc> &dtc,
|
|
const std::shared_ptr<EffectShowClient::Interface::Ftc> &ftc);
|
|
private:
|
|
void retranslate() override;
|
|
void onSendAmmunitionReply(const Core::FunctionReplyObject &replyObject) override { m_requestHelper->requestReply(replyObject); }
|
|
void onSendReadinessReply(const Core::FunctionReplyObject &replyObject) override { m_requestHelper->requestReply(replyObject); }
|
|
int getSmokeCount();
|
|
|
|
private Q_SLOTS:
|
|
void onMeteoNearVehicleChanged(const EffectShowClient::MeteoNearVehicle &data, DataModification modType);
|
|
void onOperatingConditionEntityChanged(const EffectShowClient::OperatingConditionEntity &data, DataModification modType);
|
|
void onFiringExplosionEntityChanged(const EffectShowClient::FiringExplosionEntity &data, DataModification modType);
|
|
void onFiringSmokeEntityChanged(const EffectShowClient::FiringSmokeEntity &data, DataModification modType);
|
|
void onSafetyConfirmationDisplay();
|
|
bool onSendRevokeReadiness();
|
|
bool onSendConfirmReadiness();
|
|
|
|
bool onSendAmmunition();
|
|
|
|
private:
|
|
|
|
|
|
struct BatteryVoltage_t
|
|
{
|
|
double redBoundary = 5;
|
|
double yellowBoundary = 15;
|
|
double greenMaximum = 25;
|
|
double maximumValue = 100;
|
|
};
|
|
|
|
|
|
void setBatteryVoltageConstraints(double redBoundary, double yellowBoundary, double greenMaximum);
|
|
|
|
|
|
void setBatteryVoltage(double batteryVoltage);
|
|
void onMeteoTimeout();
|
|
|
|
private:
|
|
std::shared_ptr<EffectShowClient::Interface::Dtc> m_dtc;
|
|
std::shared_ptr<EffectShowClient::Interface::Ftc> m_ftc;
|
|
|
|
EffectShowClient::OperatingConditionEntity m_lastState;
|
|
EffectShowClient::SafetyConfirmation_e m_safetyConfirmation;
|
|
|
|
int m_meteoTimerTimeout;
|
|
QTimer *m_meteoTimer;
|
|
|
|
SmokeState *m_smokeState;
|
|
SafetyConfirmationWidget *m_safetyConfirmationWidget;
|
|
Ui::OperatingCondition *m_ui;
|
|
LtsUtils::RequestHelper *m_requestHelper;
|
|
|
|
BatteryVoltage_t m_batteryVoltage;
|
|
};
|
|
|
|
}
|