Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* @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 GasPipeEdit;
|
||||
}
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
class GasPipeEdit final
|
||||
: public BaseEdit
|
||||
, protected AreaEffectSimulation::Interface::Ftc::GasPipeModifyReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit GasPipeEdit(const QString &menuGroup, QWidget *parent = nullptr);
|
||||
~GasPipeEdit();
|
||||
|
||||
QString dialogIdentifier() const override
|
||||
{
|
||||
return m_aesItem.id() <= 0 ? QStringLiteral("AddGasPipe") : QStringLiteral("EditGasPipe%1").arg(m_aesItem.id());
|
||||
}
|
||||
bool init(int aesItemId, bool copy, LtsSession::LtsSession *session);
|
||||
|
||||
void onGasPipeModifyReply(const Core::FunctionReplyObject &replyObject) override final { onAesItemModifyReply(replyObject); }
|
||||
|
||||
private:
|
||||
void retranslate() override;
|
||||
std::vector<LtsCoordWidget::LtsCoordWidget *> coordWidgets() const override;
|
||||
|
||||
static constexpr int s_minWidth = 5;
|
||||
static constexpr int s_maxWidth = 50;
|
||||
static constexpr int s_stepWidth = 1;
|
||||
static constexpr int s_maxLength = 1000;
|
||||
static constexpr int s_maxSegments = 11;
|
||||
|
||||
void setData(const GasPipe &aesItem, bool copy);
|
||||
void enableUiElements(bool enable) override;
|
||||
AesItem aesItem(int aesItemId) const;
|
||||
double getMaxLength() const override { return s_maxLength; }
|
||||
|
||||
private Q_SLOTS:
|
||||
void getPolygon();
|
||||
void onPolygonData(const double width, const QVector<QPointF> &polygon, const QPolygonF &bufferOutlinePolygon);
|
||||
bool apply() override;
|
||||
void showPreviewObject() override;
|
||||
|
||||
private:
|
||||
Ui::GasPipeEdit *m_ui;
|
||||
QPolygonF m_previewPolygon;
|
||||
};
|
||||
|
||||
} //namespace AreaEffectSimulation
|
||||
Reference in new issue
Block a user