82 lines
2.3 KiB
C++
Executable File
82 lines
2.3 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* AreaEffectSimulation - Charge Effect Edit Dialog
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Astrid Müller, ESZE, 2025-08-19
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Plugins/AreaEffectSimulation/Gui/Base/aes_base_edit.h>
|
|
#include <AreaEffectSimulation/aes_ftc.h>
|
|
#include <ParticipantManagement/ppm_dtc.h>
|
|
#include <Plugins/AdvancedSymbology/asb_data_plugin_interface.h>
|
|
#include <Plugins/ParticipantManagement/ppm_gui_combobox_plugin_interface.h>
|
|
#include <Plugins/ParticipantManagement/ppm_data_plugin_interface.h>
|
|
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
|
|
#include <QPolygonF>
|
|
|
|
namespace ParticipantManagement
|
|
{
|
|
class ParticipantEditModel;
|
|
}
|
|
|
|
namespace Ui {
|
|
class ChargeEffectEdit;
|
|
}
|
|
|
|
namespace AreaEffectSimulation
|
|
{
|
|
|
|
class ChargeEffectEdit final
|
|
: public BaseEdit
|
|
, protected AreaEffectSimulation::Interface::Ftc::ChargeEffectModifyReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ChargeEffectEdit(const QString &menuGroup, QWidget *parent = nullptr);
|
|
~ChargeEffectEdit();
|
|
|
|
QString dialogIdentifier() const override
|
|
{
|
|
return m_aesItem.id() <= 0 ? QStringLiteral("AddChargeEffect") : QStringLiteral("EditChargeEffect%1").arg(m_aesItem.id());
|
|
}
|
|
bool init(int areaId, bool copy, LtsSession::LtsSession *session);
|
|
void onChargeEffectModifyReply(const Core::FunctionReplyObject &replyObject) override final { onAesItemModifyReply(replyObject); }
|
|
|
|
public slots:
|
|
void onGetCoordinate(const QPointF &coordinate);
|
|
void onEscapePressed(const QString &value);
|
|
|
|
private slots:
|
|
bool apply() override;
|
|
void showPreviewObject() override;
|
|
|
|
private:
|
|
void retranslate() override;
|
|
void enableUiElements(bool enable) override;
|
|
void fillCharges();
|
|
void cancelPositionTrigger();
|
|
|
|
void onChangeParty();
|
|
void onSelectionChanged();
|
|
void onPositionButtonToggled(bool isChecked);
|
|
void getPosition();
|
|
|
|
|
|
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> m_asb;
|
|
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_pdmDtc;
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
|
|
|
ParticipantManagement::ParticipantEditModel *m_participantModel;
|
|
|
|
Ui::ChargeEffectEdit *m_ui;
|
|
std::shared_ptr<SituationMap::ForeignGuiInterface> m_sitMapGuiIfc;
|
|
|
|
};
|
|
|
|
} //namespace AreaEffectSimulation
|