Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* @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
|
||||
Reference in new issue
Block a user