Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,102 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Gui Plugin for EffectShowClient
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, SLSE, 2016-10-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <EffectShowClient/esc_data_plugin_interface.h>
|
||||
#include <EffectShowClient/esc_gui_plugin_interface.h>
|
||||
#include <EffectShowClient/esc_ftc.h>
|
||||
#include <TrainingAreaBaseOC/taboc_data_plugin_interface.h>
|
||||
#include <EffectShowManagement/esm_data_plugin_interface.h>
|
||||
#include <LtsUtilsGuiDds/request_helper.h>
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
namespace LtsNotification
|
||||
{
|
||||
class LtsNotification;
|
||||
}
|
||||
namespace EffectShowClient
|
||||
{
|
||||
class GuiPlugin final : public QObject, public GuiPluginBase::Plugin
|
||||
{
|
||||
Q_PLUGIN_METADATA(IID "gui:3:esc")
|
||||
Q_INTERFACES(GuiPluginBase::Plugin)
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
GuiPlugin() = default;
|
||||
~GuiPlugin() = default;
|
||||
|
||||
QString pluginName() override { return QLatin1String("EffectShowClientGuiPlugin"); }
|
||||
std::shared_ptr<GuiPluginBase::Interface> createGuiInterface(LtsSession::LtsSession *session) override;
|
||||
bool availableInPartition(IDL::PartitionType partition) const override
|
||||
{
|
||||
return partition == IDL::PartitionType::Exercise;
|
||||
}
|
||||
};
|
||||
|
||||
class InterfaceImpl final : public QObject, public GuiPluginBase::Interface,
|
||||
protected EffectShowClient::Interface::Ftc::SendAmmunitionReplyHandler, protected EffectShowClient::Interface::Ftc::SendReadinessReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit InterfaceImpl(LtsSession::LtsSession *session);
|
||||
|
||||
static const QString s_dmfOrderList;
|
||||
|
||||
bool fetchInterfaces() override;
|
||||
void clearInterfaces() override;
|
||||
QString menuGroup() const override;
|
||||
QVector<LtsWidgets::PluginData> getActions() override;
|
||||
bool availableInPartition(IDL::PartitionType partition) const override { return partition == IDL::PartitionType::Exercise || partition == IDL::PartitionType::Global; }
|
||||
|
||||
public slots:
|
||||
void onOperatingConditionEntityChanged(const EffectShowClient::OperatingConditionEntity &data, DataModification modType);
|
||||
void checkLastState();
|
||||
void onOperationalStatusTimeout();
|
||||
|
||||
private:
|
||||
void onSendAmmunitionReply(const Core::FunctionReplyObject &replyObject) override { Q_UNUSED(replyObject) }
|
||||
void onSendReadinessReply(const Core::FunctionReplyObject &replyObject) override { Q_UNUSED(replyObject); }
|
||||
void onSendAmmunition(int currentSmokeCount = -1);
|
||||
|
||||
private:
|
||||
LtsWidgets::LtsDialog *onShowRelocationList(QWidget *parent);
|
||||
LtsWidgets::LtsDialog *onShowOrderList(QWidget *parent);
|
||||
void onShowOrderList(bool isEffectShow);
|
||||
LtsWidgets::LtsDialog *onShowOperatingCondition(QWidget *parent);
|
||||
LtsWidgets::LtsDialog *onShowFiringExplosion(QWidget *parent);
|
||||
LtsWidgets::LtsDialog *onShowFiringSmoke(QWidget *parent);
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||
|
||||
private:
|
||||
QTimer *m_timer = nullptr;
|
||||
LtsNotification::LtsNotification *m_notiDmf{nullptr};
|
||||
int m_oldSmokeCount = -1;
|
||||
qint64 m_lastStatesTime = 0;
|
||||
EffectShowManagement::Feature_e m_vehicleType = EffectShowManagement::Feature_e::NotSpecified;
|
||||
LtsWidgets::PluginData m_smokeAction;
|
||||
LtsWidgets::PluginData m_fireAction;
|
||||
LtsWidgets::PluginData m_effecShowAction;
|
||||
OperatingConditionEntity m_oldCondition;
|
||||
|
||||
QTimer *m_operationalStatusTimer{nullptr};
|
||||
|
||||
std::shared_ptr<EffectShowClient::Interface::Dtc> m_dtc;
|
||||
std::shared_ptr<EffectShowClient::Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<TrainingAreaBaseOC::Interface::Dtc> m_dtcTabOC;
|
||||
};
|
||||
|
||||
} // namespace EffectShowClient
|
||||
Reference in new issue
Block a user