66 lines
1.6 KiB
C++
Executable File
66 lines
1.6 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* AreaEffectSimulation - Explosion Edit Dialog
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Patric Karwat, SLSE, 2016-07-07
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Plugins/AreaEffectSimulation/Gui/Base/aes_base_edit.h>
|
|
#include <AreaEffectSimulation/aes_ftc.h>
|
|
|
|
class QDoubleSpinBox;
|
|
|
|
namespace Ui
|
|
{
|
|
class DangerAreaEdit;
|
|
}
|
|
|
|
namespace AreaEffectSimulation
|
|
{
|
|
|
|
class DangerAreaEdit final
|
|
: public BaseEdit
|
|
, protected AreaEffectSimulation::Interface::Ftc::DangerAreaModifyReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit DangerAreaEdit(const QString &menuGroup, QWidget *parent = nullptr);
|
|
~DangerAreaEdit();
|
|
|
|
QString dialogIdentifier() const override
|
|
{
|
|
return m_aesItem.id() <= 0 ? QStringLiteral("AddDangerArea") : QStringLiteral("EditDangerArea%1").arg(m_aesItem.id());
|
|
}
|
|
bool init(int aesItemId, bool copy, LtsSession::LtsSession *session);
|
|
|
|
void onDangerAreaModifyReply(const Core::FunctionReplyObject &replyObject) override final { onAesItemModifyReply(replyObject); }
|
|
|
|
private:
|
|
std::vector<LtsCoordWidget::LtsCoordWidget *> coordWidgets() const override;
|
|
void retranslate() override;
|
|
|
|
void setData(const DangerArea &aesItem, bool copy);
|
|
void enableUiElements(bool enable) override;
|
|
void setPbAesItemsText();
|
|
|
|
private Q_SLOTS:
|
|
void getPolygon();
|
|
void onPolygonData(const QPolygonF &poly);
|
|
bool apply() override;
|
|
void onCorrelatedItemsChanged(const DangerAreaCorrelatedAesItem &data, DataModification modType);
|
|
void onPbAesItemsClicked();
|
|
void showPreviewObject() override;
|
|
|
|
private:
|
|
QSet<int> m_otherAesItemIds;
|
|
QPolygonF m_previewPolygon;
|
|
Ui::DangerAreaEdit *m_ui;
|
|
};
|
|
|
|
} //namespace AreaEffectSimulation
|